Closed andiwand closed 3 months ago
Hi @andiwand,
Thanks a lot for reporting. I have been trying to reproduce (also MacOS 14.5 23F79, Xcode Version 15.4 15F31d) this but apparently is working for me, could you please check in case I'm missing something?
I made this small example to test it. It's an app
example project that depends on bye
Conan package. bye
sets some definitions that are conditional to build type so the generated xcconfig file has something like:
GCC_PREPROCESSOR_DEFINITIONS_bye_bye[config=Debug][arch=x86_64][sdk=macosx*] = "MY_DEFINITION=\"DefDebug\""
and then in other file:
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(GCC_PREPROCESSOR_DEFINITIONS_bye_bye)
The app will output the definitions and apparently it's working correctly.
Could you please check the example here: https://github.com/czoido/issue-16526 and tell us if that works for you?
git clone https://github.com/czoido/issue-16526.git
cd issue-16526
conan export bye
conan install . -s build_type=Debug -s arch=x86_64 --build=missing
conan install . -s build_type=Release -s arch=x86_64 --build=missing
xcodegen generate
xcodebuild -project app.xcodeproj -configuration Release -arch x86_64
./build/Release/app
xcodebuild -project app.xcodeproj -configuration Debug -arch x86_64
./build/Debug/app
Thanks for the detailed examples @czoido ! You are right this works perfectly fine. I suppose there is a problem with our XCode setup. I will try to debug this comparing it to your examples. Thanks again!
Thank you so much for reporting @andiwand, please do not hesitate to reopen or open another issue if you find anything that does not work for you
I fear I am still facing the same issue but I do not have a small reproducible example. The biggest difference I see between our setups is that I am targeting iOS. But it might still come from a problem with the XCode project configuration since it works with your MacOS example. Do you know if there is a small iOS+conan example similar to yours @czoido ?
I fear I am still facing the same issue but I do not have a small reproducible example. The biggest difference I see between our setups is that I am targeting iOS. But it might still come from a problem with the XCode project configuration since it works with your MacOS example. Do you know if there is a small iOS+conan example similar to yours @czoido ?
I added here a run_ios.sh
that uses an ios
profile to build, could you please check? Is it useful?
Ultimately it seems to be a problem with Pods and Conan. Pods sets some LIBRARY_SEARCH_PATHS
which seems to kill the one from Conan even tho it looks correct in both cases. Potentially this could also be an Xcode issue. Thanks again @czoido !
Describe the bug
The generated
xcconfig
files fromXcodeDeps
seem not to work with a recent version of Xcode. I tested Xcode 15.3 and 15.4 with Conan 2.4.1. The problem seems to be that conditional variables cannot be assigned to other unconditional variables.Example of the
xcconfig
contentThis results in
OTHER_LDFLAGS
being empty as the conditional variableOTHER_LDFLAGS_miniz_miniz
seems not to be appendable.I am not sure if this is a bug of Xcode or the intended behavior but ultimately this seems to break the current
xcconfig
file generation ofXcodeDeps
.Environment details: MacOS 14.5 (23F79), apple-clang, Conan version 2.4.1, Xcode Version 15.4 (15F31d)
How to reproduce it
This results in
SYSTEM_HEADER_SEARCH_PATHS
being empty. This mechanism (which might have worked in the past?) seems not to work with the current Xcode versions.