macOS Sonoma: Unable to build - Error 404 when attempting to download libclang.7z #410
Replies: 3 comments 2 replies
-
Hello @nedwilson , Are you using a more recent version of XCode than 14.3.1 by chance ? You might find this link useful to give you some tips of how to install XCode 14.3.1 on Sonoma: |
Beta Was this translation helpful? Give feedback.
-
Hi there Bernard,
Thanks so much for getting back to me. I am indeed using Xcode 15.3. I can certainly research options for downgrading to 14.3.1.
I thought it might be easier to see if I could get it to build in the current environment, since I have all of the dependencies, such as FFmpeg, OpenImageIO, OpenColorIO, OSL, etc. all installed via homebrew. Well, OSL I had to download from source and compile, but everything is there.
I had a heck of a time getting it to find yaml-cpp, despite having headers available in /usr/local/include and libraries available in /usr/local/lib. This is the output from that:
…-- Setting namespace to 'OpenColorIO_v2_2' as none was specified.
CMake Error at share/cmake/modules/Findyaml-cpp.cmake:46 (get_target_property):
get_target_property() called with non-existent target "yaml-cpp".
Call Stack (most recent call first):
share/cmake/modules/FindExtPackages.cmake:44 (find_package)
CMakeLists.txt:270 (include)
-- Could NOT find yaml-cpp (missing: yaml-cpp_LIBRARY) (found suitable version "0.8.0", minimum required is "0.7.0")
-- Installing yaml-cpp: /Users/ned/src/OpenRV/_build/RV_DEPS_OCIO/build/ext/dist/lib/libyaml-cpp.a (version "0.7.0")
-- Could NOT find pystring (missing: pystring_INCLUDE_DIR) (Required is at least version "1.1.3")
-- Installing pystring: /Users/ned/src/OpenRV/_build/RV_DEPS_OCIO/build/ext/dist/lib/libpystring.a (version "1.1.3")
-- OpenImageIO includes = /Users/ned/src/OpenRV/_build/RV_DEPS_OIIO/install/include
-- OpenImageIO libraries = /Users/ned/src/OpenRV/_build/RV_DEPS_OIIO/install/lib/libOpenImageIO.2.4.6.dylib
-- OpenImageIO library_dirs = /Users/ned/src/OpenRV/_build/RV_DEPS_OIIO/install/lib
-- Could NOT find OSL (missing: OSL_DIR)
-- Could NOT find OpenShadingLanguage (missing: OSL_INCLUDE_DIR OSL_LIB_DIR OpenShadingLanguage_VERSION) (Required is at least version "1.11")
CMake Warning at share/cmake/modules/FindExtPackages.cmake:241 (message):
Could NOT find OpenShadingLanguage. Skipping build of the OSL unit tests.
Call Stack (most recent call first):
CMakeLists.txt:270 (include)
I was able to get past this by setting certain environment variables, such as:
export CXXFLAGS=“-I/usr/local/Cellar/yaml-cpp/0.8.0/include”
export LDFLAGS=“-L/usr/local/Cellar/yaml-cpp/0.8.0/lib”
Next, it got hung up on trying to compile Boost.
The first error was a reference to std::unary_function in src/boost/container_hash/hash.hpp. Changing this to std::_unary_function fixed this - I assume this is just a symptom of newer versions of the MacOS SDK and Xcode. Unfortunately, now it’s falling here, and sadly, my C++ skills are a little rusty, so I’m effectively stuck:
In file included from ./boost/mpl/integral_c.hpp:32:
./boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
It doesn’t look like OpenRV is designed to build with libraries installed from homebrew - rather, it seems to come pre-packaged with what it needs - is that correct? Or are there ways to point the configuration step towards previously installed headers and libraries?
Thanks!
-n
On Mar 16, 2024, at 2:47 PM, Bernard Laberge ***@***.***> wrote:
Hello @nedwilson <https://github.com/nedwilson> ,
Are you using a more recent version of XCode than 14.3.1 by chance ?
Note that using an XCode version more recent than 14.3.1 will result in build breaks unfortunately due to some dependencies that need to be updated to support XCode 15 such as FFmpeg for example.
You might find this link useful to give you some tips of how to install XCode 14.3.1 on Sonoma:
https://github.com/AcademySoftwareFoundation/OpenRV/blob/main/docs/build_system/config_macos.md#install-xcode
—
Reply to this email directly, view it on GitHub <#410 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADUMFG7YABOIB63OO42PWZDYYS4XNAVCNFSM6AAAAABETAGQAKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DQMJUGY2DC>.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
-
Hi there Bernard,
Thanks so much for the tip! I went ahead and downloaded Xcode 14.3.1, but unfortunately, it simply will not launch under macOS Sonoma.
So - the hard way it is!
I’m happy to try and help as best as I can. I’m not the most skilled developer, but if you can point me in the direction of how I might attempt to compile with external header files and link against external libraries, I can certainly give it a try.
… On Mar 18, 2024, at 6:46 PM, Bernard Laberge ***@***.***> wrote:
Hello @nedwilson <https://github.com/nedwilson>,
You are free to try using the components already installed in your current environment via homebrew but it won't be 'easier'. I can guarantee it !
:-)
The easier way is to download XCode 14.3.1 and to do an sudo xcode-select -s /Applications/Xcode.app on it and then let the Open RV build takes care of building all its dependencies.
One problem with the dependencies provided by homebrew is that you might have only the Apple Silicon (arm64) binaries installed on your system while Open RV requires the Intel binaries (for the time being that is). However, this issue will go away once native mac support is added to the Open RV build. It would be great if we could build RV like you are proposing, by leveraging the components that are already installed via homebrew. Hopefully someone will make it happen one day !
|
Beta Was this translation helpful? Give feedback.
-
When RV is building the Python dependencies, it attempts to retrieve the following URL:
https://mirrors.ocf.berkeley.edu/qt/development_releases/prebuilt/libclang/libclang-release_150-based-macos-universal.7z
It attempts to save this into ${RV_HOME}/_build/RV_DEPS_PYTHON3/build/libclang.7z.
Since the URL produces a 404 Error, a text file is saved instead of a valid .7z archive. When the build script tries to extract it, an exception is thrown, which it does not recover from.
I was able to download libclang-release_140-based-macos-universal.7z from the same UC Berkeley mirror, and copy it to ${RV_HOME}/_build/RV_DEPS_PYTHON3/build/libclang.7z during the build process. Doing so did not result in a successful build, but I was at least able to get past this point.
Beta Was this translation helpful? Give feedback.
All reactions