Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] automake/1.16.2: automake fails to build on conanio/gcc7-centos6 docker image #2208

Closed
dheater opened this issue Jul 14, 2020 · 24 comments
Labels
bug Something isn't working

Comments

@dheater
Copy link
Contributor

dheater commented Jul 14, 2020

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: automake/1.16.2
  • Operating System+version: CentOS6
  • Compiler+version: GCC 7
  • Docker image: conanio/gcc7-centos6
  • Conan version: conan 1.26.1
  • Python version: Python 3.6.9

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

Run: conan create . automake/1.16.2@

Logs (Include/Attach if Applicable)

checking whether autoconf is installed... yes
checking whether autoconf works... no
configure: error: The installed version of autoconf does not work.
    Please check config.log for error messages before this one.
automake/1.16.2: 
automake/1.16.2: ERROR: Package '8f0570538ddd703bfc5400385a2fca9aa4a2b671' build failed
automake/1.16.2: WARN: Build folder /home/conan/.conan/data/automake/1.16.2/_/_/build/8f0570538ddd703bfc5400385a2fca9aa4a2b671
ERROR: automake/1.16.2: Error in build() method, line 64
        autotools = self._configure_autotools()
while calling '_configure_autotools', line 55
        self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder)
        ConanException: Error 1 while executing /home/conan/.conan/data/automake/1.16.2/_/_/build/8f0570538ddd703bfc5400385a2fca9aa4a2b671/source_subfolder/configure '--datarootdir=/home/conan/.conan/data/automake/1.16.2/_/_/package/8f0570538ddd703bfc5400385a2fca9aa4a2b671/bin/share' '--prefix=/home/conan/.conan/data/automake/1.16.2/_/_/package/8f0570538ddd703bfc5400385a2fca9aa4a2b671' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' 


From config.log:

configure:2995: checking whether autoconf is installed
configure:3001: /home/conan/.conan/data/autoconf/2.69/_/_/package/981def0a8607e5b81282ae8da6b772973e6c0636/bin/autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
configure:3004: $? = 0
configure:3012: result: yes
configure:3019: checking whether autoconf works
configure:3027: cd conftest && /home/conan/.conan/data/autoconf/2.69/_/_/package/981def0a8607e5b81282ae8da6b772973e6c0636/bin/autoconf -o /dev/null conftest.ac
autom4te: need GNU m4 1.4 or later: /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4
configure:3030: $? = 1
configure:3039: result: no
configure:3042: error: The installed version of autoconf does not work.
    Please check config.log for error messages before this one.
@dheater dheater added the bug Something isn't working label Jul 14, 2020
@madebr
Copy link
Contributor

madebr commented Jul 14, 2020

It looks like m4 is failing. Might this be because it is built using a too recent glibc?
When running that docker interactively and installing m4/1.4.18 from cci, does m4 run?

echo "changequote([,])define([p],[[hello ]\$1])p([conan])" | /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4

@dheater
Copy link
Contributor Author

dheater commented Jul 14, 2020

The binary installed m4 does not run.

[conan@093dc3668526 all]$ echo "changequote([,])define([p],[[hello ]\$1])p([conan])" | /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)
[conan@093dc3668526 all]$ /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4 --version
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)

@dheater
Copy link
Contributor Author

dheater commented Jul 14, 2020

conan create . m4/1.4.18@ seems to build the package OK, but the tests fail.

make  install-recursive
make[3]: Entering directory '/home/conan/.conan/data/m4/1.4.18/_/_/build/83f496dd959691e3a99d4debe3b1f5b82f7ef212/tests'
Making install in .
make[4]: Entering directory '/home/conan/.conan/data/m4/1.4.18/_/_/build/83f496dd959691e3a99d4debe3b1f5b82f7ef212/tests'
make[5]: Entering directory '/home/conan/.conan/data/m4/1.4.18/_/_/build/83f496dd959691e3a99d4debe3b1f5b82f7ef212/tests'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/home/conan/.conan/data/m4/1.4.18/_/_/build/83f496dd959691e3a99d4debe3b1f5b82f7ef212/tests'
make[4]: Leaving directory '/home/conan/.conan/data/m4/1.4.18/_/_/build/83f496dd959691e3a99d4debe3b1f5b82f7ef212/tests'
make[3]: Leaving directory '/home/conan/.conan/data/m4/1.4.18/_/_/build/83f496dd959691e3a99d4debe3b1f5b82f7ef212/tests'
make[2]: Leaving directory '/home/conan/.conan/data/m4/1.4.18/_/_/build/83f496dd959691e3a99d4debe3b1f5b82f7ef212/tests'
make[1]: Leaving directory '/home/conan/.conan/data/m4/1.4.18/_/_/build/83f496dd959691e3a99d4debe3b1f5b82f7ef212'
m4/1.4.18 package(): Packaged 2 files: COPYING, m4
m4/1.4.18: Package '83f496dd959691e3a99d4debe3b1f5b82f7ef212' created
m4/1.4.18: Created package revision f9ff296edc45a049ce39e2cdff7a691d
m4/1.4.18: Appending PATH environment variable: /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin
m4/1.4.18: Setting M4 environment variable: /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4
m4/1.4.18 (test package): Generator txt created conanbuildinfo.txt
m4/1.4.18 (test package): ERROR: Generator txt(file:conanbuildinfo.txt) failed
[Errno 2] No such file or directory: '/home/conan/project/m4/all/test_package/build/5c141e8fbd3174d18b06584d69645e4da44006b2/conanbuildinfo.txt'
ERROR: [Errno 2] No such file or directory: '/home/conan/project/m4/all/test_package/build/5c141e8fbd3174d18b06584d69645e4da44006b2/conanbuildinfo.txt'

