LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 03-17-2012, 09:40 AM   #1
samuraixp
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Rep: Reputation: Disabled
LFS 7.1 Glibc-2.14.1 make error


I have been following the LFS stable which is currently version 7.1
I am building from a x64 Ubuntu 11.04 live cd.

Everything I have done so far has been fine, up until glibc.
Depending on what I mess with I get different errors.

In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:0:
../misc/syslog.c: In function '__vsyslog_chk':
../misc/syslog.c:123:1: sorry, unimplemented: inlining failed in call to 'syslog': function body not available
../misc/syslog.c:155:9: sorry, unimplemented: called from here
make[2]: *** [/media/ROOT/sources/glibc-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/media/ROOT/sources/glibc-2.14.1/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/media/ROOT/sources/glibc-2.14.1'
make: *** [all] Error 2dl-addr.c.text+0x0): multiple definition of `_dl_addr_inside_object'
/media/ROOT/sources/glibc-build/elf/dl-allobjs.os.text+0x11320): first defined here
collect2: ld returned 1 exit status
make[2]: *** [/media/ROOT/sources/glibc-build/elf/librtld.map] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/media/ROOT/sources/glibc-2.14.1/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/media/ROOT/sources/glibc-2.14.1'
make: *** [all] Error 2

this site says:
http://plash.beasts.org/wiki/GlibcBu...3d84325c05e9b0

Inlining failed

When building on Ubuntu:

In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:
../misc/syslog.c: In function '__vsyslog_chk':
../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to 'syslog': function body not available
../misc/syslog.c:155: sorry, unimplemented: called from here
Need to add -U_FORTIFY_SOURCE to the gcc invocation. I found this in Ubuntu's Debian packaging for glibc. I believe this is an Ubuntuism. Ubuntu enables -D_FORTIFY_SOURCE=2 by default. See Ubuntu's CompilerFlags wiki page.

so I tried adding -U_FORTIFY_SOURCE to CFLAGS and I get this:

/media/ROOT/sources/glibc-build/config.h:3:3: error: #error "glibc cannot be compiled without optimization"
make[2]: Leaving directory `/media/ROOT/sources/glibc-2.14.1/csu'
make[1]: *** [csu/subdi../glibc-2.14.1/configure --prefix=/tools \
--host=$LFS_TGT --build=$(../glibc-2.14.1/scripts/config.guess) \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.25 --with-headers=/tools/include \
libc_cv_forced_unwind=yes libc_cv_c_cleanup=yesr_lib] Error 2
make[1]: Leaving directory `/media/ROOT/sources/glibc-2.14.1'
make: *** [all] Error 2

Then i read that using CFLAGS -O2 fixes this issue.

with both -O2 and -U_FORTIFY_SOURCE

I get this error:

dl-addr.c.text+0x0): multiple definition of `_dl_addr_inside_object'
/media/ROOT/sources/glibc-build/elf/dl-allobjs.os.text+0x11320): first defined here
collect2: ld returned 1 exit status
make[2]: *** [/media/ROOT/sources/glibc-build/elf/librtld.map] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/media/ROOT/sources/glibc-2.14.1/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/media/ROOT/sources/glibc-2.14.1'
make: *** [all] Error 2


I have also read in another forum I shouldnt use 64bit with LFS and should look at CLFS instead????

Whats the deal?
Should I grab a 32bit live CD of ubuntu and just start from scratch, or, start from scratch on CLFS?

Does anyone have a recommended Live CD that works with LFS 7.1?

Cheers,
Madhava

Last edited by samuraixp; 03-17-2012 at 09:42 AM. Reason: added more errors
 
Old 03-18-2012, 04:07 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by samuraixp View Post
I have been following the LFS stable which is currently version 7.1
I am building from a x64 Ubuntu 11.04 live cd.
Did you make the Ubuntu live CD compliant with the LFS Host System Requirements?

Quote:
Everything I have done so far has been fine, up until glibc.
Depending on what I mess with I get different errors.
If you encounter an error during the build of LFS the reason is probably you. All the steps in the book work and it is not needed to fiddle with the commands given, fiddling with the command to get it to work will most likely get you into more trouble (which might turn up at a later stage of the build).

