Open nioncode opened 2 years ago
You're having problems building m4, not libcurl. So you need to change the title + initial message of this issue.
The biggest change in the past months is the bump to m4/1.4.19.
Does downgrading to m4/1.4.18
fix the problem?
You can downgrade, by adding it to the build requirements of your conanfile.txt.
Also, can you try building m4/1.4.19 with/without cross building + just try building it without conan? Perhaps your toolchain has some issue with it?
You're having problems building m4, not libcurl. So you need to change the title + initial message of this issue.
Sorry, I encountered the error during cross compilation of libcurl and figured it might be the best to post the full reproducable example, since I could not pin-point the problem exactly.
Does downgrading to m4/1.4.18 fix the problem? You can downgrade, by adding it to the build requirements of your conanfile.txt.
This seems to not work correctly. When I use the following conanfile.txt, then conan just builds 1.4.18 ADDITIONALLY, but does not override 1.4.19:
[requires]
libcurl/7.79.1
[build_requires]
m4/1.4.18
[generators]
cmake_find_package
cmake_paths
However, at least building 1.4.18 works fine.
Also, can you try building m4/1.4.19 with/without cross building + just try building it without conan?
Building m4/1.4.19 without cross compiling works fine and building with cross compiling when using profiles (-pr:b=default -pr:h=default) also works (but then automake fails as described in the initial post).
To me there are multiple questions:
conan install .. -s arch=x86 --build=missing -pr:b=default -pr:h=default
and conan install .. -s arch=x86 --build=missing
? Shouldn't these be equivalent if the build and host profile are the same? Is one of those 'more correct'?Update: after doing random conan install
calls hundreds of times, I now got it to work. I have to do the following:
conan install automake/1.16.4@ --build=missing
conan install libcurl/7.79.1@ -s arch=x86 --build=missing -pr:b=default -pr:h=default
. Note that conan install .. -s arch=x86 --build=missing
does not work at this step, yet.conan install .. -s arch=x86 --build=missing
also works (i.e. without specifying the profiles explicitly).It seems like there are a few things going wrong with selecting the correct build/configure flags during cross compilation and installing automake (which builds m4) manually once fixes the problem.
How can I find out why I have to install automake manually? Certainly, this should be handled correctly by conan as transitive dependency, but somehow it fails.
EDIT: might be relevant: https://github.com/conan-io/conan/issues/7565
Were you by any chance using CFLAGS/CXXFLAGS in your x86 profile and a toolchain as well?
In my case automake was failing because I had the following in my x86 profile
[buildenv]
CFLAGS="-m32"
CXXFLAGS="-m32"
and the following in my toolchain file
# This adds the "-m32" flag to all compile commands
SET(CMAKE_C_FLAGS_INIT "-m32" CACHE STRING "C Flags required by platform")
SET(CMAKE_CXX_FLAGS_INIT "-m32" CACHE STRING "C++ Flags required by platform")
This caused the m32
parameter to be passed multiple times, which some reason was causing the compiler to fail.
I commented out the flags from my profile and everything installed just fine.
These are my configurations
WSL 2.0 - Ubuntu 22.04
conan --version # 2.0.4
libcurl/8.0.1
I used nothing else for the build/tool requires section.
Package and Environment Details (include every applicable attribute)
Conan profile (output of
conan profile show default
orconan profile show <profile>
if custom profile is in use)Steps to reproduce (Include if Applicable)
Use the following conanfile.txt:
Install with:
conan install .. -s arch=x86 --build=missing
Logs (Include/Attach if Applicable)
Click to expand log
``` Configuration: [settings] arch=x86 arch_build=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++ compiler.version=4.8 os=Linux os.distro=CentOS6 os_build=Linux [options] [build_requires] [env] libcurl/7.79.1: Not found in local cache, looking in remotes... libcurl/7.79.1: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz libcurl/7.79.1: Downloaded recipe revision 0 openssl/1.1.1l: Not found in local cache, looking in remotes... openssl/1.1.1l: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz openssl/1.1.1l: Downloaded recipe revision 0 zlib/1.2.11: Not found in local cache, looking in remotes... zlib/1.2.11: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz zlib/1.2.11: Downloaded recipe revision 0 libtool/2.4.6: Not found in local cache, looking in remotes... libtool/2.4.6: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz libtool/2.4.6: Downloaded recipe revision 0 automake/1.16.4: Not found in local cache, looking in remotes... automake/1.16.4: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz automake/1.16.4: Downloaded recipe revision 0 autoconf/2.71: Not found in local cache, looking in remotes... autoconf/2.71: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz autoconf/2.71: Downloaded recipe revision 0 m4/1.4.19: Not found in local cache, looking in remotes... m4/1.4.19: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz m4/1.4.19: Downloaded recipe revision 0 pkgconf/1.7.4: Not found in local cache, looking in remotes... pkgconf/1.7.4: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz pkgconf/1.7.4: Downloaded recipe revision 0 meson/0.59.2: Not found in local cache, looking in remotes... meson/0.59.2: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz meson/0.59.2: Downloaded recipe revision 0 ninja/1.10.2: Not found in local cache, looking in remotes... ninja/1.10.2: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz ninja/1.10.2: Downloaded recipe revision 0 gnu-config/cci.20201022: Not found in local cache, looking in remotes... gnu-config/cci.20201022: Trying with 'conancenter'... Downloading conanmanifest.txt Downloading conanfile.py Downloading conan_export.tgz gnu-config/cci.20201022: Downloaded recipe revision 0 conanfile.txt: Installing package Requirements libcurl/7.79.1 from 'conancenter' - Downloaded openssl/1.1.1l from 'conancenter' - Downloaded zlib/1.2.11 from 'conancenter' - Downloaded Packages libcurl/7.79.1:a247063e97b958dbd0699376c5843f96f5807a05 - Build openssl/1.1.1l:7093403bcab090bc277a0c7f889c5532729d3a52 - Build zlib/1.2.11:7093403bcab090bc277a0c7f889c5532729d3a52 - Build Build requirements autoconf/2.71 from 'conancenter' - Downloaded automake/1.16.4 from 'conancenter' - Downloaded gnu-config/cci.20201022 from 'conancenter' - Downloaded libtool/2.4.6 from 'conancenter' - Downloaded m4/1.4.19 from 'conancenter' - Downloaded meson/0.59.2 from 'conancenter' - Downloaded ninja/1.10.2 from 'conancenter' - Downloaded pkgconf/1.7.4 from 'conancenter' - Downloaded Build requirements packages autoconf/2.71:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download automake/1.16.4:940ae2123f87b0c78eddddcae404c80602ed7379 - Build gnu-config/cci.20201022:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download libtool/2.4.6:b925abeee80ccbce1bce480431492590d2043964 - Build m4/1.4.19:93233cb515e4c52a96eac0940bb5519ddd8c9120 - Build meson/0.59.2:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download ninja/1.10.2:93233cb515e4c52a96eac0940bb5519ddd8c9120 - Build pkgconf/1.7.4:7093403bcab090bc277a0c7f889c5532729d3a52 - Build Cross-build from 'Linux:x86_64' to 'Linux:x86' Installing (downloading, building) binaries... gnu-config/cci.20201022: Retrieving package 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 from remote 'conancenter' Downloading conanmanifest.txt Downloading conaninfo.txt Downloading conan_package.tgz gnu-config/cci.20201022: Package installed 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 gnu-config/cci.20201022: Downloaded package revision 0 autoconf/2.71: Retrieving package 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 from remote 'conancenter' Downloading conanmanifest.txt Downloading conaninfo.txt Downloading conan_package.tgz autoconf/2.71: Package installed 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 autoconf/2.71: Downloaded package revision 0 meson/0.59.2: Retrieving package 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 from remote 'conancenter' Downloading conanmanifest.txt Downloading conaninfo.txt Downloading conan_package.tgz meson/0.59.2: Package installed 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 meson/0.59.2: Downloaded package revision 0 gnu-config/cci.20201022: Appending PATH environment variable: /home/jenkins/.conan/data/gnu-config/cci.20201022/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin Downloading conan_sources.tgz m4/1.4.19: Configuring sources in /home/jenkins/.conan/data/m4/1.4.19/_/_/source m4/1.4.19: Copying sources to build folder m4/1.4.19: Building your package in /home/jenkins/.conan/data/m4/1.4.19/_/_/build/93233cb515e4c52a96eac0940bb5519ddd8c9120 m4/1.4.19: Generator txt created conanbuildinfo.txt m4/1.4.19: Aggregating env generators m4/1.4.19: Calling build() m4/1.4.19: Calling: > source_subfolder/configure '--prefix=/home/jenkins/.conan/data/m4/1.4.19/_/_/package/93233cb515e4c52a96eac0940bb5519ddd8c9120' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --build=x86_64-linux-gnu --host=x86-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for x86-linux-gnu-strip... no checking for strip... strip configure: WARNING: using cross tools not prefixed with host triplet checking for a race-free mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for x86-linux-gnu-gcc... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... -std=gnu11 checking whether gcc -std=gnu11 understands -c and -o together... yes checking whether the compiler is clang... no checking for compiler option needed when checking for declarations... none checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc -std=gnu11... gcc3 checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for wchar.h... yes checking for minix/config.h... no checking for pthread.h... yes checking for sys/param.h... yes checking for sys/socket.h... yes checking for dirent.h... yes checking for stdio_ext.h... yes checking for getopt.h... yes checking for sys/cdefs.h... yes checking for threads.h... no checking for iconv.h... yes checking for limits.h... yes checking for crtdefs.h... no checking for wctype.h... yes checking for langinfo.h... yes checking for xlocale.h... yes checking for math.h... yes checking for sys/mman.h... yes checking for malloc.h... yes checking for spawn.h... yes checking for sys/time.h... yes checking for sys/random.h... no checking for sys/wait.h... yes checking for features.h... yes checking for arpa/inet.h... yes checking for semaphore.h... yes checking for netdb.h... yes checking for netinet/in.h... yes checking for sys/select.h... yes checking for sys/ioctl.h... yes checking for sys/uio.h... yes checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking build system type... x86_64-pc-linux-gnu checking host system type... x86-unknown-linux-gnu checking how to run the C preprocessor... gcc -std=gnu11 -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for Minix Amsterdam compiler... no checking for x86-linux-gnu-ar... no checking for ar... ar checking for x86-linux-gnu-ranlib... no checking for ranlib... ranlib checking whether to use C++... no checking for _LARGEFILE_SOURCE value needed for large files... no checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 configure: autobuild project... GNU M4 configure: autobuild revision... 1.4.19 configure: autobuild hostname... localhost configure: autobuild timestamp... 20211203T112441Z checking for unsigned long long int... yes checking for long long int... yes checking for unsigned long long int... (cached) yes checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for inline... inline checking whetherInterestingly, it works if I specify the same profile twice for build/host, i.e. installing with
conan install .. -s arch=x86 --build=missing -pr:b=default -pr:h=default
works for building m4, but then fails later on in automake:configure: error: Autoconf 2.65 or better is required.
This is also weird, because it just built autoconf 2.71 a few lines earlier (log attached build-cross.txt since it is a bit verbose).
This has been working fine in the past (I used this machine and profile since months), so it seems like some recent change broke this. This can also be reproduced on other systems (e.g. on my nixos machine), but I figured the CentOS one is the 'cleanest'. My builds are completely broken because of this and I cannot ship new releases. Don't know if this is a conan problem (I tried downgrading to conan 1.35, but nothing changed) or a recipe problem (I tried downgrading curl, but it always uses m4/1.4.19 and I cannot – or don't know how – override this build requirement to use m4/1.4.18).
/cc @madebr (since you worked on https://github.com/conan-io/conan-center-index/issues/6777 which seems similar).