LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-08-2015, 11:16 AM   #1
Reimu
LQ Newbie
 
Registered: Jun 2015
Distribution: fedora
Posts: 3

Rep: Reputation: Disabled
Help with compiling various Linux pieces?


Figured this was more 'General' than 'Programming'.

As it were, I've read through the LFS book. Read through Gentoo install docs, etc... never actually having done any sort of compiling (make scares me), it's a situation where flying isn't the exact issue, it's dropping from the nest that is. I've had this bat**** insane idea of making my own distro (definitely adopting a package manager, no way I could manage such a thing) with starting by a minimal gentoo and building up to a point where I could replace things with... well, BSD and Solaris code that would manage to work together. By no means impossible, even if we're only talking a few libs and such. Wanted the illumos kernel with some bsd and gentoo 'underworks', with workings for rpm-based distros (I was thinking straight from Fedora & Korora) everwhere else (enough to have portage and dnf under the same hood). Some would call this a frankenstein.. and that's fine. it's for me.

I need help with compiling things. At the stage of having source on the partition, and it's mounted to /mnt. Heard many things about cross-compiling because we're targeting another system..

Few recommendations for what to do first? I need a working bash to chroot into, I believe?

(I intend this thread to be a place of learning, and not one which is to be answered and forgotten. There's many questions to ask c: and maybe others will be curious)
 
Old 06-08-2015, 11:36 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Smile

Quote:
Few recommendations for what to do first? I need a working bash to chroot into, I believe?
Well, first off, sorry...you will have to overcome your fear and use make...
I started by recompiling the kernel. NOT the best starting point, I admit...
Actually, do you HAVE to come up with (yet) an other distro? Or...will it be a vehicle for learning? As I did...some left-overs are still around on a redundant PC somewhere, a PC that gets to sip some power once per month because I need to keep the OS in shape...
Compiling stuff...best done in FreeBSD. Mind you, FreeBSD is Unix, NOT...Linux. The principles are comparable.
Feel like giving that a whirl? You'll notice that..."there's nuttin' to it"...
In Linux, here's what you do, after downloading source and unzipping it in a folder:
Code:
cd the_folder
./configure
make
su -
[supply password]
cd /to/the_folder
make install
exit
Simple as pie, trust me. I should know. On FreeBSD, I only compile. A wise option, the result is fine-tuned to the needs of the target system
Be followin' this thread...
Thor
 
Old 06-08-2015, 11:41 AM   #3
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Welcome to Linux Questions!

For start best would be to build LFS/BLFS or CLFS/CBLFS/BLFS. You get a feel and experience which would make you stronger in acheiving your goal.

And when you are confident enough to deviate to your ways of distro making might encounter package build failures, dependency failures/deadlocks and ... Searching web for problems other might have got and possible remedified. And learn programming languages e.g. C, sed, awk to handle errors yourself.
 
1 members found this post helpful.
Old 06-08-2015, 01:22 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
fedora and LFS
DO NOT MIX!!!!!!
lfs has a WARNING about NOT!!! using fedora

so do not even try to build lfs on fedora


so step #1
install Debian 7.8 or 8.1 ( unsure if lfs will build on 8.1 so do some RESEARCH )

use Debain for at least 6 months for EVERYTHING!!!

learn to use the OS

then
Step #2

then study the lfs books
( as in studying for the final in a pass/fail 400 level class)

step#3
build LFS on a Debian host
 
Old 06-08-2015, 01:51 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Reimu View Post
Wanted the illumos kernel with some bsd and gentoo 'underworks', with workings for rpm-based distros (I was thinking straight from Fedora & Korora) everwhere else (enough to have portage and dnf under the same hood). Some would call this a frankenstein.. and that's fine. it's for me.
I don't want to discourage you, but with fears about compiling software and no programming knowledge this is an impossible task.
Re-basing an OS to a different kernel is not trivial even for experienced people (ask the guys from Debian's kfreebsd version or the people from Gentoo/BSD) and mixing two completely different and incompatible package managers is not asking for a disaster, it is seriously begging for it.

As the other posters mentioned already, start with LFS/BLFS. Not just reading, but actually doing it. If you are through that, repeat LFS/BLFS with one package manager, after that try it with two and start to see the problems that will occur with that. If you after that still are convinced of your plans, also try to start LFS on a BSD or Illumos kernel and see that this is not trivial at all.
 
Old 06-08-2015, 02:09 PM   #6
Reimu
LQ Newbie
 
Registered: Jun 2015
Distribution: fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Thor_2.0 View Post
Well, first off, sorry...you will have to overcome your fear and use make...
I started by recompiling the kernel. NOT the best starting point, I admit...
Actually, do you HAVE to come up with (yet) an other distro? Or...will it be a vehicle for learning? As I did...some left-overs are still around on a redundant PC somewhere, a PC that gets to sip some power once per month because I need to keep the OS in shape...
Compiling stuff...best done in FreeBSD. Mind you, FreeBSD is Unix, NOT...Linux. The principles are comparable.
Feel like giving that a whirl? You'll notice that..."there's nuttin' to it"...
In Linux, here's what you do, after downloading source and unzipping it in a folder:
Code:
cd the_folder
./configure
make
su -
[supply password]
cd /to/the_folder
make install
exit
Simple as pie, trust me. I should know. On FreeBSD, I only compile. A wise option, the result is fine-tuned to the needs of the target system
Be followin' this thread...
Thor
You guys are fast, here.. :3

Very first issue is that after unpacking, there is no './configure' directory, and the following 'make' command complains of finding nothing.
(immediately following a command-line unpack to /mnt, hosting /dev/sda3 which is clean ex4)
Code:
[fennekin@localpoke mnt] $ ./configure
-bash: ./configure: No such file or directory
[fennekin@localpoke mnt] $ make
make: *** No targets specified and no makefile found.  Stop.
[fennekin@localpoke mnt] $
Something to be noted is that I'm using the hardened uclibc tarball.
 
Old 06-08-2015, 02:26 PM   #7
Reimu
LQ Newbie
 
Registered: Jun 2015
Distribution: fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
I don't want to discourage you, but with fears about compiling software and no programming knowledge this is an impossible task.
Re-basing an OS to a different kernel is not trivial even for experienced people (ask the guys from Debian's kfreebsd version or the people from Gentoo/BSD) and mixing two completely different and incompatible package managers is not asking for a disaster, it is seriously begging for it.

As the other posters mentioned already, start with LFS/BLFS. Not just reading, but actually doing it. If you are through that, repeat LFS/BLFS with one package manager, after that try it with two and start to see the problems that will occur with that. If you after that still are convinced of your plans, also try to start LFS on a BSD or Illumos kernel and see that this is not trivial at all.
Make just seems to hate me, is all. Alas, I'm aware of the gravity upon such an endeavor, and the speeches from those in-know that come with mentioning something as this project. If it's alright with you, this thread is mainly going to be used for compilation help, and to basically post all the things that go wrong, so as to form discussion and possible solutions to this crackpot idea if only for the enjoyment. I have no future, really. This is going to be something I can devote every second to.

-
Wait.. I had to have missed the Fedora warning in LFS. /Diiiid/ only read HLFS, but still. Also used Debian and its derivatives for a good six years before adopting rpm-based back in 2013, so actually using a deb distro to build will be fine.
And I wasn't exactly aware of sed or awk.. thank you veerain.

Last edited by Reimu; 06-08-2015 at 02:33 PM. Reason: multiple post reply
 
Old 06-08-2015, 02:58 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by Reimu View Post
If it's alright with you, …
Of course it, go on and hopefully have fun with it!
 
Old 06-08-2015, 06:30 PM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
I would really not reccomend debian as a host for your first build of lfs, it needs some work to make it lfs complient, install slackware and use that ( you will also learn more running slack thanrunning debian ), we get a lot of the same problems on the lfs forum with people not getting debian complient before they start ( sh->dash instead of bash is the most common ), and absolutly do not use fedora!
 
Old 06-09-2015, 12:05 AM   #10
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Very first issue is that after unpacking, there is no './configure' directory, and the following 'make' command complains of finding nothing.
(immediately following a command-line unpack to /mnt, hosting /dev/sda3 which is clean ex4)
The steps vary individually with each package. So follow LFS correctly.

If you are new to Linux then first learn some with a distro. And do read LFS books, intended audience and such at start.
 
Old 06-09-2015, 12:26 AM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
Very first issue is that after unpacking, there is no './configure directory
Not everything uses "autotools"
some programs use Qmake
some programs use cmake
some programs use SCons

even with autotools not everything STARTS with a "configure" SCRIPT
( "configure" is a script and NOT a folder !!)

some things are MAKEFILE builds , where YOU have to manually edit the makefile ( by hand)
others ( like from SVN and GIT ) use a "build.sh" to run autoconf and automake and autoheader
OR you have to run "autoreconf " to rebuild a configure script


so you REALLY !!! do need to READ the instructions !!!!
 
Old 06-09-2015, 04:24 AM   #12
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Quote:
so you REALLY !!! do need to READ the instructions !!!!
LOL - good preparations make half the job, and make it twice as likely to succeed...

Quote:
Not everything uses "autotools"
some programs use Qmake
some programs use cmake
some programs use SCons
...I did'nt have that in mind...incomplete answer from my part...sorry OP
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux - Bonding - UDP Server receive two pieces of data at a time from client xuniuer Linux - Networking 1 12-16-2010 08:43 PM
LXer: Cobbler pieces together mass Red Hat Linux installations LXer Syndicated Linux News 0 06-20-2008 12:10 PM
LXer: Photos: Top 10 pieces of Linux kit LXer Syndicated Linux News 0 11-24-2006 09:54 AM
linux laptop SuSe9.2 I hate Meeses to Pieces robertybob Linux - Laptop and Netbook 4 04-17-2005 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration