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

2021-11-06 Thread bugs.sourceware at johnthomson dot fastmail.com.au
https://sourceware.org/bugzilla/show_bug.cgi?id=28545

--- Comment #4 from John  
---
this libtool relink libctf.so is the only place in the whole build log where
-L/usr/lib is used

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


[Bug libctf/27360] libctf.so.0: undefined symbol: bsearch_r

2021-11-06 Thread bugs.sourceware at johnthomson dot fastmail.com.au
https://sourceware.org/bugzilla/show_bug.cgi?id=27360

John  changed:

   What|Removed |Added

 CC||bugs.sourceware@johnthomson
   ||.fastmail.com.au

--- Comment #24 from John  
---
Hi,
I ran into a very similar problem when cross compiling binutils 2.37 for armv7
on Arch Linux x86_64. It looks like a duplicate / extension of this bug:
The libctf install relink uses host /usr/lib/libiberty.a. If the fix for this
bug (libctf: link against libiberty before linking in libbfd or libctf-nobfd)
is applied (to my binutils 2.37), then the libctf install relink uses host
/usr/lib/libz.so, and then /usr/lib/libz.a.


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

Cheers

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


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

2021-11-06 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28545

--- Comment #5 from Andreas Schwab  ---
How did you configure?

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


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

2021-11-06 Thread bugs.sourceware at johnthomson dot fastmail.com.au
https://sourceware.org/bugzilla/show_bug.cgi?id=28545

--- Comment #6 from John  
---
I used the OpenWrt package defaults.
These look like:
  80 TARGET_CFLAGS += $(FPIC) -Wno-unused-value
  81 
  82 TARGET_LDFLAGS += $(if $(INTL_FULL),-lintl)
  83 
  84 CONFIGURE_ARGS += \
  85 --host=$(REAL_GNU_TARGET_NAME) \
  86 --target=$(REAL_GNU_TARGET_NAME) \
  87 --enable-shared \
  88 --enable-install-libiberty \
  89 --enable-install-libbfd \
  90 --enable-install-libctf
  91 
  92 define Build/Install
  93 $(call Build/Install/Default)
  94 $(MAKE) -C $(PKG_BUILD_DIR)/libiberty \
  95 target_header_dir=libiberty \
  96 DESTDIR="$(PKG_INSTALL_DIR)" \
  97 MULTIOSDIR="" \
  98 install


https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/devel/binutils/Makefile;h=5fdb83036ea394e7114f0c83362fb1992d96cff5;hb=HEAD

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


Re: [PATCH] fix prototype and definition of yyerror in *.y

2021-11-06 Thread Alan Modra
On Fri, Nov 05, 2021 at 11:41:38AM +0100, Andrea Monaco wrote:
> I think in both cases the problem is the following lines in the
> generated files:
> 
>   #if !defined yyerror && !defined YYERROR_IS_DECLARED
>   void yyerror (const char *msg);
>   #endif

Yes, bison-3.8 generates these prototypes.  Thanks for the report and
patch.  I've extended your patch to other files too.
https://sourceware.org/pipermail/binutils/2021-November/118441.html

-- 
Alan Modra
Australia Development Lab, IBM



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

2021-11-06 Thread sch...@linux-m68k.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28545

--- Comment #7 from Andreas Schwab  ---
Please show the full configure command line.

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


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

2021-11-06 Thread bugs.sourceware at johnthomson dot fastmail.com.au
https://sourceware.org/bugzilla/show_bug.cgi?id=28545

--- Comment #8 from John  
---
./configure --target=arm-openwrt-linux --host=arm-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 
--host=arm-openwrt-linux-muslgnueabi --target=arm-openwrt-linux-muslgnueabi
--enable-shared --enable-install-libiberty --enable-install-libbfd
--enable-install-libctf

There are many FLAGS set as well.
On line 330 (or search binutils-2.37.tar.xz) here:
https://sourceware.org/bugzilla/attachment.cgi?id=13762

I do see the OpenWrt package is:
- trying to do an autoreconf with some custom options and failing before
configure
- replaces config.guess and config.sub
removing both of these results in the same
/usr/lib/libiberty.a: error adding symbols: file format not recognized

Minimum example:
curl -O
https://downloads.openwrt.org/snapshots/targets/ipq40xx/mikrotik/openwrt-sdk-ipq40xx-mikrotik_gcc-11.2.0_musl_eabi.Linux-x86_64.tar.xz

tar -xf openwrt-sdk-ipq40xx-mikrotik_gcc-11.2.0_musl_eabi.Linux-x86_64.tar.xz
cd openwrt-sdk-ipq40xx-mikrotik_gcc-11.2.0_musl_eabi.Linux-x86_64

echo 'src-git base https://git.openwrt.org/openwrt/openwrt.git' >
feeds.conf.default
./scripts/feeds update -a
./scripts/feeds install binutils

cat <.config
# CONFIG_ALL is not set
# CONFIG_ALL_KMODS is not set
# CONFIG_ALL_NONSHARED is not set
# CONFIG_SIGNED_PACKAGES is not set
CONFIG_PACKAGE_binutils=m
EOF

make defconfig
make -j1 V=s package/binutils/compile 2>&1 | tee binutils.log

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