Re: [Open64-devel] trunk 2722 build error on x86/linux
Brought to you by:
ributzka,
suneeljain
From: Wu Y. <wuy...@gm...> - 2009-12-30 14:36:52
|
I had tried to download gcc 4.2.0 and build it on a debian 4.0 machine using the following command $ ./configure --enable-languages=c,c++ ; make I can staill see the following warning /usr/bin/ld: warning: i386:x86-64 architecture of input file `/usr/lib/../lib/crti.o' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `/usr/lib/../lib/crtn.o' is incompatible with i386 output so, I think it's the gcc's bug. I do not have the latest ubuntu system, would you please down load a gcc 4.2 and build it on your system? I think we should change the gcc 4.2.0 front end. 2009/12/30 Jiangzhou HE <hej...@gm...> > I tried to remove --host=x86_64-redhat-linux, but it doesn't help. > > Thanks. > > > On Wed, Dec 30, 2009 at 10:55 AM, Wu Yongchong <wuy...@gm...>wrote: > >> I think I find the problem , see file >> $ tail -n 1 osprey-gcc-4.2.0/targx8664_x8664/CONFIGURE >> CC='gcc -m64 -DTARG_X8664' ../configure --prefix=/open64-gcc-4.2.0 >> --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-bootstrap >> --disable-libmudflap --disable-libssp --enable-threads=posix >> --disable-checking --enable-tls --with-system-zlib --enable-__cxa_atexit >> --host=x86_64-redhat-linux >> >> we can see the the configure file assume the host is a redhat linux which >> come with a 32bit crti.o and crtn.o. >> >> >> 2009/12/30 Sun Chan <sun...@gm...> >> >> if ubuntu and debian standard distribution does not come with 32bit >>> lib inside that directory, the compiler installation should take care >>> of that (assuming it won't cause problems for other programs and >>> packages). To require specific users to install 32bit lib is just a >>> workaround, not a "solution" from a compiler release/QA point of view. >>> Sun >>> >>> On Tue, Dec 29, 2009 at 6:44 PM, Handong Ye <yeh...@gm...> wrote: >>> > All Jiangzhou He needs is to install a 32bit library, and it's just >>> > one simple command. >>> > >>> > We don't have to make things complicated. >>> > >>> > On Tue, Dec 29, 2009 at 7:29 AM, Wu Yongchong <wuy...@gm...> >>> wrote: >>> >> I find that in suse x86_64 system, there are both 32bit and 64bit >>> crti.o >>> >> in /usr/lib and /usr/lib64 but there is only one 64bit crti.o in >>> debian and >>> >> ubuntu x86_64 system that locates in /usr/lib. >>> >> Do we really need crti.o and crtn.o when building libgcc_s.so. >>> >> Maybe the command should use the system gcc instead of xgcc for >>> linking >>> >> libgcc_s.so , or change the source to make xgcc do not link crit.o and >>> >> crin.o . >>> >> >>> >> 2009/12/29 Wu Yongchong <wuy...@gm...> >>> >>> >>> >>> /usr/lib/crti.o is a 64bit object in debian and ubuntu system, but >>> the >>> >>> command build a 32bit object. >>> >>> I have check my machine, that is the same. But it can pass in my >>> machine, >>> >>> just give me some warning, >>> >>> ld: warning: i386:x86-64 architecture of input file >>> >>> `/usr/lib/../lib/crti.o' is incompatible with i386 output >>> >>> It looks like ld2.20 treat the warning as an error. >>> >>> >>> >>> 2009/12/29 Sun Chan <sun...@gm...> >>> >>>> >>> >>>> do a file or elfdump with `/usr/lib/../lib/crti.o' should tell you >>> want >>> >>>> is wrong >>> >>>> Sun >>> >>>> >>> >>>> On Tue, Dec 29, 2009 at 1:42 AM, Jiangzhou HE < >>> hej...@gm...> >>> >>>> wrote: >>> >>>> > My linux release version and ld version: >>> >>>> > hjz@hjz-lab:~$ cat /proc/version >>> >>>> > Linux version 2.6.31-16-generic (buildd@crested) (gcc version >>> 4.4.1 >>> >>>> > (Ubuntu >>> >>>> > 4.4.1-4ubuntu8) ) #53-Ubuntu SMP Tue Dec 8 04:02:15 UTC 2009 >>> >>>> > hjz@hjz-lab:~$ ld --version >>> >>>> > GNU ld (GNU Binutils for Ubuntu) 2.20 >>> >>>> > Copyright 2009 Free Software Foundation, Inc. >>> >>>> > This program is free software; you may redistribute it under the >>> terms >>> >>>> > of >>> >>>> > the GNU General Public License version 3 or (at your option) a >>> later >>> >>>> > version. >>> >>>> > This program has absolutely no warranty. >>> >>>> > >>> >>>> > The result of the command: >>> >>>> > >>> >>>> > hjz@hjz-lab >>> :~/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/gcc$ >>> >>>> > ./xgcc >>> >>>> > >>> >>>> > >>> -B/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/ >>> >>>> > -B/open64-gcc-4.2.0/x86_64-redhat-linux/bin/ >>> >>>> > -B/open64-gcc-4.2.0/x86_64-redhat-linux/lib/ -isystem >>> >>>> > /open64-gcc-4.2.0/x86_64-redhat-linux/include -isystem >>> >>>> > /open64-gcc-4.2.0/x86_64-redhat-linux/sys-include -O2 -O2 -O0 -g >>> >>>> > -DIs_True_On -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/32/libgcc.map -o 32/libgcc_s.so.1.tmp >>> -m32 >>> >>>> > libgcc/32/_muldi3_s.o libgcc/32/_negdi2_s.o libgcc/32/_lshrdi3_s.o >>> >>>> > libgcc/32/_ashldi3_s.o libgcc/32/_ashrdi3_s.o >>> libgcc/32/_cmpdi2_s.o >>> >>>> > libgcc/32/_ucmpdi2_s.o libgcc/32/_clear_cache_s.o >>> >>>> > libgcc/32/_enable_execute_stack_s.o libgcc/32/_trampoline_s.o >>> >>>> > libgcc/32/__main_s.o libgcc/32/_absvsi2_s.o libgcc/32/_absvdi2_s.o >>> >>>> > libgcc/32/_addvsi3_s.o libgcc/32/_addvdi3_s.o >>> libgcc/32/_subvsi3_s.o >>> >>>> > libgcc/32/_subvdi3_s.o libgcc/32/_mulvsi3_s.o >>> libgcc/32/_mulvdi3_s.o >>> >>>> > libgcc/32/_negvsi2_s.o libgcc/32/_negvdi2_s.o libgcc/32/_ctors_s.o >>> >>>> > libgcc/32/_ffssi2_s.o libgcc/32/_ffsdi2_s.o libgcc/32/_clz_s.o >>> >>>> > libgcc/32/_clzsi2_s.o libgcc/32/_clzdi2_s.o libgcc/32/_ctzsi2_s.o >>> >>>> > libgcc/32/_ctzdi2_s.o libgcc/32/_popcount_tab_s.o >>> >>>> > libgcc/32/_popcountsi2_s.o >>> >>>> > libgcc/32/_popcountdi2_s.o libgcc/32/_paritysi2_s.o >>> >>>> > libgcc/32/_paritydi2_s.o >>> >>>> > libgcc/32/_powisf2_s.o libgcc/32/_powidf2_s.o >>> libgcc/32/_powixf2_s.o >>> >>>> > libgcc/32/_powitf2_s.o libgcc/32/_mulsc3_s.o libgcc/32/_muldc3_s.o >>> >>>> > libgcc/32/_mulxc3_s.o libgcc/32/_multc3_s.o libgcc/32/_divsc3_s.o >>> >>>> > libgcc/32/_divdc3_s.o libgcc/32/_divxc3_s.o libgcc/32/_divtc3_s.o >>> >>>> > libgcc/32/_fixunssfsi_s.o libgcc/32/_fixunsdfsi_s.o >>> >>>> > libgcc/32/_fixunsxfsi_s.o libgcc/32/_fixsfdi_s.o >>> >>>> > libgcc/32/_fixunssfdi_s.o >>> >>>> > libgcc/32/_floatdisf_s.o libgcc/32/_floatundisf_s.o >>> >>>> > libgcc/32/_fixdfdi_s.o >>> >>>> > libgcc/32/_fixunsdfdi_s.o libgcc/32/_floatdidf_s.o >>> >>>> > libgcc/32/_floatundidf_s.o libgcc/32/_fixxfdi_s.o >>> >>>> > libgcc/32/_fixunsxfdi_s.o >>> >>>> > libgcc/32/_floatdixf_s.o libgcc/32/_floatundixf_s.o >>> >>>> > libgcc/32/_fixtfdi_s.o >>> >>>> > libgcc/32/_fixunstfdi_s.o libgcc/32/_floatditf_s.o >>> >>>> > libgcc/32/_floatunditf_s.o libgcc/32/_divdi3_s.o >>> libgcc/32/_moddi3_s.o >>> >>>> > libgcc/32/_udivdi3_s.o libgcc/32/_umoddi3_s.o >>> >>>> > libgcc/32/_udiv_w_sdiv_s.o >>> >>>> > libgcc/32/_udivmoddi4_s.o libgcc/32/unwind-dw2_s.o >>> >>>> > libgcc/32/unwind-dw2-fde-glibc_s.o libgcc/32/unwind-sjlj_s.o >>> >>>> > libgcc/32/gthr-gnat_s.o libgcc/32/unwind-c_s.o -lc -v >>> >>>> > Reading specs from >>> >>>> > >>> >>>> > >>> /home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/specs >>> >>>> > Target: x86_64-redhat-linux >>> >>>> > Configured with: ../configure --prefix=/open64-gcc-4.2.0 >>> --with-gnu-as >>> >>>> > --with-gnu-ld --enable-languages=c,c++ --disable-bootstrap >>> >>>> > --disable-libmudflap --disable-libssp --enable-threads=posix >>> >>>> > --disable-checking --enable-tls --with-system-zlib >>> >>>> > --enable-__cxa_atexit >>> >>>> > --host=x86_64-redhat-linux >>> >>>> > Thread model: posix >>> >>>> > gcc version 4.2.0 >>> >>>> > >>> >>>> > >>> /home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/collect2 >>> >>>> > --eh-frame-hdr -m elf_i386 -shared -o 32/libgcc_s.so.1.tmp >>> >>>> > /usr/lib/../lib/crti.o >>> >>>> > >>> >>>> > >>> /home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/32/crtbeginS.o >>> >>>> > >>> >>>> > >>> -L/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/32 >>> >>>> > -L/lib/../lib -L/usr/lib/../lib >>> >>>> > >>> >>>> > >>> -L/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc >>> >>>> > --soname=libgcc_s.so.1 --version-script=libgcc/32/libgcc.map >>> >>>> > libgcc/32/_muldi3_s.o libgcc/32/_negdi2_s.o libgcc/32/_lshrdi3_s.o >>> >>>> > libgcc/32/_ashldi3_s.o libgcc/32/_ashrdi3_s.o >>> libgcc/32/_cmpdi2_s.o >>> >>>> > libgcc/32/_ucmpdi2_s.o libgcc/32/_clear_cache_s.o >>> >>>> > libgcc/32/_enable_execute_stack_s.o libgcc/32/_trampoline_s.o >>> >>>> > libgcc/32/__main_s.o libgcc/32/_absvsi2_s.o libgcc/32/_absvdi2_s.o >>> >>>> > libgcc/32/_addvsi3_s.o libgcc/32/_addvdi3_s.o >>> libgcc/32/_subvsi3_s.o >>> >>>> > libgcc/32/_subvdi3_s.o libgcc/32/_mulvsi3_s.o >>> libgcc/32/_mulvdi3_s.o >>> >>>> > libgcc/32/_negvsi2_s.o libgcc/32/_negvdi2_s.o libgcc/32/_ctors_s.o >>> >>>> > libgcc/32/_ffssi2_s.o libgcc/32/_ffsdi2_s.o libgcc/32/_clz_s.o >>> >>>> > libgcc/32/_clzsi2_s.o libgcc/32/_clzdi2_s.o libgcc/32/_ctzsi2_s.o >>> >>>> > libgcc/32/_ctzdi2_s.o libgcc/32/_popcount_tab_s.o >>> >>>> > libgcc/32/_popcountsi2_s.o >>> >>>> > libgcc/32/_popcountdi2_s.o libgcc/32/_paritysi2_s.o >>> >>>> > libgcc/32/_paritydi2_s.o >>> >>>> > libgcc/32/_powisf2_s.o libgcc/32/_powidf2_s.o >>> libgcc/32/_powixf2_s.o >>> >>>> > libgcc/32/_powitf2_s.o libgcc/32/_mulsc3_s.o libgcc/32/_muldc3_s.o >>> >>>> > libgcc/32/_mulxc3_s.o libgcc/32/_multc3_s.o libgcc/32/_divsc3_s.o >>> >>>> > libgcc/32/_divdc3_s.o libgcc/32/_divxc3_s.o libgcc/32/_divtc3_s.o >>> >>>> > libgcc/32/_fixunssfsi_s.o libgcc/32/_fixunsdfsi_s.o >>> >>>> > libgcc/32/_fixunsxfsi_s.o libgcc/32/_fixsfdi_s.o >>> >>>> > libgcc/32/_fixunssfdi_s.o >>> >>>> > libgcc/32/_floatdisf_s.o libgcc/32/_floatundisf_s.o >>> >>>> > libgcc/32/_fixdfdi_s.o >>> >>>> > libgcc/32/_fixunsdfdi_s.o libgcc/32/_floatdidf_s.o >>> >>>> > libgcc/32/_floatundidf_s.o libgcc/32/_fixxfdi_s.o >>> >>>> > libgcc/32/_fixunsxfdi_s.o >>> >>>> > libgcc/32/_floatdixf_s.o libgcc/32/_floatundixf_s.o >>> >>>> > libgcc/32/_fixtfdi_s.o >>> >>>> > libgcc/32/_fixunstfdi_s.o libgcc/32/_floatditf_s.o >>> >>>> > libgcc/32/_floatunditf_s.o libgcc/32/_divdi3_s.o >>> libgcc/32/_moddi3_s.o >>> >>>> > libgcc/32/_udivdi3_s.o libgcc/32/_umoddi3_s.o >>> >>>> > libgcc/32/_udiv_w_sdiv_s.o >>> >>>> > libgcc/32/_udivmoddi4_s.o libgcc/32/unwind-dw2_s.o >>> >>>> > libgcc/32/unwind-dw2-fde-glibc_s.o libgcc/32/unwind-sjlj_s.o >>> >>>> > libgcc/32/gthr-gnat_s.o libgcc/32/unwind-c_s.o -lc >>> >>>> > >>> >>>> > >>> /home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/32/crtendS.o >>> >>>> > /usr/lib/../lib/crtn.o >>> >>>> > /usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when >>> >>>> > searching >>> >>>> > for -lc >>> >>>> > /usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when >>> >>>> > searching for >>> >>>> > -lc >>> >>>> > /usr/bin/ld: i386:x86-64 architecture of input file >>> >>>> > `/usr/lib/../lib/crti.o' >>> >>>> > is incompatible with i386 output >>> >>>> > /usr/bin/ld: i386:x86-64 architecture of input file >>> >>>> > `/usr/lib/../lib/crtn.o' >>> >>>> > is incompatible with i386 output >>> >>>> > /usr/bin/ld: final link failed: Invalid operation >>> >>>> > collect2: ld returned 1 exit status >>> >>>> > >>> >>>> > Thank you very much! >>> >>>> > >>> >>>> > 2009/12/29 Wu Yongchong <wuy...@gm...> >>> >>>> >> >>> >>>> >> Hi, Jiangzhou, >>> >>>> >> I can not reproduce your error in debian 64bit system. >>> >>>> >> can you give me more clue? >>> >>>> >> what is the linux release version? >>> >>>> >> what is you ld version ? >>> >>>> >> >>> >>>> >> My ld version is >>> >>>> >> >>> >>>> >> $ /usr/bin/ld --version >>> >>>> >> GNU ld version 2.17 Debian GNU/Linux >>> >>>> >> >>> >>>> >> >>> >>>> >> can you go to the directory >>> >>>> >> >>> /home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/gcc >>> >>>> >> and run the following command then give me the result >>> >>>> >> >>> >>>> >> ./xgcc >>> >>>> >> >>> >>>> >> >>> -B/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/ >>> >>>> >> -B/open64-gcc-4.2.0/x86_64-redhat-linux/bin/ >>> >>>> >> -B/open64-gcc-4.2.0/x86_64-redhat-linux/lib/ -isystem >>> >>>> >> /open64-gcc-4.2.0/x86_64-redhat-linux/include -isystem >>> >>>> >> /open64-gcc-4.2.0/x86_64-redhat-linux/sys-include -O2 -O2 -O0 -g >>> >>>> >> -DIs_True_On -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/32/libgcc.map -o 32/libgcc_s.so.1.tmp >>> >>>> >> -m32 >>> >>>> >> libgcc/32/_muldi3_s.o libgcc/32/_negdi2_s.o >>> libgcc/32/_lshrdi3_s.o >>> >>>> >> libgcc/32/_ashldi3_s.o libgcc/32/_ashrdi3_s.o >>> libgcc/32/_cmpdi2_s.o >>> >>>> >> libgcc/32/_ucmpdi2_s.o libgcc/32/_clear_cache_s.o >>> >>>> >> libgcc/32/_enable_execute_stack_s.o libgcc/32/_trampoline_s.o >>> >>>> >> libgcc/32/__main_s.o libgcc/32/_absvsi2_s.o >>> libgcc/32/_absvdi2_s.o >>> >>>> >> libgcc/32/_addvsi3_s.o libgcc/32/_addvdi3_s.o >>> libgcc/32/_subvsi3_s.o >>> >>>> >> libgcc/32/_subvdi3_s.o libgcc/32/_mulvsi3_s.o >>> libgcc/32/_mulvdi3_s.o >>> >>>> >> libgcc/32/_negvsi2_s.o libgcc/32/_negvdi2_s.o >>> libgcc/32/_ctors_s.o >>> >>>> >> libgcc/32/_ffssi2_s.o libgcc/32/_ffsdi2_s.o libgcc/32/_clz_s.o >>> >>>> >> libgcc/32/_clzsi2_s.o libgcc/32/_clzdi2_s.o libgcc/32/_ctzsi2_s.o >>> >>>> >> libgcc/32/_ctzdi2_s.o libgcc/32/_popcount_tab_s.o >>> >>>> >> libgcc/32/_popcountsi2_s.o >>> >>>> >> libgcc/32/_popcountdi2_s.o libgcc/32/_paritysi2_s.o >>> >>>> >> libgcc/32/_paritydi2_s.o >>> >>>> >> libgcc/32/_powisf2_s.o libgcc/32/_powidf2_s.o >>> libgcc/32/_powixf2_s.o >>> >>>> >> libgcc/32/_powitf2_s.o libgcc/32/_mulsc3_s.o >>> libgcc/32/_muldc3_s.o >>> >>>> >> libgcc/32/_mulxc3_s.o libgcc/32/_multc3_s.o libgcc/32/_divsc3_s.o >>> >>>> >> libgcc/32/_divdc3_s.o libgcc/32/_divxc3_s.o libgcc/32/_divtc3_s.o >>> >>>> >> libgcc/32/_fixunssfsi_s.o libgcc/32/_fixunsdfsi_s.o >>> >>>> >> libgcc/32/_fixunsxfsi_s.o libgcc/32/_fixsfdi_s.o >>> >>>> >> libgcc/32/_fixunssfdi_s.o >>> >>>> >> libgcc/32/_floatdisf_s.o libgcc/32/_floatundisf_s.o >>> >>>> >> libgcc/32/_fixdfdi_s.o >>> >>>> >> libgcc/32/_fixunsdfdi_s.o libgcc/32/_floatdidf_s.o >>> >>>> >> libgcc/32/_floatundidf_s.o libgcc/32/_fixxfdi_s.o >>> >>>> >> libgcc/32/_fixunsxfdi_s.o >>> >>>> >> libgcc/32/_floatdixf_s.o libgcc/32/_floatundixf_s.o >>> >>>> >> libgcc/32/_fixtfdi_s.o >>> >>>> >> libgcc/32/_fixunstfdi_s.o libgcc/32/_floatditf_s.o >>> >>>> >> libgcc/32/_floatunditf_s.o libgcc/32/_divdi3_s.o >>> libgcc/32/_moddi3_s.o >>> >>>> >> libgcc/32/_udivdi3_s.o libgcc/32/_umoddi3_s.o >>> >>>> >> libgcc/32/_udiv_w_sdiv_s.o >>> >>>> >> libgcc/32/_udivmoddi4_s.o libgcc/32/unwind-dw2_s.o >>> >>>> >> libgcc/32/unwind-dw2-fde-glibc_s.o libgcc/32/unwind-sjlj_s.o >>> >>>> >> libgcc/32/gthr-gnat_s.o libgcc/32/unwind-c_s.o -lc -v >>> >>>> >> >>> >>>> >> 2009/12/28 Jiangzhou HE <hej...@gm...> >>> >>>> >>> >>> >>>> >>> I'm using a x86_64 system, but I still encounters some problems >>> while >>> >>>> >>> building the frontend. Here is my error message: >>> >>>> >>> >>> >>>> >>> >>> >>>> >>> >>> >>>> >>> >>> /home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/xgcc >>> >>>> >>> >>> >>>> >>> >>> -B/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/./gcc/ >>> >>>> >>> -B/ope\ >>> >>>> >>> n64-gcc-4.2.0/x86_64-redhat-linux/bin/ >>> >>>> >>> -B/open64-gcc-4.2.0/x86_64-redhat-linux/lib/ -isystem >>> >>>> >>> /open64-gcc-4.2.0/x86_64-redhat-linux/include -isystem /open64-\ >>> >>>> >>> gcc-4.2.0/x86_64-redhat-linux/sys-include -O2 -O2 -O0 -g >>> >>>> >>> -DIs_True_On >>> >>>> >>> -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/32/libgcc.map -o >>> 32/libgcc_s.so.1.tmp >>> >>>> >>> -m32 >>> >>>> >>> libgcc/32/_muldi3_s.o libgcc/32/_negdi2_s.o >>> libgcc/32/_lshrdi3_s.o >>> >>>> >>> libgcc/32/_ashldi\ >>> >>>> >>> 3_s.o libgcc/32/_ashrdi3_s.o libgcc/32/_cmpdi2_s.o >>> >>>> >>> libgcc/32/_ucmpdi2_s.o >>> >>>> >>> libgcc/32/_clear_cache_s.o libgcc/32/_enable_execute_stack_s.o >>> >>>> >>> libgcc/32/_trampoli\ >>> >>>> >>> ne_s.o libgcc/32/__main_s.o libgcc/32/_absvsi2_s.o >>> >>>> >>> libgcc/32/_absvdi2_s.o >>> >>>> >>> libgcc/32/_addvsi3_s.o libgcc/32/_addvdi3_s.o >>> libgcc/32/_subvsi3_s.o >>> >>>> >>> libgcc/32/_su\ >>> >>>> >>> bvdi3_s.o libgcc/32/_mulvsi3_s.o libgcc/32/_mulvdi3_s.o >>> >>>> >>> libgcc/32/_negvsi2_s.o libgcc/32/_negvdi2_s.o >>> libgcc/32/_ctors_s.o >>> >>>> >>> libgcc/32/_ffssi2_s.o libgcc/32/_\ >>> >>>> >>> ffsdi2_s.o libgcc/32/_clz_s.o libgcc/32/_clzsi2_s.o >>> >>>> >>> libgcc/32/_clzdi2_s.o >>> >>>> >>> libgcc/32/_ctzsi2_s.o libgcc/32/_ctzdi2_s.o >>> >>>> >>> libgcc/32/_popcount_tab_s.o >>> >>>> >>> libgcc/32/\ >>> >>>> >>> _popcountsi2_s.o libgcc/32/_popcountdi2_s.o >>> libgcc/32/_paritysi2_s.o >>> >>>> >>> libgcc/32/_paritydi2_s.o libgcc/32/_powisf2_s.o >>> >>>> >>> libgcc/32/_powidf2_s.o >>> >>>> >>> libgcc/32/_powix\ >>> >>>> >>> f2_s.o libgcc/32/_powitf2_s.o libgcc/32/_mulsc3_s.o >>> >>>> >>> libgcc/32/_muldc3_s.o >>> >>>> >>> libgcc/32/_mulxc3_s.o libgcc/32/_multc3_s.o >>> libgcc/32/_divsc3_s.o >>> >>>> >>> libgcc/32/_divdc\ >>> >>>> >>> 3_s.o libgcc/32/_divxc3_s.o libgcc/32/_divtc3_s.o >>> >>>> >>> libgcc/32/_fixunssfsi_s.o libgcc/32/_fixunsdfsi_s.o >>> >>>> >>> libgcc/32/_fixunsxfsi_s.o libgcc/32/_fixsfdi_s.o libgc\ >>> >>>> >>> c/32/_fixunssfdi_s.o libgcc/32/_floatdisf_s.o >>> >>>> >>> libgcc/32/_floatundisf_s.o >>> >>>> >>> libgcc/32/_fixdfdi_s.o libgcc/32/_fixunsdfdi_s.o >>> >>>> >>> libgcc/32/_floatdidf_s.o >>> >>>> >>> libgcc/32\ >>> >>>> >>> /_floatundidf_s.o libgcc/32/_fixxfdi_s.o >>> libgcc/32/_fixunsxfdi_s.o >>> >>>> >>> libgcc/32/_floatdixf_s.o libgcc/32/_floatundixf_s.o >>> >>>> >>> libgcc/32/_fixtfdi_s.o >>> >>>> >>> libgcc/32/_fix\ >>> >>>> >>> unstfdi_s.o libgcc/32/_floatditf_s.o libgcc/32/_floatunditf_s.o >>> >>>> >>> libgcc/32/_divdi3_s.o libgcc/32/_moddi3_s.o >>> libgcc/32/_udivdi3_s.o >>> >>>> >>> libgcc/32/_umoddi3_s.o li\ >>> >>>> >>> bgcc/32/_udiv_w_sdiv_s.o libgcc/32/_udivmoddi4_s.o >>> >>>> >>> libgcc/32/unwind-dw2_s.o libgcc/32/unwind-dw2-fde-glibc_s.o >>> >>>> >>> libgcc/32/unwind-sjlj_s.o libgcc/32/gthr-gnat\ >>> >>>> >>> _s.o libgcc/32/unwind-c_s.o -lc && rm -f 32/libgcc_s.so && if [ >>> -f >>> >>>> >>> 32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1 >>> >>>> >>> 32/libgcc_s.so.1.backup; >>> >>>> >>> else true; fi &&\ >>> >>>> >>> mv 32/libgcc_s.so.1.tmp 32/libgcc_s.so.1 && ln -s libgcc_s.so.1 >>> >>>> >>> 32/libgcc_s.so >>> >>>> >>> /usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.so when >>> >>>> >>> searching >>> >>>> >>> for -lc >>> >>>> >>> /usr/bin/ld: skipping incompatible /usr/lib/../lib/libc.a when >>> >>>> >>> searching >>> >>>> >>> for -lc >>> >>>> >>> /usr/bin/ld: i386:x86-64 architecture of input file >>> >>>> >>> `/usr/lib/../lib/crti.o' is incompatible with i386 output >>> >>>> >>> /usr/bin/ld: i386:x86-64 architecture of input file >>> >>>> >>> `/usr/lib/../lib/crtn.o' is incompatible with i386 output >>> >>>> >>> /usr/bin/ld: final link failed: Invalid operation >>> >>>> >>> collect2: ld returned 1 exit status >>> >>>> >>> make[5]: *** [32/libgcc_s.so] Error 1 >>> >>>> >>> make[5]: Leaving directory >>> >>>> >>> >>> >>>> >>> >>> `/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/gcc' >>> >>>> >>> make[4]: *** [stmp-multilib] Error 2 >>> >>>> >>> make[4]: Leaving directory >>> >>>> >>> >>> >>>> >>> >>> `/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664/gcc' >>> >>>> >>> make[3]: *** [all-gcc] Error 2 >>> >>>> >>> make[3]: Leaving directory >>> >>>> >>> >>> `/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664' >>> >>>> >>> make[2]: *** [all] Error 2 >>> >>>> >>> make[2]: Leaving directory >>> >>>> >>> >>> `/home/hjz/work/open64/git-trunk/osprey-gcc-4.2.0/targx8664_x8664' >>> >>>> >>> make[1]: *** [osprey-gcc-4.2.0/targx8664_x8664/gcc/cc1] Error 2 >>> >>>> >>> make[1]: Leaving directory `/home/hjz/work/open64/git-trunk' >>> >>>> >>> make: *** [build] Error 2 >>> >>>> >>> make: Leaving directory `/home/hjz/work/open64/git-trunk' >>> >>>> >>> >>> >>>> >>> I tried your patch, but it doesn't help. Do you know how to deal >>> with >>> >>>> >>> this problem? >>> >>>> >>> >>> >>>> >>> Thanks. >>> >>>> >>> >>> >>>> >>> 2009/12/23 Wu Yongchong <wuy...@gm...> >>> >>>> >>>> >>> >>>> >>>> Hi, >>> >>>> >>>> The AMD check-in only consider 64bit system, I think they only >>> test >>> >>>> >>>> in >>> >>>> >>>> 64bit machines. When building the gcc4.2 front end and the >>> >>>> >>>> librarys, there >>> >>>> >>>> is a wrong assumption that you are using a 64bit with can build >>> both >>> >>>> >>>> 32bit >>> >>>> >>>> and 64bit library. In fact, if you use i386 system to build >>> open64, >>> >>>> >>>> you can >>> >>>> >>>> not build the 64bit library, I tried to modify the Make file >>> like >>> >>>> >>>> adding >>> >>>> >>>> -m64 flag when building the 64bit targets but finally failt. >>> >>>> >>>> The solution is, do not build the 64bit things at all in a >>> 32bit >>> >>>> >>>> i386 >>> >>>> >>>> system. >>> >>>> >>>> following is my patch. You may meet sevaral segmentation failt >>> when >>> >>>> >>>> use >>> >>>> >>>> this compiler to build the library libfortran.a , change the >>> >>>> >>>> OPTIMIZATION of >>> >>>> >>>> that file from -O3 to -O0 is a work around. >>> >>>> >>>> >>> >>>> >>>> Index: install_compiler.sh >>> >>>> >>>> >>> =================================================================== >>> >>>> >>>> --- install_compiler.sh (revision 2732) >>> >>>> >>>> +++ install_compiler.sh (working copy) >>> >>>> >>>> @@ -39,6 +39,7 @@ >>> >>>> >>>> VER_MINOR="2" >>> >>>> >>>> #PATCH_LEVEL="" >>> >>>> >>>> VERSION="${OPEN64_FULL_VERSION:-${VER_MAJOR}.${VER_MINOR}}" >>> >>>> >>>> +HOST_MACHINE_TYPE=`uname -m` >>> >>>> >>>> >>> >>>> >>>> PREBUILT_LIB="./lib" >>> >>>> >>>> PREBUILT_BIN="./bin" >>> >>>> >>>> @@ -216,7 +217,7 @@ >>> >>>> >>>> INSTALL_EXEC_SUB ${AREA}/g++fe/gfecc ${PHASEPATH}/gfecc >>> >>>> >>>> # GNU 4.2.0 based FE >>> >>>> >>>> INSTALL_EXEC_SUB ${AREA}/wgen_4_2_0/wgen42 >>> ${PHASEPATH}/wgen42 >>> >>>> >>>> - LIBEXEC=libexec/gcc/${PHASE_DIR_PREFIX}-redhat-linux/4.2.0 >>> >>>> >>>> + >>> LIBEXEC=libexec/gcc/${HOST_MACHINE_TYPE}-redhat-linux/4.2.0 >>> >>>> >>>> (cd $PHASEPATH; ln -sf >>> >>>> >>>> ../../../../open64-gcc-4.2.0/${LIBEXEC}/cc1 >>> >>>> >>>> cc142) >>> >>>> >>>> (cd $PHASEPATH; ln -sf >>> >>>> >>>> ../../../../open64-gcc-4.2.0/${LIBEXEC}/cc1plus cc1plus42) >>> >>>> >>>> >>> >>>> >>>> Index: osprey-gcc-4.2.0/targia32_x8664/CONFIGURE >>> >>>> >>>> >>> =================================================================== >>> >>>> >>>> --- osprey-gcc-4.2.0/targia32_x8664/CONFIGURE (revision 2732) >>> >>>> >>>> +++ osprey-gcc-4.2.0/targia32_x8664/CONFIGURE (working copy) >>> >>>> >>>> @@ -37,4 +37,10 @@ >>> >>>> >>>> rm -f ../gcc/gspin-[abilmt]*.h >>> >>>> >>>> >>> >>>> >>>> # configure the osprey-gcc >>> >>>> >>>> -CC='gcc -m32 -DTARG_X8664' ../configure >>> --prefix=/open64-gcc-4.2.0 >>> >>>> >>>> --with-gnu-as --with-gnu-ld --enable-languages=c,c++ >>> >>>> >>>> --disable-bootstrap >>> >>>> >>>> --disable-libmudflap --disable-libssp --enable-threads=posix >>> >>>> >>>> --disable-checking --enable-tls --with-system-zlib >>> >>>> >>>> --enable-__cxa_atexit >>> >>>> >>>> --host=x86_64-redhat-linux >>> >>>> >>>> +host_machine_type=`uname -m` >>> >>>> >>>> +if [ "$host_machine_type" = x86_64 ] >>> >>>> >>>> +then >>> >>>> >>>> + CC='gcc -m32 -DTARG_X8664' ../configure >>> >>>> >>>> --prefix=/open64-gcc-4.2.0 --with-gnu-as --with-gnu-ld >>> >>>> >>>> --enable-languages=c,c++ --disable-bootstrap >>> --disable-libmudflap >>> >>>> >>>> --disable-libssp --enable-threads=posix --disable-checking >>> >>>> >>>> --enable-tls >>> >>>> >>>> --with-system-zlib --enable-__cxa_atexit >>> --host=x86_64-redhat-linux >>> >>>> >>>> +else >>> >>>> >>>> + ../configure --prefix=/open64-gcc-4.2.0 --with-gnu-as >>> >>>> >>>> --with-gnu-ld --enable-languages=c,c++ --disable-bootstrap >>> >>>> >>>> --disable-libmudflap --disable-libssp --enable-threads=posix >>> >>>> >>>> --disable-checking --enable-tls --with-system-zlib >>> >>>> >>>> --enable-__cxa_atexit >>> >>>> >>>> --host=${host_machine_type}-redhat-linux >>> >>>> >>>> +fi >>> >>>> >>>> Index: Makefile >>> >>>> >>>> >>> =================================================================== >>> >>>> >>>> --- Makefile (revision 2732) >>> >>>> >>>> +++ Makefile (working copy) >>> >>>> >>>> @@ -39,6 +39,7 @@ >>> >>>> >>>> # >>> >>>> >>>> >>> >>>> >>>> MACHINE_TYPE = $(shell uname -m | sed -e s/i.86/i386/ ) >>> >>>> >>>> +HOST_MACHINE_TYPE := $(shell uname -m) >>> >>>> >>>> >>> >>>> >>>> ifneq ($(MACHINE_TYPE), ia64) >>> >>>> >>>> ifneq ($(MACHINE_TYPE), x86_64) >>> >>>> >>>> @@ -74,7 +75,7 @@ >>> >>>> >>>> NATIVE_BUILD_DIR = osprey/targia32_x8664 >>> >>>> >>>> NATIVE_BUILD_DIR_LD = osprey/targcygnus_ia32_x8664 >>> >>>> >>>> GNUFE_BUILD_DIR = osprey-gcc-4.2.0/targia32_x8664 >>> >>>> >>>> - GNUFE_BUILD_HOST = x86_64-redhat-linux >>> >>>> >>>> + GNUFE_BUILD_HOST = $(HOST_MACHINE_TYPE)-redhat-linux >>> >>>> >>>> TARGET_EXTRA_OBJ = >>> $(NATIVE_BUILD_DIR)/targ_info/opteron.so >>> >>>> >>>> TARGET_EXTRA_OBJ += $(NATIVE_BUILD_DIR)/targ_info/em64t.so >>> >>>> >>>> LIB_BUILD_DIR = osprey/targia32_builtonia32 >>> >>>> >>>> >>> >>>> >>>> >>> >>>> >>>> 2009/12/23 "C. Bergström" <cbe...@pa...> >>> >>>> >>>>> >>> >>>> >>>>> Yuan DONG wrote: >>> >>>> >>>>>> >>> >>>> >>>>>> But, I still did not find a way to add it into makefile. >>> >>>> >>>>>> Is anybody working on it? >>> >>>> >>>>>> Or is there any clue about it? >>> >>>> >>>>>> >>> >>>> >>>>> >>> >>>> >>>>> hard coded -m64 is not correct, but I think you can CC="cc >>> -m64" or >>> >>>> >>>>> CFLAGS=" -m64 " to work around this >>> >>>> >>>> >>> >>>> >>>> >>> >>>> >>>> >>> >>>> >>>> -- >>> >>>> >>>> yongchong >>> >>>> >>>> >>> >>>> >>>> >>> >>>> >>>> >>> >>>> >>>> >>> ------------------------------------------------------------------------------ >>> >>>> >>>> This SF.Net email is sponsored by the Verizon Developer >>> Community >>> >>>> >>>> Take advantage of Verizon's best-in-class app development >>> support >>> >>>> >>>> A streamlined, 14 day to market process makes app distribution >>> fast >>> >>>> >>>> and >>> >>>> >>>> easy >>> >>>> >>>> Join now and get one step closer to millions of Verizon >>> customers >>> >>>> >>>> http://p.sf.net/sfu/verizon-dev2dev >>> >>>> >>>> _______________________________________________ >>> >>>> >>>> Open64-devel mailing list >>> >>>> >>>> Ope...@li... >>> >>>> >>>> https://lists.sourceforge.net/lists/listinfo/open64-devel >>> >>>> >>>> >>> >>>> >>> >>> >>>> >>> >>> >>>> >>> >>> >>>> >>> -- >>> >>>> >>> Jiangzhou HE (何江舟) >>> >>>> >>> >>> >>>> >>> Institute of High-Performance Computing >>> >>>> >>> Department of Computer Science and Technology >>> >>>> >>> Tsinghua University, Beijing, China >>> >>>> >>> >>> >>>> >> >>> >>>> >> >>> >>>> >> >>> >>>> >> -- >>> >>>> >> yongchong >>> >>>> > >>> >>>> > >>> >>>> > >>> >>>> > -- >>> >>>> > Jiangzhou HE (何江舟) >>> >>>> > >>> >>>> > Institute of High-Performance Computing >>> >>>> > Department of Computer Science and Technology >>> >>>> > Tsinghua University, Beijing, China >>> >>>> > >>> >>>> > >>> >>>> > >>> >>>> > >>> ------------------------------------------------------------------------------ >>> >>>> > This SF.Net email is sponsored by the Verizon Developer Community >>> >>>> > Take advantage of Verizon's best-in-class app development support >>> >>>> > A streamlined, 14 day to market process makes app distribution >>> fast and >>> >>>> > easy >>> >>>> > Join now and get one step closer to millions of Verizon customers >>> >>>> > http://p.sf.net/sfu/verizon-dev2dev >>> >>>> > _______________________________________________ >>> >>>> > Open64-devel mailing list >>> >>>> > Ope...@li... >>> >>>> > https://lists.sourceforge.net/lists/listinfo/open64-devel >>> >>>> > >>> >>>> > >>> >>> >>> >>> >>> >>> >>> >>> -- >>> >>> yongchong >>> >> >>> >> >>> >> >>> >> -- >>> >> yongchong >>> >> >>> >> >>> ------------------------------------------------------------------------------ >>> >> This SF.Net email is sponsored by the Verizon Developer Community >>> >> Take advantage of Verizon's best-in-class app development support >>> >> A streamlined, 14 day to market process makes app distribution fast >>> and easy >>> >> Join now and get one step closer to millions of Verizon customers >>> >> http://p.sf.net/sfu/verizon-dev2dev >>> >> _______________________________________________ >>> >> Open64-devel mailing list >>> >> Ope...@li... >>> >> https://lists.sourceforge.net/lists/listinfo/open64-devel >>> >> >>> >> >>> > >>> > >>> > >>> > -- >>> > Thanks. >>> > Handong >>> > >>> >> >> >> >> -- >> yongchong >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and >> easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Open64-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/open64-devel >> >> > > > -- > Jiangzhou HE (何江舟) > > Institute of High-Performance Computing > Department of Computer Science and Technology > Tsinghua University, Beijing, China > > -- yongchong |