Quote:
In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:0:
../misc/syslog.c: In function '__vsyslog_chk':
../misc/syslog.c:123:1: sorry, unimplemented: inlining failed in call to 'syslog': function body not available
../misc/syslog.c:155:9: sorry, unimplemented: called from here
make[2]: *** [/media/ROOT/sources/glibc-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/media/ROOT/sources/glibc-2.14.1/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/media/ROOT/sources/glibc-2.14.1'
make: *** [all] Error 2dl-addr.c.text+0x0): multiple definition of `_dl_addr_inside_object'
/media/ROOT/sources/glibc-build/elf/dl-allobjs.os.text+0x11320): first defined here
collect2: ld returned 1 exit status
I notice you deviated from the book (the bold parts). There's basically nothing wrong with doing so, but I would advise to follow the book to the letter, especially if this is your first LFS build. This particular deviation shouldn't be harmful if used consistently, but in general a good understanding of how LFS is build and Linux in general is needed to make deviations work.

Quote:
I have also read in another forum I shouldnt use 64bit with LFS and should look at CLFS instead????

Whats the deal?
Should I grab a 32bit live CD of ubuntu and just start from scratch, or, start from scratch on CLFS?
That is not true. There is no reason why you shouldn't be able to build LFS on a 64 bit multilib host (I've done so many times). Using a true 64 bit system will not work, but most (if not all) mainstream Linux distro's are 64 bit miltilib.

Quote:
Does anyone have a recommended Live CD that works with LFS 7.1?
If at all possible I wouldn't use a liveCD of any kind. Use the distro you are already using, or do a minimal install of your preferred distro. Whatever it is you choose to do, make sure your host meets the LFS Host System Requirements.

Hope this helps.
 
Old 03-18-2012, 04:54 AM   #3
samuraixp
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
requirements

First question. Will the system from lfs be 64bit? I hAve 16 gb of ram and want to use it.



I have confirmed the requirements are being met. There's 4 things Ubuntu live CD doesn't have which I add and the test script comes back OK on.
I have read in some places mawk is not compatible and to replace with awk but this made no difference.

When you day deviation about my dir surely there's no difference in using Ubuntus /media/ instead of mnt but I guess there's no harm in trying /mnt/lfs instead for good measure.

Also I noticed the guide only refers to 2 patches for glibc but the wget list includes 4 patches. Using 2 or 4 makes no difference I get errors with either. I think there is also an additional patch in the wget list for gcc which I tried using the second time by rebuilding gcc with it.

Same result gcc is fine but glibc errors on make.

Also the latest stable book says 7.1 but if you Google 7.1 there's a different guide on lfs site with a different order of steps than the latest stable which makes me wonder if there's an issue in the guides???


Ideas?
I'll try another build with 100% copy and paste and see if that gets me past glibc.
 
Old 03-18-2012, 05:21 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by samuraixp View Post
First question. Will the system from lfs be 64bit? I hAve 16 gb of ram and want to use it.
Have a look here: iii. LFS Target Architectures

Quote:
I have confirmed the requirements are being met. There's 4 things Ubuntu live CD doesn't have which I add and the test script comes back OK on.
I have read in some places mawk is not compatible and to replace with awk but this made no difference.
Yes, it does matter! And although you do not mention this the same is true for bash vs dash. You need to be 100% compatible, these requirements are there for a reason.

Quote:
When you day deviation about my dir surely there's no difference in using Ubuntus /media/ instead of mnt but I guess there's no harm in trying /mnt/lfs instead for good measure.
As already stated: This specific deviation, if used consistently, will not get you into trouble. /mnt/lfs is a mountpoint and /media/ROOT could be used instead. But why would you want to do so?

Quote:
Also I noticed the guide only refers to 2 patches for glibc but the wget list includes 4 patches. Using 2 or 4 makes no difference I get errors with either. I think there is also an additional patch in the wget list for gcc which I tried using the second time by rebuilding gcc with it.
Follow the book. The patches you downloaded are for chapter 5 AND 6. Some are only used in chapter 5, some only in chapter 6 and some in both chapters.

Chapter 5 (a sane temporary environment) has other requirements then chapter 6 (the actual LFS sytem you will be using when done building).

Quote:
Also the latest stable book says 7.1 but if you Google 7.1 there's a different guide on lfs site with a different order of steps than the latest stable which makes me wonder if there's an issue in the guides???
I haven't noticed that yet, but I would advise to use the guides provided by the official LFS team (http://www.linuxfromscratch.org/) and to use the stable version.

Hope this helps.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS 6.5 Glibc 2.10.1 --> error when running make Soulman Linux From Scratch 1 01-17-2010 04:54 AM
make check error 6.9.1 glibc lfs 6.5 aahiqmir Linux From Scratch 1 12-06-2009 07:49 PM
Cross LFS for IA64 Glibc make error katinoel Linux From Scratch 1 03-03-2007 06:34 AM
glibc 2.3.4 - make install error - LFS 6.1.1-3 dave-gallagher Linux From Scratch 2 05-23-2006 04:12 PM
make glibc error (LFS) gatblast45 Linux - Software 3 12-21-2004 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:53 PM.

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