Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
04-07-2017, 09:14 AM
|
#16
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,132
|
No, you have to start again from the beginning, from Chapter 5. Make a completely new toolkit using the correct shell.
|
|
|
04-07-2017, 01:47 PM
|
#17
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,132
|
I've noticed something else which might be relevant to your problem. Both binutils and gcc are to be built "--with-system-zlib". This means that the package's internal zlib doesn't get built. Apparently libisl is needed for building it as well as for building graphite. Please check that you included this essential parameter in your gcc build, and that zlib has actually been built and installed.
Last edited by hazel; 04-07-2017 at 01:58 PM.
|
|
1 members found this post helpful.
|
04-09-2017, 05:28 AM
|
#18
|
LQ Newbie
Registered: Apr 2017
Posts: 5
Original Poster
Rep: 
|
Quote:
Originally Posted by hazel
I've noticed something else which might be relevant to your problem. Both binutils and gcc are to be built "--with-system-zlib". This means that the package's internal zlib doesn't get built. Apparently libisl is needed for building it as well as for building graphite. Please check that you included this essential parameter in your gcc build, and that zlib has actually been built and installed.
|
I downloaded the zlib package and successfully installed it. I also added the argument "--with-system-zlib" into my command binutilis and gcc but got the same error.
When i feed my system the following commands
Code:
for file in gcc-6.3.0/config/{linux,i386/linux{,64}}.h
do
cp -uv $file{,.orig}
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
-e 's@/usr@/tools@g' $file.orig > $file
echo '
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done
I get the following output
Code:
cp: cannot stat 'gcc-6.3.0/config/i386/linux.h': No such file or directory
-bash: gcc-6.3.0/config/i386/linux.h: No such file or directory
-bash: gcc-6.3.0/config/i386/linux.h: No such file or directory
touch: cannot touch 'gcc-6.3.0/config/i386/linux.h.orig': No such file or directory
cp: cannot stat 'gcc-6.3.0/config/i386/linux64.h': No such file or directory
-bash: gcc-6.3.0/config/i386/linux64.h: No such file or directory
-bash: gcc-6.3.0/config/i386/linux64.h: No such file or directory
touch: cannot touch 'gcc-6.3.0/config/i386/linux64.h.orig': No such file or directory
i checked in my config folder and i don't have an i386 folder, any ideas on how i can resolve this? I thought when i extracted my gcc.tar folder all the necessary libraries would be created for me.
Also i'm running an x86_64 machine. From research on the Internet it looks like the i386 is for 32bit machines, i could be wrong.
|
|
|
04-09-2017, 06:39 AM
|
#19
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Re #18.
Quote:
I downloaded the zlib package and successfully installed it.
|
? Why ? The Ubuntu system zlib is completed with : sudo apt install zlib1g-dev
|
|
|
04-09-2017, 06:48 AM
|
#20
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,132
|
Quote:
Originally Posted by knudfl
Re #18.
? Why ? The Ubuntu system zlib is completed with : sudo apt install zlib1g-dev
|
Some misunderstanding here! We are talking about building Linux From Scratch. Ubuntu is merely the build host and, by this stage of the proceedings, should be providing only the kernel and dynamic directories. All the userland software is on the new partition, either in the /tools tree or in the standard locations. And the build should not be asking for headers for this library.
|
|
|
04-09-2017, 06:59 AM
|
#21
|
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 8,132
|
Quote:
Originally Posted by bahjat93
I downloaded the zlib package and successfully installed it.
|
When? It needs to be installed in the correct sequence, i.e. before binutils.
Quote:
I also added the argument "--with-system-zlib" into my command binutilis and gcc but got the same error.
When i feed my system the following commands
Code:
for file in gcc-6.3.0/config/{linux,i386/linux{,64}}.h
do
cp -uv $file{,.orig}
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
-e 's@/usr@/tools@g' $file.orig > $file
echo '
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done
I get the following output
Code:
cp: cannot stat 'gcc-6.3.0/config/i386/linux.h': No such file or directory
-bash: gcc-6.3.0/config/i386/linux.h: No such file or directory
-bash: gcc-6.3.0/config/i386/linux.h: No such file or directory
touch: cannot touch 'gcc-6.3.0/config/i386/linux.h.orig': No such file or directory
cp: cannot stat 'gcc-6.3.0/config/i386/linux64.h': No such file or directory
-bash: gcc-6.3.0/config/i386/linux64.h: No such file or directory
-bash: gcc-6.3.0/config/i386/linux64.h: No such file or directory
touch: cannot touch 'gcc-6.3.0/config/i386/linux64.h.orig': No such file or directory
|
That's a chapter 5 sequence. I thought we were on chapter 6 now.
Quote:
i checked in my config folder and i don't have an i386 folder, any ideas on how i can resolve this? I thought when i extracted my gcc.tar folder all the necessary libraries would be created for me.
Also i'm running an x86_64 machine. From research on the Internet it looks like the i386 is for 32bit machines, i could be wrong.
|
Well, this is a mix-up. You really do need to scrub everything and start again. One of the most basic requirements for building LFS is to know what your system architecture is.
The fact that your computer is 64-bit is not conclusive; what matters is the architecture of your host system. A 32-bit computer only runs 32-bit code (and yes, i386 (or i686) is the symbol for that). A 64-bit computer can run both 32-bit and 64-bit systems. Almost certainly your Ubuntu is 64-bit because most people run that now. LFS must follow the architecture of your host.
The command uname -r run in Ubuntu will tell you what architecture you have.
Scrub all the $LFS directories except /sources and start again at chapter 5. Put it down to experience!
|
|
|
All times are GMT -5. The time now is 12:57 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|