@dheater
Copy link
Contributor Author

dheater commented Jul 14, 2020

After building the package from source, the program runs:

[conan@093dc3668526 all]$ echo "changequote([,])define([p],[[hello ]\$1])p([conan])" | /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4
hello conan
[conan@093dc3668526 all]$ /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4 --version
m4 (GNU M4) 1.4.18
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Rene' Seindal.

@dheater
Copy link
Contributor Author

dheater commented Jul 14, 2020

I assume the binary doesn't work on CentOS6 b/c it has glibc 2.12

[conan@093dc3668526 all]$ ldd --version
ldd (GNU libc) 2.12

@dheater
Copy link
Contributor Author

dheater commented Jul 14, 2020

I can build autoconf and automake after building m4 from source, but their test package also fail.

@madebr
Copy link
Contributor

madebr commented Jul 14, 2020

conan create . m4/1.4.18@ seems to build the package OK, but the tests fail.

m4/1.4.18 (test package): Generator txt created conanbuildinfo.txt
m4/1.4.18 (test package): ERROR: Generator txt(file:conanbuildinfo.txt) failed
[Errno 2] No such file or directory: '/home/conan/project/m4/all/test_package/build/5c141e8fbd3174d18b06584d69645e4da44006b2/conanbuildinfo.txt'
ERROR: [Errno 2] No such file or directory: '/home/conan/project/m4/all/test_package/build/5c141e8fbd3174d18b06584d69645e4da44006b2/conanbuildinfo.txt'

I can build autoconf and automake after building m4 from source, but their test package also fail.

There is something fundamentally wrong with the/your docker image, because the conan generators fail to create conanbuildinfo.txt. It fails before even start building the test_package.

@dheater
Copy link
Contributor Author

dheater commented Jul 14, 2020

This is using one of the "official" conan docker images https://github.com/conan-io/conan-docker-tools/blob/master/gcc_7-centos6/Dockerfile

@dheater
Copy link
Contributor Author

dheater commented Jul 15, 2020

Figured out that the conanbuildinfo.txt file was not getting created b/c I was on a mounted volume where the conan user didn't have write permission.

m4 builds and tests pass now.

@dheater
Copy link
Contributor Author

dheater commented Jul 15, 2020

Now when I go up to autoconf and try conan create . autoconf/2.69@ I get:

autom4te: need GNU m4 1.4 or later: /usr/bin/env m4
make[2]: *** [Makefile:641: autoconf.in] Error 1
make[2]: Leaving directory '/home/conan/.conan/data/autoconf/2.69/_/_/build/981def0a8607e5b81282ae8da6b772973e6c0636/bin'
make[1]: *** [Makefile:357: all-recursive] Error 1
make[1]: Leaving directory '/home/conan/.conan/data/autoconf/2.69/_/_/build/981def0a8607e5b81282ae8da6b772973e6c0636'
make: *** [Makefile:292: all] Error 2
autoconf/2.69: 
autoconf/2.69: ERROR: Package '981def0a8607e5b81282ae8da6b772973e6c0636' build failed
autoconf/2.69: WARN: Build folder /home/conan/.conan/data/autoconf/2.69/_/_/build/981def0a8607e5b81282ae8da6b772973e6c0636
ERROR: autoconf/2.69: Error in build() method, line 64
        autotools.make()
        ConanException: Error 2 while executing make -j8

@dheater
Copy link
Contributor Author

dheater commented Jul 15, 2020

If I conan create m4/1.4.18@ before conan create . autoconf/2.69@, it works.

@madebr
Copy link
Contributor

madebr commented Jul 15, 2020

Apart from the m4 glibc issue.
Were you seeing this problem? #2196
This is getting fixed by #2197

@dheater
Copy link
Contributor Author

dheater commented Jul 15, 2020

I don't think it is related to #2196 but #2197 might fix it anyway.

