Comments (9)
OpenEXR is relying on the OLD
behavior of CMake policy CMP0107, which is deprecated by definition. Homebrew inadvertently switches CMP0107 to the NEW
behavior, which breaks OpenEXR, by calling cmake_minimum_required(VERSION 3.24)
in ${HOMEBREW_LIBRARY}/Homebrew/cmake/trap_fetchcontent_provider.cmake
.
You can restore the OLD
behavior (and suppress the error) by adding the following line to OpenEXR's CMakeLists.txt
:
cmake_policy(SET CMP0107 OLD)
However, realize that OpenEXR's CMakeLists.txt
is apparently expecting CMake to behave in a way that it does not (and apparently never has). Calling add_library()
multiple times with the same <name>
but different ALIAS <target>
s does not accumulate those targets under the aliased name but rather either silently overwrites(!) the alias (the OLD
behavior) or raises an error (the NEW
behavior).
I started a discussion of the problem at Homebrew.
from openexr.
There is this message from OpenEXR's build in your log:
CMake Error at cmake/CMakeLists.txt:159 (add_library):
add_library cannot create ALIAS target "OpenEXR::Config" because another
target with the same name already exists.
It's hard to tell what's going wrong here, I don't believe this is a problem we've encountered before. It is likely specific to building on your old OS and toolchain, which homebrew itself says are no longer supported:
Error: You are using macOS 11.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
These are messages from Homebrew itself. The OpenEXR project team does not maintain Homebrew itself, nor even the Homebrew recipe for building OpenEXR.
I doubt that any of us have a way to reproduce the problem given that we don't have any OS installs that old that we can run CI on.
from openexr.
Recently I tried to compile OpenEXR on macOS 10.15 using Homebrew as well, and I encountered the exact same problem ("add_library cannot create ALIAS target"). Then I suspect it was due to the old version of my system. I tried compile it using my macOS 14 machine using brew reinstall openexr --build-from-source
, this problem still happened. Hopefully this will help.
from openexr.
Recently I tried to compile OpenEXR on macOS 10.15 using Homebrew as well, and I encountered the exact same problem ("add_library cannot create ALIAS target"). Then I suspect it was due to the old version of my system. I tried compile it using my macOS 14 machine using
brew reinstall openexr --build-from-source
, this problem still happened. Hopefully this will help.
This issue might be related to Homebrew, not OpenEXR. You can use the command brew --version
to check the version of Homebrew installed on your system. If you have the latest version, you can try downgrading Homebrew to version 4.2.18 before proceeding with the compilation and installation of OpenEXR.
from openexr.
Tested with the latest homebrew, confirmed that the problem no longer exists. This issue could be closed.
from openexr.
Tested with the latest homebrew, confirmed that the problem no longer exists. This issue could be closed.
Hi, may I ask the latest homebrew version you used? Mine is 4.3.3. Also my OS version is Big Sur 11.7.10. Still same error showed. Thanks!
from openexr.
Hi, may I ask the latest homebrew version you used? Mine is 4.3.3. Also my OS version is Big Sur 11.7.10. Still same error showed. Thanks!
I'm also using 4.3.3 on macOS 14.5. Did you run something like brew upgrade
to pull the latest commits which contain the fix for this?
from openexr.
I'm also using 4.3.3 on macOS 14.5. Did you run something like
brew upgrade
to pull the latest commits which contain the fix for this?
Sure, I use brew cleanup
, brew update
, brew upgrade
to update. There is no any error. Once use brew install openexr
to install, error show up:
Last 15 lines from /Users/bur/Library/Logs/Homebrew/openexr/01.cmake:
target with the same name already exists.
CMake Error at cmake/CMakeLists.txt:170 (add_library):
add_library cannot create ALIAS target "OpenEXR::Config" because another
target with the same name already exists.
from openexr.
Sure, I use
brew cleanup
,brew update
,brew upgrade
to update. There is no any error. Once usebrew install openexr
to install, error show up:Last 15 lines from /Users/bur/Library/Logs/Homebrew/openexr/01.cmake: target with the same name already exists. CMake Error at cmake/CMakeLists.txt:170 (add_library): add_library cannot create ALIAS target "OpenEXR::Config" because another target with the same name already exists.
Solve this problem by checkout previous commit of Homebrew.
from openexr.
Related Issues (20)
- About 3.2.126 release HOT 7
- exrenvmap: observed imprecise conversion of cubemap to lat/lon HOT 11
- Provide an API using numpy arrays in python HOT 11
- An integer overflow in file exrmultipart.cpp HOT 3
- Incorrect Values When Reading DWA Compressed Layer With OpenEXRCore HOT 10
- understanding openEXR's 3D coordinate system HOT 7
- tarball at https://github.com/AcademySoftwareFoundation/openexr/releases/download/v3.2.4/openexr-v3.2.4.tar.gz extracts incorrectly HOT 3
- Python crashes when trying to write an output file HOT 2
- Is there any way to write a bigger image?
- [Need suggestions/recommendations] OpenEXR for high-speed images grabbing application scenario. HOT 7
- update metadata without rewriting the entire file HOT 4
- Bazel install target HOT 10
- fatal clang-format error on macOS can't upgrade/install via Homebrew HOT 13
- Cross-compiler target linking failure HOT 1
- Uninitialized sliceOptimizationData::type HOT 2
- [Usage recommendation request] Decompressing large EXRs in real-time. HOT 4
- OpenEXR.OutputFile Fails to Write to BytesIO Buffer HOT 1
- Unit tests fail when building UB2 binaries on Mac. HOT 1
- CMP0107 issue
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 openexr.