LinuxQuestions.org
Help answer threads with 0 replies.
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 04-25-2004, 08:20 PM   #1
ralam
LQ Newbie
 
Registered: Apr 2004
Posts: 5

Rep: Reputation: 0
gcc 3.4.0 and glibc


In Chapter 5, when compiling glibc 2.3.3 with the just bootstrapped gcc 3.4.0 and linux headers 2.6.5, I get this error:
make -C elf subdir_lib
make[2]: Entering directory `/mnt/linux/sources/untarred/glibc-2.3.3-20031202/elf'
gcc -B/tools/bin/ dl-runtime.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mpreferred-stack-boundary=2 -fexceptions -fasynchronous-unwind-tables -I../include -I. -I/mnt/linux/sources/untarred/glibc-build/elf -I.. -I../libio -I/mnt/linux/sources/untarred/glibc-build -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /mnt/linux/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/include -isystem /tools/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /mnt/linux/sources/untarred/glibc-build/elf/dl-runtime.o -MD -MP -MF /mnt/linux/sources/untarred/glibc-build/elf/dl-runtime.o.dt
dl-runtime.c:56: error: conflicting types for 'fixup'
../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
dl-runtime.c:56: error: conflicting types for 'fixup'
../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
dl-runtime.c:141: error: conflicting types for 'profile_fixup'
../sysdeps/i386/dl-machine.h:161: error: previous declaration of 'profile_fixup' was here
dl-runtime.c:141: error: conflicting types for 'profile_fixup'
../sysdeps/i386/dl-machine.h:161: error: previous declaration of 'profile_fixup' was here
../sysdeps/i386/dl-machine.h:158: warning: 'fixup' declared `static' but never defined
../sysdeps/i386/dl-machine.h:161: warning: 'profile_fixup' declared `static' but never defined
make[2]: *** [/mnt/linux/sources/untarred/glibc-build/elf/dl-runtime.o] Error 1
make[2]: Leaving directory `/mnt/linux/sources/untarred/glibc-2.3.3-20031202/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/linux/sources/untarred/glibc-2.3.3-20031202'
make: *** [all] Error 2
I have no overriding environment variables like CFLAGS and CXXFLAGS set. How do I solve this error?
 
Old 05-01-2004, 06:45 PM   #2
apeiro
ArchLinux Maintainer
 
Registered: Aug 2003
Location: BC, Canada
Distribution: Arch Linux
Posts: 16

Rep: Reputation: 0
Try this...

Code:
diff -u -r1.124 -r1.125
--- libc/sysdeps/i386/dl-machine.h      2004/03/05 10:14:49     1.124
+++ libc/sysdeps/i386/dl-machine.h      2004/03/09 07:42:29     1.125
@@ -154,11 +154,14 @@
    destroys the passed register information.  */
 /* GKM FIXME: Fix trampoline to pass bounds so we can do
    without the `__unbounded' qualifier.  */
-static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
-     __attribute__ ((regparm (2), unused));
+#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
+
+static ElfW(Addr) fixup (struct link_map *__unbounded l,
+                        ElfW(Word) reloc_offset)
+     ARCH_FIXUP_ATTRIBUTE;
 static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
                                 ElfW(Addr) retaddr)
-     __attribute__ ((regparm (3), unused));
+     ARCH_FIXUP_ATTRIBUTE;
 # endif

 /* This code is used in dl-runtime.c to call the `fixup' function
===================================================================
--- /home/dank/downloads/glibc-2.3.2/elf/dl-runtime.c   Fri Feb  7 11:41:12 2003
+++ glibc-2.3.2/elf/dl-runtime.c        Thu Apr  8 22:24:26 2004
@@ -36,6 +36,12 @@
 # define VERSYMIDX(sym)        (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
 #endif

+/* The fixup functions might have need special attributes.  If none
+   are provided define the macro as empty.  */
+#ifndef ARCH_FIXUP_ATTRIBUTE
+# define ARCH_FIXUP_ATTRIBUTE
+#endif
+

 /* This function is called through a special trampoline from the PLT the
    first time each PLT entry is called.  We must perform the relocation
@@ -45,7 +51,7 @@
    function.  */

 #ifndef ELF_MACHINE_NO_PLT
-static ElfW(Addr) __attribute_used__
+static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
 fixup (
 # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
@@ -132,7 +138,7 @@

 #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__

-static ElfW(Addr) __attribute_used__
+static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
 profile_fixup (
 #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
        ELF_MACHINE_RUNTIME_FIXUP_ARGS,
 
Old 05-01-2004, 07:34 PM   #3
apeiro
ArchLinux Maintainer
 
Registered: Aug 2003
Location: BC, Canada
Distribution: Arch Linux
Posts: 16

Rep: Reputation: 0
Note you may also need to use the -fno-unit-at-a-time compiler flag. I did.

Code:
make CFLAGS+="-fno-unit-at-a-time"
 
Old 05-02-2004, 07:03 PM   #4
ralam
LQ Newbie
 
Registered: Apr 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Ok, I solved the problem by using a more recent version of glibc (2.3.4)
 
Old 05-04-2004, 11:53 PM   #5
cmcginty
LQ Newbie
 
Registered: Feb 2002
Posts: 9

Rep: Reputation: 0
Hey, exactly where did you get Glibc 2.3.4. I'm looking all over for this and can't seem to find it.
 
Old 05-05-2004, 03:11 AM   #6
cmcginty
LQ Newbie
 
Registered: Feb 2002
Posts: 9

Rep: Reputation: 0
I am assuming you got it from the glbic CVS on sources.redhat.com. I haven't used CVS very much unfortunately. The version.h file says the current version is 2.3.3, yet looking at the Versions.def file there is a marker for 2.3.4. How can I get a list of tags in the libc module, or find out what date was the official 2.3.4 code?
 
Old 05-05-2004, 05:49 AM   #7
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
This is the "all the packages" page for Bleeding Edge Linux From Scratch. Scroll to the bottom of the page and read note 2
 
Old 05-05-2004, 07:16 PM   #8
cmcginty
LQ Newbie
 
Registered: Feb 2002
Posts: 9

Rep: Reputation: 0
Thanks, I didn't know there was a BE-LFS project. If I'm right, I think the page you were reffering to is this:

http://belfs.linux-phreak.net/chapter03/packages.html
 
Old 05-06-2004, 01:19 PM   #9
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Yes, sorry, I didn't realize I'd forgotten to post the link. How stupid of me. My apologies.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 without gcc and glibc nazir Linux From Scratch 5 08-05-2005 12:23 PM
install GCC and glibc trelos Linux - Newbie 1 01-16-2005 05:27 AM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare Suse/Novell 3 11-29-2004 03:13 PM
gcc / glibc problem matt_w_lambert Linux - Software 2 10-26-2003 01:37 AM
compile glibc or gcc first? carboncopy Slackware 2 07-29-2003 08:26 PM


All times are GMT -5. The time now is 10:07 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration