Problem building gcc-4.2.2 on 64-bit ubuntu linux
Thomas Mittelstaedt
T.Mittelstaedt@cadenas.de
Wed Dec 19 16:55:00 GMT 2007
and x86_64-unknown-linux-gnu/32/libmudflap/config.log says:
configure:2308: checking for C compiler default output file name
configure:2311: /localbuild/gcc-build/./gcc/xgcc
-B/localbuild/gcc-build/./gcc/
-B/opt/gcc-4.2.2/x86_64-unknown-linux-gnu/bin/
-B/opt/gcc-4.2.2/x86_64-unknown-linux-gnu/lib/ -isystem
/opt/gcc-4.2.2/x86_64-unknown-linux-gnu/include -isystem
/opt/gcc-4.2.2/x86_64-unknown-linux-gnu/sys-include -m32
-I/usr/include/i486-linux-gnu/ conftest.c >&5
/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: skipping incompatible /usr/bin/../lib/libc.so when
searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.a when searching
for -lc
/usr/bin/ld: warning: i386:x86-64 architecture of input file
`/usr/lib/../lib/crt1.o' is incompatible with i386 output
/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
configure:2314: $? = 0
configure:2360: result: a.out
configure:2365: checking whether the C compiler works
configure:2371: ./a.out
Segmentation fault
configure:2374: $? = 139
configure:2381: error: cannot run C compiled programs.
my installed gcc works with -m32 and produces runnable programs.
Thomas Mittelstaedt schrieb:
> Quick & dirty just added it to LTCXXCOMPILE in the generated Makefile's in
> x86_64-unknown-linux-gnu/32/libstdc++-v3/ and below
>
>
> LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
> --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
> $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
> -I/usr/include/i486-linux-gnu/
>
> and the build would continue until:
> Running configure in multilib subdirs 32
> pwd: /localbuild/gcc-build/x86_64-unknown-linux-gnu/libmudflap
> Running configure in multilib subdir 32
> pwd: /localbuild/gcc-build/x86_64-unknown-linux-gnu
> configure: loading cache ./config.cache
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... x86_64-unknown-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking for --enable-version-specific-runtime-libs... yes
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking for x86_64-unknown-linux-gnu-gcc...
> /localbuild/gcc-build/./gcc/xgcc -B/localbuild/gcc-build/./gcc/
> -B/opt/gcc-4.2.2/x86_64-unknown-linux-gnu/bin/
> -B/opt/gcc-4.2.2/x86_64-unknown-linux-gnu/lib/ -isystem
> /opt/gcc-4.2.2/x86_64-unknown-linux-gnu/include -isystem
> /opt/gcc-4.2.2/x86_64-unknown-linux-gnu/sys-include -m32
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... configure: error: cannot run C
> compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.
> make[1]: *** [configure-target-libmudflap] Error 1
> make[1]: Leaving directory `/localbuild/gcc-build'
> make: *** [bootstrap] Error 2
>
>
>
> Thomas Mittelstaedt schrieb:
>
>> Okay, restartet from scratch with the following, but the
>> I/usr/include/i486-linux-gnu/ would still not propagate.
>>
>>
>> ../gcc-4.2.2/configure --prefix=/opt/gcc-4.2.2
>> --enable-version-specific-runtime-libs --enable-static --enable-shared
>> --enable-languages=c,c++,objc,obj-c++ --enable-threads=posix
>> --enable-nls --enable-__cxa_atexit --enable-libstdcxx-debug
>> --enable-checking=release
>>
>> make CFLAGS_FOR_TARGET="-I/usr/include/i486-linux-gnu/" CFLAGS='-O'
>> LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
>>
>> /localbuild/gcc-build/./gcc/xgcc -shared-libgcc
>> -B/localbuild/gcc-build/./gcc -nostdinc++
>> -L/localbuild/gcc-build/x86_64-unknown-linux-gnu/32/libstdc++-v3/src
>> -L/localbuild/gcc-build/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs
>> -B/opt/gcc-4.2.2/x86_64-unknown-linux-gnu/bin/
>> -B/opt/gcc-4.2.2/x86_64-unknown-linux-gnu/lib/ -isystem
>> /opt/gcc-4.2.2/x86_64-unknown-linux-gnu/include -isystem
>> /opt/gcc-4.2.2/x86_64-unknown-linux-gnu/sys-include -m32
>> -I/localbuild/gcc-4.2.2/libstdc++-v3/../gcc
>> -I/localbuild/gcc-build/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu
>> -I/localbuild/gcc-build/x86_64-unknown-linux-gnu/32/libstdc++-v3/include
>> -I/localbuild/gcc-4.2.2/libstdc++-v3/libsupc++ -fno-implicit-templates
>> -Wall -Wextra -Wwrite-strings -Wcast-qual
>> -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g
>> -O2 -D_GNU_SOURCE -m32 -c
>> ../../../../../gcc-4.2.2/libstdc++-v3/libsupc++/del_op.cc -fPIC -DPIC
>> -o del_op.o
>> In file included from /usr/include/features.h:346,
>> from
>> /localbuild/gcc-build/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu/bits/os_defines.h:44,
>> from
>> /localbuild/gcc-build/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu/bits/c++config.h:41,
>> from
>> ../../../../../gcc-4.2.2/libstdc++-v3/libsupc++/del_op.cc:31:
>> /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or
>> directory
>> make[8]: *** [del_op.lo] Error 1
>> make[8]: Leaving directory
>> `/localbuild/gcc-build/x86_64-unknown-linux-gnu/32/libstdc++-v3/libsupc++'
>>
>> Thomas Mittelstaedt schrieb:
>>
>>
>>> John (Eljay) Love-Jensen schrieb:
>>>
>>>
>>>
>>>> Hi Thomas,
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> ../configure --prefix=/opt/gcc-4.2.2
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --enable-version-specific-runtime-libs --enable-static --enable-shared
>>>> --enable-languages=c,c++,java,objc,obj-c++ --enable-threads=posix
>>>> --enable-nls --enable-__cxa_atexit --enable-libstdcxx-debug
>>>> --enable-checking=release x86_64-linux-gnu
>>>>
>>>> It appears that you are attempting to build GCC from within a subdirectory of the GCC source code (instead of, say, a peer directory to the GCC source code).
>>>>
>>>>
>>>>
>>>>
>>>>
>>> Oh, man. me *bummer*. I did read the configure page, but not thoroughly
>>> enough (maybe too fast). :-[
>>> I'll redo it cleanly!
>>>
>>>
>>>
>>>
>>>> Since that situation is not supported as per <http://gcc.gnu.org/install/configure.html>, do you get the same problem if you build to a peer directory to the source code?
>>>>
>>>> Note: the source code tree may be "tainted" and could need to be "rm -rf" and "tar -x" afresh.
>>>>
>>>> I do not know if this is related to the problem encountered or not. Just one of the variables to consider taking out of the equation.
>>>>
>>>> Sincerely,
>>>> --Eljay
>>>>
>>>>
>>>>
>>>>
More information about the Gcc-help
mailing list