Seems more related to #2102 . If I comment out the m4 build require for autoconf, then autoconf builds fine (with the m4 version from the docker image, 1.4.13) .

automake builds IFF I first rebuild autoconf without the explicit dependency on m4

@dheater
Copy link
Contributor Author

dheater commented Jul 15, 2020

I still get the same error with autoconf in the conanio/gcc7-centos6 image using your autoconf_info_requires branch @madebr

Now when I go up to autoconf and try conan create . autoconf/2.69@ I get:

autom4te: need GNU m4 1.4 or later: /usr/bin/env m4
make[2]: *** [Makefile:641: autoconf.in] Error 1
make[2]: Leaving directory '/home/conan/.conan/data/autoconf/2.69/_/_/build/981def0a8607e5b81282ae8da6b772973e6c0636/bin'
make[1]: *** [Makefile:357: all-recursive] Error 1
make[1]: Leaving directory '/home/conan/.conan/data/autoconf/2.69/_/_/build/981def0a8607e5b81282ae8da6b772973e6c0636'
make: *** [Makefile:292: all] Error 2
autoconf/2.69: 
autoconf/2.69: ERROR: Package '981def0a8607e5b81282ae8da6b772973e6c0636' build failed
autoconf/2.69: WARN: Build folder /home/conan/.conan/data/autoconf/2.69/_/_/build/981def0a8607e5b81282ae8da6b772973e6c0636
ERROR: autoconf/2.69: Error in build() method, line 64
        autotools.make()
        ConanException: Error 2 while executing make -j8

@madebr
Copy link
Contributor

madebr commented Jul 15, 2020

The autoconf_info_requires branch does not fix the glibc situation. That requires another set of docker images, which is a WIP by @uilianries .

@dheater
Copy link
Contributor Author

dheater commented Jul 15, 2020

Do you have a link to the glibc issue.

It seems my problem now is here:

autom4te: need GNU m4 1.4 or later: /usr/bin/env m4

Since the recipe works if I remove the autoconf's explicit dependency on m4, I'm wondering if autom4te is trying to use a different (the image's) m4 instead of the dependency version. I wonder if the M4 environment variable needs to be set to point to the right version.

I'm finding this in the autoreconf --help from the original autoconf package:

The environment variables AUTOM4TE, AUTOCONF, AUTOHEADER, AUTOMAKE,
ACLOCAL, AUTOPOINT, LIBTOOLIZE, M4, and MAKE are honored.

@madebr
Copy link
Contributor

madebr commented Jul 15, 2020

autoconf and family picks up m4 using the M4 environment variable first, then the m4 executable it can find in the $PATH.
The m4 recipe sets the M4 environment variable.
The other environment variables are set in automake and libtool, I think.

There is discussion all over the place about glibc, but the main one is here: #213

@dheater
Copy link
Contributor Author

dheater commented Jul 15, 2020

I think patch 0004 is overriding the M4 environment variable with /usr/bin/etc/ m4

If I skip that patch and set self.env_info.M4 = "/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4"

Still fails, but now with the error:

autom4te: need GNU m4 1.4 or later: /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4

@uilianries
Copy link
Member

Hello, indeed another glibc version problem, unfortunately we don't have a good solution, you need to build from sources to keep all packages aligned with the same glibc version. The idea [here] (conan-io/conan-docker-tools#204) is provide a generic docker image, using the glibc version for all compilers. It's WIP because we will need to bring to CCI too, like, building all packages again and switching the index. Well, that's the idea, but will need some time, because there are more than one team involved. I'll talk again to Conan team to continue those images, I think it's possible to provide them to people, at least they will be able to use someone more aligned.

@dheater
Copy link
Contributor Author

dheater commented Jul 15, 2020

Thanks @uilianries . I'm fine with building from source.

Any idea why the autoconf package is failing when using the m4 package listed as a build requirement (1.4.18)?
If I comment out the build requirement for m4 the package builds (using m4 version 1.4.13 installed in the image).

@madebr
Copy link
Contributor

madebr commented Jul 20, 2020

This is the result from running m4, built by ci:

~/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4 
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)
/home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /home/conan/.conan/data/m4/1.4.18/_/_/package/83f496dd959691e3a99d4debe3b1f5b82f7ef212/bin/m4)

So currently, you'll have to build m4 yourself.

@dheater
Copy link
Contributor Author

dheater commented Jul 23, 2020

As a workaround. I changed the build policy for the packages hitting this problem from --build=missing to --build (build_policy=all when using conan-package-tools)

@madebr
Copy link
Contributor

madebr commented Jul 30, 2020

@uilianries
I think it would be interesting to tag all glibc issues.
Or gather them under a github project.

@dheater
Copy link
Contributor Author

dheater commented Mar 3, 2021

Closing since I have a workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants