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 |
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-25-2004, 07:20 PM
|
#1
|
LQ Newbie
Registered: Apr 2004
Posts: 5
Rep:
|
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?
|
|
|
05-01-2004, 05:45 PM
|
#2
|
ArchLinux Maintainer
Registered: Aug 2003
Location: BC, Canada
Distribution: Arch Linux
Posts: 16
Rep:
|
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,
|
|
|
05-01-2004, 06:34 PM
|
#3
|
ArchLinux Maintainer
Registered: Aug 2003
Location: BC, Canada
Distribution: Arch Linux
Posts: 16
Rep:
|
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"
|
|
|
05-02-2004, 06:03 PM
|
#4
|
LQ Newbie
Registered: Apr 2004
Posts: 5
Original Poster
Rep:
|
Ok, I solved the problem by using a more recent version of glibc (2.3.4)
|
|
|
05-04-2004, 10:53 PM
|
#5
|
LQ Newbie
Registered: Feb 2002
Posts: 9
Rep:
|
Hey, exactly where did you get Glibc 2.3.4. I'm looking all over for this and can't seem to find it.
|
|
|
05-05-2004, 02:11 AM
|
#6
|
LQ Newbie
Registered: Feb 2002
Posts: 9
Rep:
|
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?
|
|
|
05-05-2004, 04:49 AM
|
#7
|
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073
Rep:
|
This is the "all the packages" page for Bleeding Edge Linux From Scratch. Scroll to the bottom of the page and read note 2
|
|
|
05-06-2004, 12:19 PM
|
#9
|
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073
Rep:
|
Yes, sorry, I didn't realize I'd forgotten to post the link. How stupid of me. My apologies.
|
|
|
All times are GMT -5. The time now is 12:02 PM.
|
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
|
|