bug-binutils
[Top][All Lists]
Advanced

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

[Bug libctf/28545] cross compile incorrectly using host libraries in ins


From: address@hidden
Subject: [Bug libctf/28545] cross compile incorrectly using host libraries in install relink
Date: Sun, 07 Nov 2021 16:05:37 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28545

Hauke Mehrtens <sourceware@hauke-m.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sourceware@hauke-m.de

--- Comment #9 from Hauke Mehrtens <sourceware@hauke-m.de> ---
I see a similar problem with the gdb compile in OpenWrt on Arch Linux, on
Debian stable it works.

gdb configure is called like this:
-------------------------
./configure --target=mips-openwrt-linux --host=mips-openwrt-linux
--build=x86_64-pc-linux-gnu --program-prefix= --program-suffix= --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib
--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man
--infodir=/usr/info --disable-nls --with-system-readline --with-system-zlib
--without-expat --without-lzma --disable-unit-tests --disable-ubsan
--disable-sim --disable-werror --disable-source-highlight --without-mpc
--without-mpfr --without-isl
--with-gmp=/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr
-------------------------


The configure in the gdb folder is called like this:
-------------------------
/home/hauke/openwrt/openwrt/build_dir/target-mips_24kc_musl/gdb-11.1/gdb/configure
--srcdir=.././gdb --cache-file=./config.cache --with-system-zlib --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib
--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man
--infodir=/usr/info --disable-nls --with-system-readline --with-system-zlib
--without-expat --without-lzma --disable-unit-tests --disable-ubsan
--disable-sim --disable-werror --disable-source-highlight --without-mpc
--without-mpfr --without-isl
--with-gmp=/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr
--program-transform-name=s&$&&;s&^&& --disable-option-checking
--build=x86_64-pc-linux-gnu --host=mips-openwrt-linux
--target=mips-openwrt-linux
-------------------------


It then fails in gdb/configure like this:
-------------------------
configure:10433: checking for libgmp
configure:10453: mips-openwrt-linux-musl-gcc -o conftest -Os -pipe
-mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt
-fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
-msoft-float -mips16 -minterlink-mips16
-fmacro-prefix-map=/home/hauke/openwrt/openwrt/build_dir/target-mips_24kc_musl/gdb-11.1=gdb-11.1
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro
-I/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libiconv-stub/include
-I/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libintl-stub/include
    
-I/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libiconv-stub/include

-L/home/hauke/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/usr/lib
-L/home/hauke/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/lib
-znow -zrelro
-L/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libiconv-stub/lib
-Wl,-rpath-link=/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libiconv-stub/lib
-L/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libintl-stub/lib
-Wl,-rpath-link=/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libintl-stub/lib
-L/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libintl-stub/lib
-Wl,-rpath-link=/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libintl-stub/lib
 -static-libstdc++ -Wl,--gc-sections  conftest.c -lncursesw -lm 
/usr/lib/libgmp.so >&5
/home/hauke/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.2.0_musl/lib/gcc/mips-openwrt-linux-musl/11.2.0/../../../../mips-openwrt-linux-musl/bin/ld:
/usr/lib/libgmp.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
configure:10453: $? = 1
configure: failed program was:
....
-------------------------


The gdb/configure script does not take a --with-gmp option, but
--with-libgmp-prefix.
-------------------------
[hauke@hauke-arch gdb]$ ./configure --help|fgrep  gmp
  --with-libgmp-prefix[=DIR]  search for libgmp in DIR/include and DIR/lib
  --without-libgmp-prefix     don't search for libgmp in includedir and libdir
  --with-libgmp-type=TYPE     type of library to search for
(auto/static/shared)
[hauke@hauke-arch gdb]$ 
-------------------------

When I compile it with --with-libgmp-prefix on Arch Linux it works.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]