Comments (11)
Hmm, I've also been building CURL on macOS 10.15 successfully. I'll try reproducing this when I update my Mac.
from hunter.
Update: I tried to build CURL from submodule to investigate the issue:
hunter_config(CURL GIT_SUBMODULE "thirdparty/curl")
In the given folder I cloned the hunterized curl repository, which should be exactly the same code that is checked out by hunter.
This now builds successfully. The CURL version is the same (7.60.0-DEV)
As I remove the reference to the submodule and let hunter pull the sources, the build fails again.
Maybe this is some kind of a weird caching issue? I deleted .hunter
in the user-dir multiple times, doesn't help. Am I missing some cache that might be screwed up?
from hunter.
Interesting. Do you have remote cache download enabled? If so, try disabling that.
from hunter.
Actually I'm not sure. I think it is not enabled by default, is it?
Right now I have a strong feeling that something else is fundamentally wrong with my project setup. Even with the described workaround I need to configure curl in the project that I posted for reproduction, because it still fails to build in my original project. Once a successful build is in the local cache, I can use it from my original project. Im confused and will definitely have to dig deeper into the issues linked in here once I find time for that.
from hunter.
@jothepro I'm not 100% sure but I think you run in the same issue like #147
I saw that you are using
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
as compiler. Try to use /usr/bin/clang
as compiler.
There are the "same" compiler and they are using the same toolchain path ... see my output:
iMac:~ joergboehme$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
iMac:~ joergboehme$ /usr/bin/clang --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
but there is "something" different!
I absolutely don't know what are different but I tried with other "opensource" projects and it works with /usr/bin/clang
and not with /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
....
Maybe somebody can tell me what are the different between /usr/bin/clang
and /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
... would be nice to know :-)
from hunter.
@jothepro I found your problem ....
As workaround:
Remove in your CMakeList.txt line11 LANGUAGES CXX
and remove your hunter build id (.hunter/_Base/<Hunter-ID>/
), then it works ....
Why?
Here in detail:
If you set in project
cmake command the LANGUAGES
then only the specified language compiler is verified via cmake. In your example it was only the C++ compiler.
At the end, hunter is verified if the ABI was correct detected via cmake. CMAKE_CXX_ABI_COMPILED
is an undocumented property from cmake and is set when you get following output:
...
-- Detecting CXX compiler ABI info - done
...
This means, in your example, the C compiler is not verified and CMAKE_C_ABI_COMPILED
is set as empty value.
To build third-party libs in hunter faster, hunter is save this result in the "cache" file (see in your .hunter/_Base/<Hunter-ID>/<Toolchain-ID>/<Config-id>/cache.cmake
).
This means in the curl project, where the C compiler is enabled and CMAKE_C_ABI_COMPILED
is set via the cache file and cmake is not execute the ABI detection then in hunter the verification is failing
In my opinion, we should not save any "cmake environment" when it is not successful!
My idea is to add an if statement in hunter_create_cache_file line 110 like:
if(CMAKE_${lang}_ABI_COMPILED)
hunter_status_debug("ABI forwarding: CMAKE_${lang}_ABI_COMPILED = ${CMAKE_${lang}_ABI_COMPILED}")
file(
APPEND
"${temp_path}"
"set(CMAKE_${lang}_ABI_COMPILED \"${CMAKE_${lang}_ABI_COMPILED}\" CACHE INTERNAL \"\")\n"
)
endif()
@rbsheth and @bkotzz what do you think ?
from hunter.
or maybe we remove this DEFINED
from hunter_create_cache_file line 70
from hunter.
@Bjoe wow thanks for your in-depth explanations! I also figured out after a while that my LANGUAGES definition was the real problem. Not caching the "corrupted" state would have helped me to find the real issue faster I think, so I'd appreciate these changes.
from hunter.
@rbsheth @bkotzz What do you think of the changes that @Bjoe proposes? Otherwise I guess I will close this issue, the original problem is solved for me.
from hunter.
I'd be okay with @Bjoe's suggestion provided that it doesn't slow down builds considerably.
from hunter.
Ok let me do this... hopefully I will find a "time slot" ....
from hunter.
Related Issues (20)
- OpenCV force push access rights HOT 1
- GitHub Actions macos-10.15 runner deprecated and removed by 2022-08-30
- OpenSSL v3+ version number not reporting correctly in CMake
- MingW builds broken in CI
- Add glog v0.6.0 version
- Should Hunter Boost move to USE_CONFIG_FROM_BOOST ON as default? HOT 1
- CMake Dependency Providers
- cmake 3.28 breaks universal 2 hunter builds with Xcode generator HOT 2
- freetype package causes error with CMake 3.28 HOT 2
- Update thrift version to latest
- Update curl to 8.5.0 HOT 6
- Update ZLIB to v1.3.1
- Macos cmake fails to install dependencies with ninja: error: build.ninja:200: multiple rules generate
- boost v1.83 not working on VS2022 17.10 needs to be fixed in Boost upstream HOT 4
- Add boost 1.85.0
- Update gRPC
- boost broken HOT 5
- Abseil is broken on last hunter on freebsd
- Support C++23
- Hunter is searching for vcvarsall.bat in the wrong location
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hunter.