Repository: conan-io/conan-center-index

Issue:
[package] libcurl/7.67.0: Error 1 while executing ./buildconf
### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **libcurl/7.67.0**
  * Operating System+version: **CentOS 6.10**
  * Compiler+version: **GCC 7**
  * Docker image: **conanio/gcc7-centos6**
  * Conan version: **conan 1.21.0**
  * 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)
```
Put your profile output here
```


### Steps to reproduce (Include if Applicable)

From `conanio/gcc7-centos6` docker image.

I had to install `libtools` as show in this PR:  https://github.com/conan-io/conan-docker-tools/pull/163
Issue: https://github.com/conan-io/conan-docker-tools/issues/162

After doing so, from within the revised image, run
```
conan install libcurl/7.67.0@_/_ --build
```

Build fails with the following error:
```
docs/examples/Makefile.am: installing './depcomp'
Can't locate object method "none" via package "libcurl_la" (perhaps you forgot to load "libcurl_la"?) at /usr/bin/automake line 1794.
```

See log section

### Logs (Include/Attach if Applicable)

```
configure: Configured to build curl/libcurl:

  Host setup:       x86_64-pc-linux-gnu
  Install prefix:   /home/conan/.conan/data/libcurl/7.67.0/_/_/package/4fc316afed8ab5d40effaf8eef4561bdebefd740
  Compiler:         /opt/rh/devtoolset-7/root/usr/bin/gcc
   CFLAGS:          -m64 -O3 -s -fPIC -Werror-implicit-function-declaration -Wno-system-headers
   CPPFLAGS:        -isystem /home/conan/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/include -isystem /home/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa
7d203887c38be8b/include -DNDEBUG -I/home/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/lib/include -I/home/conan/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a
35b544db7a3c193cc8/include -I/home/conan/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/include/openssl
   LDFLAGS:         -m64 -L/home/conan/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/lib -L/home/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be
8b/lib -L/home/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/lib/lib -L/home/conan/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/lib
   LIBS:            -lssl -lcrypto -lz -lrt -lssl -lcrypto -ldl -lpthread -lz

  curl version:     7.67.0
  SSL:              enabled (OpenSSL)
  SSH:              no      (--with-libssh2)
  zlib:             enabled
  brotli:           no      (--with-brotli)
  GSS-API:          no      (--with-gssapi)
  TLS-SRP:          enabled
  resolver:         POSIX threaded
  IPv6:             enabled
  Unix sockets:     enabled
  IDN:              no      (--with-{libidn2,winidn})

  Build libcurl:    Shared=no, Static=yes
  Built-in manual:  enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  Code coverage:    disabled
  SSPI:             no      (--enable-sspi)
  ca cert bundle:   /etc/pki/tls/certs/ca-bundle.crt
  ca cert path:     no
  ca fallback:      no
  LDAP:             no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS:            no      (--enable-ldaps)
  RTSP:             enabled
  RTMP:             no      (--with-librtmp)
  Metalink:         no      (--with-libmetalink)
  PSL:              no      (--with-libpsl)
  Alt-svc:          no      (--enable-alt-svc)
  HTTP2:            disabled (--with-nghttp2)
  HTTP3:            disabled (--with-ngtcp2, --with-quiche)
  ESNI:             no      (--enable-esni)
  Protocols:        DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP
  Features:         SSL IPv6 UnixSockets libz AsynchDNS NTLM NTLM_WB TLS-SRP HTTPS-proxy

buildconf: autoconf version 2.69 (ok)
buildconf: autom4te version 2.69 (ok)
buildconf: autoheader version 2.69 (ok)
buildconf: automake version 1.16 (ok)
buildconf: aclocal version 1.16 (ok)
buildconf: libtoolize version 2.4.6 (ok)
buildconf: GNU m4 version 1.4.13 (ok)
buildconf: running libtoolize
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
buildconf: converting all mv to mv -f in local m4/libtool.m4
buildconf: running aclocal
buildconf: converting all mv to mv -f in local aclocal.m4
buildconf: running autoheader
buildconf: running autoconf
buildconf: running automake
configure.ac:133: installing './compile'
configure.ac:192: installing './config.guess'
configure.ac:192: installing './config.sub'
configure.ac:133: installing './install-sh'
configure.ac:138: installing './missing'
docs/examples/Makefile.am: installing './depcomp'
Can't locate object method "none" via package "libcurl_la" (perhaps you forgot to load "libcurl_la"?) at /usr/bin/automake line 1794.
buildconf: automake command failed
libcurl/7.67.0: 
libcurl/7.67.0: ERROR: Package '4fc316afed8ab5d40effaf8eef4561bdebefd740' build failed
libcurl/7.67.0: WARN: Build folder /home/conan/.conan/data/libcurl/7.67.0/_/_/build/4fc316afed8ab5d40effaf8eef4561bdebefd740
ERROR: libcurl/7.67.0: Error in build() method, line 131
        self._build_with_autotools()
while calling '_build_with_autotools', line 266
        self.run('./buildconf', win_bash=use_win_bash)
        ConanException: Error 1 while executing ./buildconf
```

</details>



Discussion:
Addressed by https://github.com/conan-io/conan-docker-tools/pull/165
This ticket can be closed if the above PR for the conan image is merged.

Resolving patch:
diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py
--- a/recipes/libcurl/all/conanfile.py
+++ b/recipes/libcurl/all/conanfile.py
@@ -100,10 +100,14 @@ def configure(self):
 
     def system_requirements(self):
         # TODO: Declare tools needed to compile. The idea is Conan checking that they are
-        #   installed and providing a meaninful message before starting the compilation. It
+        #   installed and providing a meaningful message before starting the compilation. It
         #   would be much better than installed them (sudo required).
         pass
 
+    def build_requirements(self):
+        if self.settings.os == "Linux":
+            self.build_requires("libtool/2.4.6")
+
     def requirements(self):
         if self.options.with_openssl:
             if tools.is_apple_os(self.settings.os) and self.options.darwin_ssl:
@@ -111,7 +115,7 @@ def requirements(self):
             elif self.settings.os == "Windows" and self.options.with_winssl:
                 pass
             else:
-                self.requires("openssl/1.1.1f")
+                self.requires("openssl/1.1.1g")
         if self.options.with_libssh2:
             if self.settings.compiler != "Visual Studio":
                 self.requires("libssh2/1.9.0")


Test patch:
diff --git a/recipes/libcurl/all/test_package/CMakeLists.txt b/recipes/libcurl/all/test_package/CMakeLists.txt
--- a/recipes/libcurl/all/test_package/CMakeLists.txt
+++ b/recipes/libcurl/all/test_package/CMakeLists.txt
@@ -7,4 +7,4 @@ conan_basic_setup()
 find_package(CURL)
 
 add_executable(${PROJECT_NAME} test_package.cpp)
-target_link_libraries(${PROJECT_NAME} CURL::CURL)
\ No newline at end of file
+target_link_libraries(${PROJECT_NAME} CURL::CURL)