boehm-gc and gcc 7.1
Xi Ruoyao
ryxi@stu.xidian.edu.cn
Thu May 25 23:59:00 GMT 2017
On 2017-05-25 14:16 -0700, Reinoud Koornstra wrote:
> Hello Everyone,
>
> I have trouble compiling gcc 7.1.
> Normally I always use these args to configure gcc and they worked fine
> until gcc 7.1:
>
> ../gcc-7.1.0/configure -v
> --enable-languages=c,c++,fortran,objc,obj-c++
> --prefix=/users/koorstra/GCC --enable-shared --enable-linker-build-id
> --without-included-gettext --enable-threads=posix --enable-nls
> --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
> --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
> --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx
> --enable-plugin --with-system-zlib --disable-brower-plugin
> --with-arch-directory=amd64 --enable-objc-gc --enable-multiarch
> --disable-werror --with-abi=m64 --enable-checking=release
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu
> --target=x86_64-linux-gnu
>
> I've got both boehm-gc installed, meaning for 32 bit anf 64 bit.
> The libs for 64 bit are in /usr/lib64 and the libs for 32 bit are in /usr/lib
> The problem is in libobjc when it uses config.
> It says  system bdw-gc required but not found.
> When I point to my own build gc-7.1, then it says no multipath (i386)
> found in ....
>
> There is another difference in that in default in Redhat it only
> installs the libgc.so.1 file and no libgc.la, you only check for the
> .la suffix.
> When I build gc-7.1 myself, it does build libgc.la, but only for
> x86_64 and not for i686. I didn't find a configure option to do this.
> Any help?
For x86_64:
CC="gcc -m64" CXX="g++ -m64" /path/to/gc/source/configure \
 --prefix=/usr/local --libdir=/usr/local/lib64 ...
make && sudo make install
For i686:
CC="gcc -m32" CXX="g++ -m32" /path/to/gc/source/configure \
 --prefix=/usr/local --libdir=/usr/local/lib --build=i686-linux-gnu \
 --host=i686-linux-gnu ...
make && sudo make install
Then 32-bit libgc.so would be in /usr/local/lib and 64-bit libgc.so
would be in /usr/local/lib64.
In fact building and installing a package is off the topic of
gcc-help. Â For most packages, you have to configure and build it for
each ABI you want.
For the GCC version before 7, libjava need boehm-gc. Â So there is a
copy of boehm-gc source code inside GCC source tree. Â But GCJ has been
deleted from GCC, as well as the source of boehm-gc. Â Then we
have to install bohem-gc ourselves for the sake of --enable-objc-gc.
> Thanks,
>
> Reinoud.
--
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University
More information about the Gcc-help
mailing list