building on i686 fails with wrong multilib library path #6389

Closed
opened 2026-02-21 18:23:15 -05:00 by deekerman · 4 comments
Owner

Originally created by @andreasbaumann on GitHub (Nov 23, 2017).

Please provide the following information

qBittorrent version and Operating System

git version d74efd839f

If on linux, libtorrent and Qt version

n/a

What is the problem

./configure --prefix=/usr

fails with:

configure: Boost CPPFLAGS: "-I/usr/include"
                Boost LDFLAGS: "-L/usr/lib/i386-linux-gnu"
checking whether the Boost::System library is available... yes
configure: error: Could not find a version of the library!

What is the expected behavior

32-bit libraries on a true 32-bit system are in /usr/lib, at
least on Archlinux32

Steps to reproduce

./confgiure --prefix

Extra info(if any)

The problem is in the m4/ax_boost_system.m4 macro. It sets LDFLAGS in wrong ways.
Similar problems arise with CPPFLAGS, CXXFLAGS and setting -DFORTIFY_SOURCE=2
without -O2.

I consider this an upstream issue with the autoconf-archive macros.

Originally created by @andreasbaumann on GitHub (Nov 23, 2017). **Please provide the following information** ### qBittorrent version and Operating System git version d74efd839f197b5c3a830e1af7e85d90dbfae7fd ### If on linux, libtorrent and Qt version n/a ### What is the problem ./configure --prefix=/usr fails with: ``` configure: Boost CPPFLAGS: "-I/usr/include" Boost LDFLAGS: "-L/usr/lib/i386-linux-gnu" checking whether the Boost::System library is available... yes configure: error: Could not find a version of the library! ``` ### What is the expected behavior 32-bit libraries on a true 32-bit system are in /usr/lib, at least on Archlinux32 ### Steps to reproduce ./confgiure --prefix ### Extra info(if any) The problem is in the m4/ax_boost_system.m4 macro. It sets LDFLAGS in wrong ways. Similar problems arise with CPPFLAGS, CXXFLAGS and setting -DFORTIFY_SOURCE=2 without -O2. I consider this an upstream issue with the autoconf-archive macros.
Author
Owner

@andreasbaumann commented on GitHub (Nov 23, 2017):

I'm overwritting them in 'configure.ac' after the AX_BOOST_BASE which just sets BOOST_LDFLAGS
incorrectly:

AX_BOOST_BASE([1.35],
              [AC_MSG_NOTICE([Boost CPPFLAGS: "$BOOST_CPPFLAGS"
                Boost LDFLAGS: "$BOOST_LDFLAGS"])],
              [AC_MSG_ERROR([Could not find Boost])])
BOOST_LDFLAGS="-L/usr/lib"
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
@andreasbaumann commented on GitHub (Nov 23, 2017): I'm overwritting them in 'configure.ac' after the AX_BOOST_BASE which just sets BOOST_LDFLAGS incorrectly: ``` AX_BOOST_BASE([1.35], [AC_MSG_NOTICE([Boost CPPFLAGS: "$BOOST_CPPFLAGS" Boost LDFLAGS: "$BOOST_LDFLAGS"])], [AC_MSG_ERROR([Could not find Boost])]) BOOST_LDFLAGS="-L/usr/lib" CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" LDFLAGS="$BOOST_LDFLAGS $LDFLAGS" ```
Author
Owner

@andreasbaumann commented on GitHub (Nov 23, 2017):

The problem around fortify, optimization and CPPFLAGS has disappeared by miracle (cannot reproduce).

The BOOST_LDFLAGS problem remains and the workaround mentioned above works (though
I know, this is not a permanent and proper fix to the problem).

@andreasbaumann commented on GitHub (Nov 23, 2017): The problem around fortify, optimization and CPPFLAGS has disappeared by miracle (cannot reproduce). The BOOST_LDFLAGS problem remains and the workaround mentioned above works (though I know, this is not a permanent and proper fix to the problem).
Author
Owner

@surfernsk commented on GitHub (Nov 23, 2017):

@andreasbaumann same on Fedora, solved it with a patch /m4/ax_boost_base.m4

--- qBittorrent-release-4.0.0/m4/ax_boost_base.m4
+++ qBittorrent-release-4.0.0/m4/ax_boost_base.m4
@@ -114,7 +114,7 @@
     AS_CASE([${host_cpu}],
       [x86_64],[libsubdirs="lib64 libx32 lib lib64"],
       [ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
-      [libsubdirs="lib"],
+      [libsubdirs="lib"]
     )
 
     dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
@surfernsk commented on GitHub (Nov 23, 2017): @andreasbaumann same on Fedora, solved it with a patch [/m4/ax_boost_base.m4](https://github.com/surfernsk/qbittorrent_fedora/blob/master/QBT_fix_build_i386.patch) ``` --- qBittorrent-release-4.0.0/m4/ax_boost_base.m4 +++ qBittorrent-release-4.0.0/m4/ax_boost_base.m4 @@ -114,7 +114,7 @@ AS_CASE([${host_cpu}], [x86_64],[libsubdirs="lib64 libx32 lib lib64"], [ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"], - [libsubdirs="lib"], + [libsubdirs="lib"] ) dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give ```
Author
Owner

@andreasbaumann commented on GitHub (Nov 23, 2017):

@surfernsk thanks, that's the proper way of patching. :-)

@andreasbaumann commented on GitHub (Nov 23, 2017): @surfernsk thanks, that's the proper way of patching. :-)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#6389
No description provided.