Re: Solaris 10: wchar_iso.h vs cwchar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/9/3 Maciej Bliziński <maciej@xxxxxxxxxxx>:
> 2011/9/2 Marc Glisse <marc.glisse@xxxxxxxx>:
>> On Fri, 2 Sep 2011, Maciej Bliziński wrote:
>>
>>> Here's the output:
>>> http://netra.chopin.edu.pl/~maciej/limits.log
>>
>> That doesn't match the error in PPL. The only difference I can see is
>> -I/opt/csw/include on the command line. Can you try again with it? (and
>> maybe also -dD)
>>
>>> To get it to build, I need to specify a couple more:
>>>
>>> ${src}/configure \
>>>  --prefix=/opt/gcctest \
>>>  --enable-bootstrap \
>>
>> That one is the default.
>
> OK, removed.
>
>>>  --enable-stage1-languages=c \
>>
>> Is that necessary?
>
> Not sure, tested by removing.
>
>>>  --enable-languages=c,c++ \
>>>  --with-gnu-as \
>>>  --with-as=/opt/csw/bin/gas \
>>>  --without-gnu-ld \
>>>  --with-ld=/usr/ccs/bin/ld \
>>>  --with-mpfr=/opt/csw \
>>>  --with-gmp=/opt/csw \
>>>  --with-mpc=/opt/csw \
>>>  --with-libiconv-prefix=/opt/csw
>>
>> Those are fine.
>
> Cool.  I started the build and got this error in
> gcc-objdir/sparc-sun-solaris2.10/libgcc/config.log:
>
> configure:3246: checking for suffix of object files
> configure:3268: /home/maciej/src/gcc-objdir/./gcc/xgcc
> -B/home/maciej/src/gcc-objdir/./gcc/
> -B/opt/gcctest/sparc-sun-solaris2.10/bin/ -B/opt/gc
> isystem /opt/gcctest/sparc-sun-solaris2.10/include -isystem
> /opt/gcctest/sparc-sun-solaris2.10/sys-include    -c -g -O2
> conftest.c >&5
> ld.so.1: cc1: fatal: libmpc.so.2: open failed: No such file or directory
> xgcc: internal compiler error: Killed (program cc1)
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> configure:3272: $? = 4
>
> Examining the cc1 binary:
>
> maciej@netra ~/src $ /usr/ccs/bin/dump -Lv /home/maciej/src/gcc-objdir/./gcc/cc1
>
> /home/maciej/src/gcc-objdir/./gcc/cc1:
>
>  **** DYNAMIC SECTION INFORMATION ****
> .dynamic:
> [INDEX] Tag         Value
> [1]     NEEDED          libmpc.so.2
> [2]     NEEDED          libmpfr.so.4
> [3]     NEEDED          libgmp.so.10
> [4]     NEEDED          libc.so.1
> [5]     INIT            0x61f474
> [6]     FINI            0x61f490
> [7]     HASH            0x100e8
> [8]     STRTAB          0x3be5c
> [9]     STRSZ           0x24442
> [10]    SYMTAB          0x1eabc
> [11]    SYMENT          0x10
> [12]    CHECKSUM        0xc01b
> [13]    VERNEED         0x602a0
> [14]    VERNEEDNUM      0x1
> [15]    PLTSZ           0xa14
> [16]    PLTREL          0x7
> [17]    JMPREL          0x60320
> [18]    RELA            0x602c0
> [19]    RELASZ          0xa74
> [20]    RELAENT         0xc
> [21]    DEBUG           0
> [22]    FEATURE_1       PARINIT
> [23]    FLAGS           0
> [24]    FLAGS_1         0
> [25]    PLTGOT          0x6e7fe4
>
> The binary seems to be missing the RPATH pointing at /opt/csw/lib.
>
> The full script that drives the build is:
>
>
> maciej@netra ~/src $ cat build_gcc.sh
> #!/opt/csw/bin/bash
>
> set -e
> set -u
> set -x
>
> # To help configure find gcc and ar
> export PATH=/opt/csw/gnu:$PATH
>
> src="../gcc-4.6.1"
> objdir="gcc-objdir"
>
> rm -rf "${objdir}"
> mkdir -p "${objdir}"
> pushd ${objdir}
>
> export CC=/opt/csw/gcc3/bin/gcc
>
> ${src}/configure \
>  --prefix=/opt/gcctest \
>  --enable-languages=c,c++ \
>  --with-gnu-as \
>  --with-as=/opt/csw/bin/gas \
>  --without-gnu-ld \
>  --with-ld=/usr/ccs/bin/ld \
>  --with-mpfr=/opt/csw \
>  --with-gmp=/opt/csw \
>  --with-mpc=/opt/csw \
>  --with-libiconv-prefix=/opt/csw
>
> gmake
>
> Any ideas why the RPATH might be missing?
>
> Maciej
>

This is a FAQ, read the docs. Your dynamic linker doesn't look in
/opt/csw and gcc does not use a rpath automatically. Building gcc is
not trivial, read the docs! Carefully!

It's much easier to build gmp, mpfr and mpc statically by putting them
in the gcc source tree.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux