[M3devel] compile problem on LINUXLIBC6

Mika Nystrom mika at async.caltech.edu
Sat Jan 22 17:31:29 CET 2011


In order to build m3cc, all I had to do was remove the declaration for
basename() from /usr/cvs/cm3/m3-sys/m3cc/gcc-4.5/include/libiberty.h

I find it a bit odd since my system uses gcc 4.5.0 but am not quite sure
what should be done about it.

    Mika

"Daniel Alejandro Benavides D." writes:
>Hi all:
>I wonder why it's making libcpp, does it some tool use it? just for c this =
>days? anyway it would be good if you can test it just with another compiler=
> version, perhaps the clash is product of incompability of version 4.50, 4.=
>5.1 -><- perhaps you can try to build the gcc trunk to see how it builds, i=
>f it builds then you have a problem of compability in your gcc headers, Thi=
>s is why is this C code is sort of not portable, you don't know when you ge=
>t a compiler error after thinking it is OK.
>Then if so, try to use gcc trunk instead to build in your cm3 building.
>Thanks in advance
>
>--- El vie, 21/1/11, Mika Nystrom <mika at async.caltech.edu> escribi=F3:
>
>> De: Mika Nystrom <mika at async.caltech.edu>
>> Asunto: [M3devel] compile problem on LINUXLIBC6
>> Para: m3devel at elegosoft.com
>> Fecha: viernes, 21 de enero, 2011 21:15
>>=20
>> On the following system:
>>=20
>> Linux ballista 2.6.34.7-0.5-desktop #1 SMP PREEMPT
>> 2010-10-25 08:40:12 +0200 i686 i686 i386 GNU/Linux
>>=20
>>  gcc -v
>> Using built-in specs.
>> COLLECT_GCC=3Dgcc
>> COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/i586-suse-linux/4.5/lto-wrapper
>> Target: i586-suse-linux
>> Configured with: ../configure --prefix=3D/usr
>> --infodir=3D/usr/share/info --mandir=3D/usr/share/man
>> --libdir=3D/usr/lib --libexecdir=3D/usr/lib
>> --enable-languages=3Dc,c++,objc,fortran,obj-c++,java,ada
>> --enable-checking=3Drelease
>> --with-gxx-include-dir=3D/usr/include/c++/4.5 --enable-ssp
>> --disable-libssp --disable-plugin --with-bugurl=3Dhttp://bugs.opensuse.or=
>g/ --with-pkgversion=3D'SUSE
>> Linux' --disable-libgcj --disable-libmudflap
>> --with-slibdir=3D/lib --with-system-zlib --enable-__cxa_atexit
>> --enable-libstdcxx-allocator=3Dnew --disable-libstdcxx-pch
>> --enable-version-specific-runtime-libs --program-suffix=3D-4.5
>> --enable-linux-futex --without-system-libunwind
>> --enable-gold --with-plugin-ld=3D/usr/bin/gold
>> --with-arch-32=3Di586 --with-tune=3Dgeneric
>> --build=3Di586-suse-linux
>> Thread model: posix
>> gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292]
>> (SUSE Linux)
>>=20
>> Installing 5.8.6 from the web and then attempting to
>> compile the CVS head using "upgrade.py" leads
>> to the following:
>>=20
>> echo ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o
>> ./sha1.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o
>> ./cp-demint.o ./crc32.o ./dyn-string.o ./fdmatch.o
>> ./fibheap.o ./filename_cmp.o ./floatformat.o ./fnmatch.o
>> ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o
>> ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o
>> ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o
>> ./objalloc.o ./obstack.o ./partition.o ./pexecute.o
>> ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o
>> ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o
>> ./strerror.o ./strsignal.o ./unlink-if-ordinary.o
>> ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o
>> ./xstrerror.o ./xstrndup.o > required-list
>> make[2]: Entering directory
>> `/home/mika/cm3-cvs/cm3/m3-sys/m3cc/LINUXLIBC6/libiberty/testsuite'
>> make[2]: Nothing to be done for `all'.
>> make[2]: Leaving directory
>> `/home/mika/cm3-cvs/cm3/m3-sys/m3cc/LINUXLIBC6/libiberty/testsuite'
>> make[1]: Leaving directory
>> `/home/mika/cm3-cvs/cm3/m3-sys/m3cc/LINUXLIBC6/libiberty'
>> cd . && cd libcpp && make=20
>> MAKE=3Dmake  AUTOCONF=3D: AUTOMAKE=3D: LEX=3D'touch lex.yy.c'
>> MAKEINFO=3D: libcpp.a
>> cd . && cd libcpp && make=20
>> MAKE=3Dmake  AUTOCONF=3D: AUTOMAKE=3D: LEX=3D'touch lex.yy.c'
>> MAKEINFO=3D: libcpp.a
>> g++  -I../../gcc-4.5/libcpp -I.
>> -I../../gcc-4.5/libcpp/../include
>> -I../../gcc-4.5/libcpp/include  -g -O2 -W -Wall
>> -Wwrite-strings -Wmissing-format-attribute -pedantic
>> -Wno-long-long  -I../../gcc-4.5/libcpp -I.
>> -I../../gcc-4.5/libcpp/../include
>> -I../../gcc-4.5/libcpp/include  -c -o charset.o -MT
>> charset.o -MMD -MP -MF .deps/charset.Tpo
>> ../../gcc-4.5/libcpp/charset.c
>> In file included from ../../gcc-4.5/libcpp/system.h:335:0,
>>             =20
>>    from ../../gcc-4.5/libcpp/charset.c:24:
>> ../../gcc-4.5/libcpp/../include/libiberty.h:106:36: error:
>> new declaration =E2
>> /usr/include/string.h:601:28: error: ambiguates old
>> declaration =E2
>> make: *** [charset.o] Error 1
>> "/home/mika/cm3-cvs/cm3/m3-sys/m3cc/src/m3makefile", line
>> 273: quake runtime error: exit 2: cd . && cd libcpp
>> && make  MAKE=3Dmake  AUTOCONF=3D: AUTOMAKE=3D:
>> LEX=3D'touch lex.yy.c' MAKEINFO=3D: libcpp.a
>>=20
>> --procedure--  -line-  -file---
>> exec          =20
>>    --  <builtin>
>> m3cc_Run          273=20
>> /home/mika/cm3-cvs/cm3/m3-sys/m3cc/src/m3makefile
>> include_dir       518=20
>> /home/mika/cm3-cvs/cm3/m3-sys/m3cc/src/m3makefile
>>               =20
>>     5=20
>> /home/mika/cm3-cvs/cm3/m3-sys/m3cc/LINUXLIBC6/m3make.args
>>=20
>> Fatal Error: package build failed
>>  *** execution of [<function _BuildGlobalFunction at
>> 0x814db54>, <function _ShipFunction at 0x814db8c>]
>> failed ***
>>=20
>> It looks like a clash between a declaration in libiberty.h
>> and one in string.h
>>=20
>>      Mika
>> =0A=0A=0A      



More information about the M3devel mailing list