LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Syslog.c error (http://www.linuxquestions.org/questions/linux-from-scratch-13/syslog-c-error-688331/)

dianming 12-04-2008 11:31 AM

Syslog.c error
 
Hey everyone,

I've been using Linux for a few years now, having gone through all the major distributions (openSuSE, Red Hat, Fedora, and now mostly Ubuntu), and now I'm jumping into LFS to learn a little bit more.

I've run into a funny error, though, when trying to compile glibc 2.8.x or 2.9.x(Latest). The config runs flawlessly, but when I run the make command I get this error well into the compile:

../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
make[2]: *** [/mnt/adm/sources/glibc-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/mnt/adm/sources/glibc-src/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/adm/sources/glibc-src'
make: *** [all] Error 2

So `_vsyslog_chk' isn't implemented? Is it a deprecated function?

I'm running Ubuntu Intrepid Ibex 8.10 with all the updates, an Intel Dual-Core 6300 @ 1.86 GHz, 1.8 GB ram.

Anything I can do to get around this?

ctg60 12-04-2008 01:00 PM

I received exact the same error when compiling with gcc 4.3, however gcc 4.2 is ok.

dianming 12-04-2008 02:45 PM

ctg60 -- Are you also running Ubuntu? I've been looking over the forums, and I haven't seen too much about developing an LFS system with a Ubuntu host. Wonder if it's distro specific...

dianming 12-04-2008 04:01 PM

Ack -- I compiled gcc 4.2 to replace the 4.3, but I still get the same error!

I didn't start completely over, just ran the gcc 4.2 compilation. Perhaps I would need to start from ground zero because the new compilation didn't overwrite the newer gcc completely?

Another interesting note: I've opened up the syslog.c file in the /misc subdirectory. There is an implementation of the __vsyslog_chk function. So maybe my gcc isn't compiling correctly?

ctg60 12-05-2008 04:25 AM

I was using gcc 4.2.4-3ubuntu4. I think you should tried both including the one you compiled yourself see if it is gcc issue.

dianming 12-05-2008 10:24 AM

Hmm....interestingly enough, I compiled both the gcc 4.2.4 and the 4.2.4-3ubuntu4. Neither of them worked; still the same error!

I'm guess I'm going to have to start from the top and see what happens.

dianming 12-08-2008 09:24 AM

Aha! So I've finally gotten GCC compiled right. I restarted with a Xubuntu host and used all the updated files (even GCC 2.9). I think my problem might have been with the sed command before the configure -- I wasn't running it when cd'd into the GCC source folder. No wonder the command always returned a "file not found" error. Heh.

The build was flawless, and tested without any errors. Cool!

ioncrew 12-17-2008 02:06 PM

dianming-- are you sure, you use GCC 2.9? or GLIBC-2.9 ?

pelvis2 01-20-2009 01:38 AM

Same problem but dont understand the workaround(solution)
 
So diangming you say that the probelm is the gcc that comes by default with the ubuntu distribution and I have to compile or reinstall a better version of it or is it the gcc compiled before? Thats because I'm not using the gcc compiled before to compile glibc as a tool program and get the same compilation problem. Hmmm very strange. because in lfs when compiling the tools it says you dont need any sed command to run before compileing gcc and anyway lfs book says to compile glibc agains ubuntus default gcc not against the gcc you compiled b4. Very strange pls tell me if you know where the problem is

pelvis2 01-21-2009 12:59 AM

OK guys i have found what the problem was. First of all b4 compiling be sure that CC is set right and make a echo $CC it should be
gcc -B/usr/bin if not run CC="gcc -B/usr/bin" but that wasnt enough in my case i still got the error then i began to read the INSTALL in the source folder and there it says that you should try to avoid as much as posible to compile it as root. And it worked when i tryed to compile it as lfs not as root.

PS: I have also set the profile for root as that for fls as it was explained but that wasnt enough. So profile wasnt the probleme here and settings also not. Very strange but now it works fine as lfs user.

So I advise you to be somthing else as root at least on ubuntu when you compile glibc.

itzfritz 12-29-2011 05:38 PM

[SOLVED] Syslog.c error
 
For a resolution to this issue, see http://sourceware.org/bugzilla/show_bug.cgi?id=10375

Code:

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.
glibc bug 10375 reports this issue, but it has not been addressed.

source: http://plash.beasts.org/wiki/GlibcBuildIssues


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