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
[bug] -rpath flag separator depends on build OS instead of host OS #7715
Comments
…determine the separator for the ld -rpath flag which is neccessary for cross-compiling to Mac OS
Hi, I'm afraid this change will work for this scenario because "The I'm not an expert on this topic, maybe @SSE4 has more sound opinion. |
… settings, pass os_build again and only set rpath_separator to , if compiling for Mac OS from Linux or Mac OS via GCC_LIKE
Right, well it works for Cross-Compiling from Linux to Mac OS via osxcross and to Windows via MinGW32. I just noticed it's silly to pass |
…determine -rpath separator (conan-io#7716) * Fix conan-io#7715, in rpath_flags use host OS instead of build OS to determine the separator for the ld -rpath flag which is neccessary for cross-compiling to Mac OS * For conan-io#7715, don't pass os_host to rpath_flags but extract from settings, pass os_build again and only set rpath_separator to , if compiling for Mac OS from Linux or Mac OS via GCC_LIKE * Fix test_compiler_args for cross-compiling Mac OS X -> Linux * Update conans/client/build/compiler_flags.py Co-authored-by: SSE4 <tomskside@gmail.com> * Update conans/client/build/compiler_flags.py Co-authored-by: SSE4 <tomskside@gmail.com> * Update conans/test/unittests/client/generators/compiler_args_test.py * Update conans/client/build/compiler_flags.py * Use -rpath, in all tests for all platforms * fixing tests Co-authored-by: James <james@conan.io> Co-authored-by: SSE4 <tomskside@gmail.com>
* working in msvc new settings * preliminary support for msvc compiler * fix migration * adding msvc for msbuild toolchain * changing to version 19.1, 19.11, etc * working on static/dynamic runtime * extracting toolchain checkers to use in CMake * removed unused import * adding checks * adding check * first proposal * msvc proposal for runtime * fix migration test * fixing tests * binary compatibility * command conan new generates files with new toolchains * removed conanfile * removed files * msbuild working for msvc * fixing tests * fixing tests * refactors * Update conan/tools/microsoft/toolchain.py Co-authored-by: Carlos Zoido <mrgalleta@gmail.com> * Update conan/tools/microsoft/toolchain.py Co-authored-by: Carlos Zoido <mrgalleta@gmail.com> * Fix #7715, in rpath_flags use host OS instead of build OS to determine -rpath separator (#7716) * Fix #7715, in rpath_flags use host OS instead of build OS to determine the separator for the ld -rpath flag which is neccessary for cross-compiling to Mac OS * For #7715, don't pass os_host to rpath_flags but extract from settings, pass os_build again and only set rpath_separator to , if compiling for Mac OS from Linux or Mac OS via GCC_LIKE * Fix test_compiler_args for cross-compiling Mac OS X -> Linux * Update conans/client/build/compiler_flags.py Co-authored-by: SSE4 <tomskside@gmail.com> * Update conans/client/build/compiler_flags.py Co-authored-by: SSE4 <tomskside@gmail.com> * Update conans/test/unittests/client/generators/compiler_args_test.py * Update conans/client/build/compiler_flags.py * Use -rpath, in all tests for all platforms * fixing tests Co-authored-by: James <james@conan.io> Co-authored-by: SSE4 <tomskside@gmail.com> * modernizing tests (#8340) * extracting some common code to base class (#8341) * modernizing tests (#8345) * Fix help message in command remove --outdated (#8350) * [test] Add test creating a target without namespaces (CMake) (#8338) * use target without namespace * add marks * use target from the build-module * remove line * build-module per generator * revert changes in build_info * make it explicit it is PATH * even without build-type, compiler.runtime is different for Release/Debug * use x64 for Windows generator * update tests (#8354) * added integration test for msbuild Co-authored-by: Carlos Zoido <mrgalleta@gmail.com> Co-authored-by: Niklas Gürtler <Erlkoenig90@users.noreply.github.com> Co-authored-by: SSE4 <tomskside@gmail.com> Co-authored-by: Daniel <danimanzaneque@gmail.com> Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Install osxcross on Linux, create a profile with
os=Macos
and attempt to buildglib
with this PR applied, like this:Logs (Executed commands with output) (Include/Attach if Applicable)
conan create . -pr:h x86_64-apple-darwin19-macosx-clang -pr:b default -o glib:with_elf=False
results in
The
libpcre.pc
file created by thepkg_config
generator looks like this:The
ld64
linker used by Clang to (cross-)compile for Mac OS doesn't understand rpath flags with a=
separator, which is why therpath_flags
function uses,
instead of=
when compiling on Mac OS. However, this does not work when cross-compiling on Linux for Mac OS, resulting in the malformed.pc
files.I would suggest changing the
rpath_flags
function to take the host (instead of build) OS as parameter and use that to determine therpath_separator
. I will submit a PR that does that.The text was updated successfully, but these errors were encountered: