Open PodnimatelPingvinov opened 1 year ago
That's weird for sure and probably is only related to jemalloc project.
All packages generated by Linux in ConanCenterIndex, they used Docker images available in https://github.com/conan-io/conan-docker-tools/. It's used a non-root user named as conan
to build anything, exactly to avoid security flaws, but also permission errors.
Description
Package fails to build if
conan install
is running inside docker with enabled remapping.The problem seems to be with AutoToolsBuildEnvironment in conan itself. There are wrong permissions on generated
configure
script, executable bit isn't set for some reason. Although if you disable remapping everything works fine.Because this helper is deprecated, I think it's better to rewrite package recipe using different autotools helper. Looks like it will solve the problem because I was able to build libev/4.33 (which is also using autotools) in the same environment.
Package and Environment Details
Conan profile
[settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++ compiler.version=11 os=Linux os_build=Linux [options] [build_requires] [env]
Steps to reproduce
Enable remapping
Enter into image:
Try to build package inside container:
Logs
Click to expand log
``` jemalloc/5.3.0: Configuring sources in /root/.conan/data/jemalloc/5.3.0/_/_/source/src Downloading jemalloc-5.3.0.tar.bz2 completed [718.77k] jemalloc/5.3.0: 3.0: jemalloc/5.3.0: jemalloc/5.3.0: Copying sources to build folder jemalloc/5.3.0: Building your package in /root/.conan/data/jemalloc/5.3.0/_/_/build/c02edc20d60fabc691722829afe8093f125660f9 jemalloc/5.3.0: Generator txt created conanbuildinfo.txt jemalloc/5.3.0: Aggregating env generators jemalloc/5.3.0: Calling build() jemalloc/5.3.0: apply_conandata_patches(): No patches defined in conandata jemalloc/5.3.0: WARN: **** The 'AutoToolsBuildEnvironment' helper is deprecated. Please update your code and remove it. **** jemalloc/5.3.0: WARN: Error running `configure --help`: Error 126 while executing /root/.conan/data/jemalloc/5.3.0/_/_/build/c02edc20d60fabc691722829afe8093f125660f9/src/configure --help jemalloc/5.3.0: Calling: > /root/.conan/data/jemalloc/5.3.0/_/_/build/c02edc20d60fabc691722829afe8093f125660f9/src/configure '--with-jemalloc-prefix=' '--disable-debug' '--enable-cxx' '--enable-fill' '--enable-xmalloc' '--disable-readlinkat' '--enable-syscall' '--disable-lazy-lock' '--disable-log' '--enable-initial-exec-tls' '--enable-libdl' '--disable-shared' '--enable-static' '--prefix=/root/.conan/data/jemalloc/5.3.0/_/_/package/c02edc20d60fabc691722829afe8093f125660f9' /bin/sh: 1: /root/.conan/data/jemalloc/5.3.0/_/_/build/c02edc20d60fabc691722829afe8093f125660f9/src/configure: Permission denied jemalloc/5.3.0: jemalloc/5.3.0: ERROR: Package 'c02edc20d60fabc691722829afe8093f125660f9' build failed jemalloc/5.3.0: WARN: Build folder /root/.conan/data/jemalloc/5.3.0/_/_/build/c02edc20d60fabc691722829afe8093f125660f9/build-release ERROR: jemalloc/5.3.0: Error in build() method, line 170 autotools = self._configure_autotools() while calling '_configure_autotools', line 130 self._autotools.configure(args=self._autotools_args, configure_dir=self.source_folder) ConanException: Error 126 while executing /root/.conan/data/jemalloc/5.3.0/_/_/build/c02edc20d60fabc691722829afe8093f125660f9/src/configure '--with-jemalloc-prefix=' '--disable-debug' '--enable-cxx' '--enable-fill' '--enable-xmalloc' '--disable-readlinkat' '--enable-syscall' '--disable-lazy-lock' '--disable-log' '--enable-initial-exec-tls' '--enable-libdl' '--disable-shared' '--enable-static' '--prefix=/root/.conan/data/jemalloc/5.3.0/_/_/package/c02edc20d60fabc691722829afe8093f125660f9' ```