This is the mail archive of the
crossgcc@sourceware.org
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more information.
Re: building 'native', 'cross' and 'cross-native' GCCs
Googling "multiple definition of `_dl_addr_inside_object'" suggests a
couple of things to try:
1. removing "-fstack-protector" (I use this option when building gcc);
2. force this by adding "-fno-stack-protector" to both the gcc and glibc
builds;
3. use "-j1" instead of (my usual) "-j3"
Unfortunately none of this worked and I am really stuck and very
frustrated, so would appreciate any help from the list with regards to
how to overcome this problem.
Have you tried setting extra target CFLAGS to "-U_FORTIFY_SOURCE"?
This setting is on the C-library settings page. I'm not 100% sure
this is the problem you are having, but most of the time there is a
need to set this CFLAGS option anyway.
Andy, many thanks for the answer! I took a note of your suggestion above
and will try it out.
I 'managed' to sort this out somehow by doing 2 things - 1) by using
newer glibc package (2.13) - though I had to later downgrade both glibc
and binutils as I had another couple of issues to content with; and 2)
remove *all* of my CFLAGS and leave the bare-minimum - I now only have
"-O2". Compilation and build of glibc passes, though I had another 2
problems after this:
1. The infamous GCC_NO_EXECUTABLES problem (building of the final gcc
stops with this error). I was getting this:
Installing final compiler
checking if
/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/./gcc/xgcc
-B/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/./gcc/
-B/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/bin/
-B/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/lib/
-isystem
/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/include
-isystem
/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sys-include
static flag -static works... checking for library containing strerror...
configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[2]: *** [configure-target-libiberty] Error 1
checking dynamic linker characteristics... configure: error: Link
tests are not allowed after GCC_NO_EXECUTABLES.
make[2]: *** [configure-target-libstdc++-v3] Error 1
make[1]: *** [all] Error 2
Build failed in step 'Installing final compiler'
Error happened in '/home/mz/gcc/crosstool-ng-1.10.0/scripts/functions'
in function 'CT_DoExecLog' (line unknown, sorry)
called from
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/build/cc/gcc.sh' at line # 524
in function 'do_cc'
called from
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/crosstool-NG.sh' at line # 606
in function 'main'
Look at
'/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/build.log' for more
info on this error.
(elapsed: 30:37.51)
make: *** [build] Error 2
libiberty's configure.log:
configure:5845: checking for library containing strerror
configure:5877: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
libstdc++' configure.log:
configure:10312: checking dynamic linker characteristics
configure:10757: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
What I did then was to force both versions of configure to completely
ignore this kind of error by patching the said configures (I replaced
the ac_err function which show the error message and halts the configure
process with a dummy assignment - "___z=0") to prevent triggering this
error and allowing the configure process to continue.
When I googled this error I stumbled across a large thread on the issue
and noticed that Yann has experienced exactly the same problem and had a
few exchanges with Dan Kegel on this very issue, though I do not know
what was the solution then if indeed it was solved. The thread can be
found here - http://sourceware.org/ml/crossgcc/2005-07/msg00015.html
2. After patching the final configure I now have another problem with
psignal:
Installing final compiler
/home/mz/gcc-test/build/src/gcc-4.5.2/libiberty/strsignal.c:554:1:
error: conflicting types for 'psignal'
make[3]: *** [strsignal.o] Error 1
checking for log10l... make[2]: *** [all-target-libiberty] Error 2
make[1]: *** [all] Error 2
Build failed in step 'Installing final compiler'
Error happened in '/home/mz/gcc/crosstool-ng-1.10.0/scripts/functions'
in function 'CT_DoExecLog' (line unknown, sorry)
called from
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/build/cc/gcc.sh' at line # 524
in function 'do_cc'
called from
'/home/mz/gcc/crosstool-ng-1.10.0/scripts/crosstool-NG.sh' at line # 606
in function 'main'
Look at
'/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/build.log' for more
info on this error.
(elapsed: 32:32.86)
make: *** [build] Error 2
The actual error from make is this:
/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/./gcc/xgcc
-B/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/./gcc/
-B/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/bin/
-B/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/lib/
-isystem
/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/include
-isystem
/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sys-include
-c -DHAVE_CONFIG_H -g -Os -I.
-I/home/mz/gcc-test/build/src/gcc-4.5.2/libiberty/../include -W -Wall
-Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic
/home/mz/gcc-test/build/src/gcc-4.5.2/libiberty/strsignal.c -o strsignal.o
/home/mz/gcc-test/build/src/gcc-4.5.2/libiberty/strsignal.c:554:1:
error: conflicting types for 'psignal'
/home/mz/gcc-test/install/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/signal.h:150:13:
note: previous declaration of 'psignal' was here
make[3]: *** [strsignal.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory
`/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/build-cc/powerpc-unknown-linux-gnu/libiberty'
yes
checking for log10l... make[2]: *** [all-target-libiberty] Error 2
make[2]: *** Waiting for unfinished jobs....
Closer examination with grep reveals that there are several versions of
signal.h:
[mz@test1 install]$ find . | grep signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/asm-generic/signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/asm/signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/linux/signal.h
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/sys/signal.h
[mz@test1 install]$ grep -r psignal
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/
| more
./powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/include/signal.h:extern
void psignal (int __sig, __const char *__s);
This is in addition to the one defined in strsignal.c which seems (in my
view) to cause the above error:
strsignal.c:551
-------------------------------------------
#ifndef HAVE_PSIGNAL
void
psignal (int signo, char *message)
{
if (signal_names == NULL)
{
init_signal_tables ();
}
if ((signo <= 0) || (signo >= sys_nsig))
{
fprintf (stderr, "%s: unknown signal\n", message);
}
else
{
fprintf (stderr, "%s: %s\n", message, sys_siglist[signo]);
}
}
#endif /* ! HAVE_PSIGNAL */
------------------------------------------
So, this is where I am currently stuck at and with a problem I cannot solve.
MZ
--
For unsubscribe information see http://sourceware.org/lists.html#faq