Re: [Open64-devel] Compile errors occur while building open64-5.0
Brought to you by:
ributzka,
suneeljain
From: Nancy <nan...@gm...> - 2014-08-24 04:10:41
|
Hi David, I'm sorry this this fix does not work for me. Please use non-Plain-test-mode to see this email. That could be more clear. nancy@nancy-ThinkPad-T61:~/work$ if file /usr/lib/crti.o -Lb |fgrep "ELF 32-bit" >/dev/null ; then echo "../lib64 ../lib"; elif [ *-d /usr/lib64 *] ; then echo "../lib64 ../lib32" ; else echo "../lib/x86_64-linux-gnu ../lib32" ; fi *../lib64 ../lib32* nancy@nancy-ThinkPad-T61:~/work$ if file /usr/lib/crti.o -Lb |fgrep "ELF 32-bit" >/dev/null ; then echo "../lib64 ../lib"; elif [ *-f /usr/lib64/crti.o* ] ; then echo "../lib64 ../lib32" ; else echo "../lib/x86_64-linux-gnu ../lib32" ; fi *../lib64 ../lib32* nancy@nancy-ThinkPad-T61:~/work$ Thanks for your information. I try to figure out where's going wrong, by manually excecuting the error command with "-v" option. nancy@nancy-ThinkPad-T61:~/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc$ */home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/xgcc -v *-B/home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/ -m32 -B/home/nancy/toolchains/open64/open64-gcc-4.2.0/x86_64-redhat-linux/bin/ -B/home/nancy/toolchains/open64/open64-gcc-4.2.0/x86_64-redhat-linux/lib/ -isystem /home/nancy/toolchains/open64/open64-gcc-4.2.0/x86_64-redhat-linux/include -isystem /home/nancy/toolchains/open64/open64-gcc-4.2.0/x86_64-redhat-linux/sys-include -O2 -O2 -O2 -DTARG_X8664 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o ./libgcc_s.so.1.tmp libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o libgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o libgcc/./_ucmpdi2_s.o libgcc/./_clear_cache_s.o libgcc/./_enable_execute_stack_s.o libgcc/./_trampoline_s.o libgcc/./__main_s.o libgcc/./_absvsi2_s.o libgcc/./_absvdi2_s.o libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o libgcc/./_subvsi3_s.o libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvdi3_s.o libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o libgcc/./_ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o libgcc/./_clzsi2_s.o libgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/./_powixf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/./_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfsi_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixunssfdi_s.o libgcc/./_floatdisf_s.o libgcc/./_floatundisf_s.o libgcc/./_fixdfdi_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_floatdidf_s.o libgcc/./_floatundidf_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixunsxfdi_s.o libgcc/./_floatdixf_s.o libgcc/./_floatundixf_s.o libgcc/./_fixtfdi_s.o libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o libgcc/./_floatunditf_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_udivmoddi4_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-glibc_s.o libgcc/./unwind-sjlj_s.o libgcc/./gthr-gnat_s.o libgcc/./unwind-c_s.o -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so Reading specs from /home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/specs Target: x86_64-redhat-linux Configured with: ../../open64-svn/./osprey-gcc-4.2.0/configure --prefix=/home/nancy/toolchains/open64/open64-gcc-4.2.0 --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-bootstrap --disable-libmudflap --disable-libssp --disable-checking --enable-threads=posix --enable-tls --with-system-zlib --enable-__cxa_atexit --srcdir=../../open64-svn/./osprey-gcc-4.2.0 --host=x86_64-redhat-linux --target=x86_64-redhat-linux Thread model: posix gcc version 4.2.0 /home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/collect2 --eh-frame-hdr -m elf_i386 -shared -o ./libgcc_s.so.1.tmp *crti.o* /home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/crtbeginS.o -L/home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/32 -L/home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc --soname=libgcc_s.so.1 --version-script=libgcc/./libgcc.map libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o libgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o libgcc/./_ucmpdi2_s.o libgcc/./_clear_cache_s.o libgcc/./_enable_execute_stack_s.o libgcc/./_trampoline_s.o libgcc/./__main_s.o libgcc/./_absvsi2_s.o libgcc/./_absvdi2_s.o libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o libgcc/./_subvsi3_s.o libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvdi3_s.o libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o libgcc/./_ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o libgcc/./_clzsi2_s.o libgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/./_powixf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/./_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfsi_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixunssfdi_s.o libgcc/./_floatdisf_s.o libgcc/./_floatundisf_s.o libgcc/./_fixdfdi_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_floatdidf_s.o libgcc/./_floatundidf_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixunsxfdi_s.o libgcc/./_floatdixf_s.o libgcc/./_floatundixf_s.o libgcc/./_fixtfdi_s.o libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o libgcc/./_floatunditf_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_udivmoddi4_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-glibc_s.o libgcc/./unwind-sjlj_s.o libgcc/./gthr-gnat_s.o libgcc/./unwind-c_s.o -lc /home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/crtendS.o *crtn.o* /usr/local/bin/ld: error: cannot open crti.o: error: cannot open crtn.o: collect2: ld returned 1 exit status I wonder why open64 only rebuild crtendS.o, crtendBeginS.o ..... but do not rebuild crti.o, crtn.o? I tried to find out the correct path of crtn.o crti.o by step below: nancy@nancy-ThinkPad-T61:*~/work/build-open64-svn$ grep "crtn.o" . -rn* ./osprey/cygnus/ld/Makefile:177:HOSTING_LIBS = -L`dirname \`${CC} --print-file-name=libc.so\`` `if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; echo --start-group $libgcc -lc --end-group` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o` ./osprey/cygnus/ld/config.log:82: /usr/lib/gcc/i686-linux-gnu/4.8/collect2 --sysroot=/ --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu --as-needed -shared -z relro -o conftest /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crti.o /usr/lib/gcc/i686-linux-gnu/4.8/crtbeginS.o -L/usr/lib/gcc/i686-linux-gnu/4.8 -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.8/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/4.8/../../.. conftest.o -soname conftest -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-linux-gnu/4.8/crtendS.o /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/crtn.o ./osprey/cygnus/ld/config.status:129:s%@HOSTING_LIBS@%-L`dirname \`${CC} --print-file-name=libc.so\`` `if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; echo --start-group $libgcc -lc --end-group` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`%g ..... Compile successed by manually adding path "/usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/" in front of crti.o and crtn.o in the command line. I don't known where to add it to take effect the whole project. On Sat, Aug 23, 2014 at 11:50 AM, David Coakley <dco...@gm...> wrote: > The linker issue is due to a bug in the way we find the path to the CRT > object files (crti.o, etc.). We were assuming that if /usr/lib64 exists, > that's where we would find the 64-bit versions. On Ubuntu 14.04, there is > a /usr/lib64, but that is not where the CRT object files live. > > Here is the proposed fix (the change is just to the test after the 'elif'): > > Index: osprey-gcc-4.2.0/gcc/config/i386/t-linux64 > =================================================================== > --- osprey-gcc-4.2.0/gcc/config/i386/t-linux64 (revision 4115) > +++ osprey-gcc-4.2.0/gcc/config/i386/t-linux64 (working copy) > @@ -6,7 +6,7 @@ > > MULTILIB_OPTIONS = m64/m32 > MULTILIB_DIRNAMES = 64 32 > -MULTILIB_OSDIRNAMES = $(shell if file /usr/lib/crti.o -Lb |fgrep "ELF > 32-bit" >/dev/null ; then echo "../lib64 ../lib"; elif [ -d /usr/lib64 ] > ; then echo "../lib64 ../lib32" ; else echo "../lib/x86_64-linux-gnu > ../lib32" ; fi) > +MULTILIB_OSDIRNAMES = $(shell if file /usr/lib/crti.o -Lb |fgrep "ELF > 32-bit" >/dev/null ; then echo "../lib64 ../lib"; elif [ -f > /usr/lib64/crti.o ] ; then echo "../lib64 ../lib32" ; else echo > "../lib/x86_64-linux-gnu ../lib32" ; fi) > > LIBGCC = stmp-multilib > INSTALL_LIBGCC = install-multilib > > > > On Fri, Aug 22, 2014 at 1:27 AM, Nancy <nan...@gm...> wrote: > >> On Fri, Aug 22, 2014 at 2:46 PM, David Coakley <dco...@gm...> >> wrote: >> > There was a change to the way that siginfo is defined. I was able to >> build >> > on Fedora 19 (gcc 4.8.3) with the following change: >> > >> > Index: osprey-gcc-4.2.0/gcc/config/i386/linux-unwind.h >> > =================================================================== >> > --- osprey-gcc-4.2.0/gcc/config/i386/linux-unwind.h (revision 4114) >> > +++ osprey-gcc-4.2.0/gcc/config/i386/linux-unwind.h (working copy) >> > @@ -137,9 +137,17 @@ >> > { >> > struct rt_sigframe { >> > int sig; >> > +#ifdef __have_siginfo_t >> > + siginfo_t *pinfo; >> > +#else >> > struct siginfo *pinfo; >> > +#endif >> > void *puc; >> > +#ifdef __have_siginfo_t >> > + siginfo_t info; >> > +#else >> > struct siginfo info; >> > +#endif >> > struct ucontext uc; >> > } *rt_ = context->cfa; >> > /* The void * cast is necessary to avoid an aliasing warning. >> > >> > >> > If it helps, I can check that in to the trunk as well. >> > >> Hi David, >> >> Your patch works for me again :) Thanks a lot! >> >> New linker issue: >> /home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/xgcc >> -B/home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc/ >> -m32 >> -B/home/nancy/toolchains/open64/open64-gcc-4.2.0/x86_64-redhat-linux/bin/ >> -B/home/nancy/toolchains/open64/open64-gcc-4.2.0/x86_64-redhat-linux/lib/ >> -isystem >> /home/nancy/toolchains/open64/open64-gcc-4.2.0/x86_64-redhat-linux/include >> -isystem >> /home/nancy/toolchains/open64/open64-gcc-4.2.0/x86_64-redhat-linux/sys-include >> -O2 -O2 -O0 -g -DIs_True_On -DTARG_X8664 -DIN_GCC -W -Wall >> -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes >> -Wold-style-definition -isystem ./include -fPIC -g >> -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared >> -nodefaultlibs -Wl,--soname=libgcc_s.so.1 >> -Wl,--version-script=libgcc/./libgcc.map -o ./libgcc_s.so.1.tmp >> libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o >> libgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o >> libgcc/./_ucmpdi2_s.o libgcc/./_clear_cache_s.o >> libgcc/./_enable_execute_stack_s.o libgcc/./_trampoline_s.o >> libgcc/./__main_s.o libgcc/./_absvsi2_s.o libgcc/./_absvdi2_s.o >> libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o libgcc/./_subvsi3_s.o >> libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvdi3_s.o >> libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o >> libgcc/./_ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o >> libgcc/./_clzsi2_s.o libgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o >> libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.o >> libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o >> libgcc/./_paritysi2_s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o >> libgcc/./_powidf2_s.o libgcc/./_powixf2_s.o libgcc/./_powitf2_s.o >> libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/./_mulxc3_s.o >> libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o >> libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_fixunssfsi_s.o >> libgcc/./_fixunsdfsi_s.o libgcc/./_fixunsxfsi_s.o >> libgcc/./_fixsfdi_s.o libgcc/./_fixunssfdi_s.o libgcc/./_floatdisf_s.o >> libgcc/./_floatundisf_s.o libgcc/./_fixdfdi_s.o >> libgcc/./_fixunsdfdi_s.o libgcc/./_floatdidf_s.o >> libgcc/./_floatundidf_s.o libgcc/./_fixxfdi_s.o >> libgcc/./_fixunsxfdi_s.o libgcc/./_floatdixf_s.o >> libgcc/./_floatundixf_s.o libgcc/./_fixtfdi_s.o >> libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o >> libgcc/./_floatunditf_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o >> libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o >> libgcc/./_udivmoddi4_s.o libgcc/./unwind-dw2_s.o >> libgcc/./unwind-dw2-fde-glibc_s.o libgcc/./unwind-sjlj_s.o >> libgcc/./gthr-gnat_s.o libgcc/./unwind-c_s.o -lc && rm -f >> ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 >> ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp >> ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so >> /usr/local/bin/ld: error: cannot open crti.o: 没有那个文件或目录(file or folder >> do not exist) >> /usr/local/bin/ld: error: cannot open crtn.o: 没有那个文件或目录(file or folder >> do not exist) >> collect2: ld returned 1 exit status >> make[5]: *** [libgcc_s.so] 错误 1 >> make[5]:正在离开目录 >> `/home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc' >> make[4]: *** [stmp-multilib] 错误 2 >> make[4]:正在离开目录 >> `/home/nancy/work/build-open64-svn/osprey-gcc-4.2.0/host-unknown/gcc' >> make[3]: *** [all-gcc] 错误 2 >> make[3]:正在离开目录 `/home/nancy/work/build-open64-svn/osprey-gcc-4.2.0' >> make[2]: *** [all] 错误 2 >> make[2]:正在离开目录 `/home/nancy/work/build-open64-svn/osprey-gcc-4.2.0' >> make[1]: *** [cc1] 错误 2 >> make[1]:正在离开目录 `/home/nancy/work/build-open64-svn' >> make: *** [build] 错误 2 >> >> >> >> -- >> Best Regards, >> Yu Rong Tan >> > > -- Best Regards, Yu Rong Tan |