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
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 -rpath separator #7716
Conversation
…determine the separator for the ld -rpath flag which is neccessary for cross-compiling to Mac OS
… settings, pass os_build again and only set rpath_separator to , if compiling for Mac OS from Linux or Mac OS via GCC_LIKE
This looks correct to me. @memsharded vote to add this to 1.31 milestone because makefile generator uses this function and will be updated in 1.31. |
@solvingj Hi, can we get this merged or is further work required? The bug is a showstopper for cross compiling Linux -> Mac OS X, and the fix would influence only this one case, leaving everything else working as-is. |
Hi @Erlkoenig90 Seems a test is still broken: |
Thanks for having a look and fixing the test. I am trying to understand why it is not always "," as separator, it seems that all linkers might be happy with it. |
Thanks, I modified the test. If you use Clang to compile on Mac OS for Linux, you'd use LLD or GNU LD, both of which use the |
Great info @Erlkoenig90 , thanks for the insight and contribution! |
as I can say, GNU LD accepts
|
Co-authored-by: SSE4 <tomskside@gmail.com>
Co-authored-by: SSE4 <tomskside@gmail.com>
Perfect, many thanks. Lets use comma always then. Already did the changes, will merge when CI is green. |
Awesome, thanks! |
…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>
Fix issue #7715.
Changelog: Bugfix: Change the
rpath_flags
flag to always use the comma separator instead of "=", because the current behaviour causes linker error messages when attempting to cross-compile to Mac OS, and the comma separator is accepted everywhere.Docs: Omit
develop
branch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.