conan-center-index: [pkgconf] pkgconf/1.7.4: Binary does not work in shared build
When building pkgconf with -o *:shared=True I end up with a pkgconf binary that when run gives the following error:
$ /opt/conan/pkgconf/1.7.4/3rdparty/stable/package/fb49f7b339424395408c6d9629736e5998939ecf/bin/pkgconf
/opt/conan/pkgconf/1.7.4/3rdparty/stable/package/fb49f7b339424395408c6d9629736e5998939ecf/bin/pkgconf: symbol lookup error: /opt/conan/pkgconf/1.7.4/3rdparty/stable/package/fb49f7b339424395408c6d9629736e5998939ecf/bin/pkgconf: undefined symbol: pkgconf_cross_personality_default
This seems to be causing #7539.
Package and Environment Details (include every applicable attribute)
- Package Name/Version: glib/2.69.2
- Operating System+version: AlmaLinux 8.4
- Compiler+version: Clang 10.0.1
- Conan version: 1.40.3
- Python version: Python 3.9.2
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (16 by maintainers)
The problem is that conan does not run its build helpers in a run environment. Conan runs
mesonhere. As you see, there’s norun_environment=Trueadded. TheCMakeandAutotoolsBuildEnvironmentbuild helpers have the same issue.It’s possible to fix this by surrounding with a
tools.environment_append(tools.RunEnvironment(self).vars)context. But imho, the real issue is that conan is missing a flag to enable a run environment on build helpers.I think conan should add a option to the
CMake/Meson/AutotoolsBuildEnvironmentconstructs: e.g.which should get passed down to every
ConanFile.run.The only problem is that these build helpers will soon get deprecated. Perhaps a issue at https://github.com/conan-io/conan would be helpful, to make sure they are added to their successors.