Skip to content

OpenImageIO link error when building on macOS #37

@PerspectiveDivideThayer

Description

I recently noticed that there is a macOS branch so I decided to try building it to see what would happen. Unfortunately I was not able to get past running installExternals.py so I am wondering if this branch is still a work in progress that is not yet ready for public consumption. It's not a problem if that's the case, but I would love to use it when it's ready.

As for the error I'm seeing...

I am running the following installExternals.py command line when I received the error below:

python Scripts/installExternals.py --generator Xcode --build-variant Release ../AuroraExternals

And here is the error I received (the full log output is here):

ld: warning: search path '/Users/thayerdev/Documents/Development/GitHub/AuroraExternals/boost/lib/Release' not found
Undefined symbols for architecture arm64:
  "boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, unsigned int, boost::filesystem::detail::directory_iterator_params*, boost::system::error_code*)", referenced from:
      OpenImageIO_v2_5::Filesystem::searchpath_find(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, bool, bool) in filesystem.o
      OpenImageIO_v2_5::Filesystem::get_directory_entries(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) in filesystem.o
      OpenImageIO_v2_5::Filesystem::scan_for_matching_filenames(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<int, std::__1::allocator<int>>&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&) in filesystem.o
  "boost::filesystem::detail::recursive_directory_iterator_construct(boost::filesystem::recursive_directory_iterator&, boost::filesystem::path const&, unsigned int, boost::system::error_code*)", referenced from:
      boost::filesystem::recursive_directory_iterator::recursive_directory_iterator(boost::filesystem::path const&, boost::system::error_code&) in filesystem.o
  "boost::filesystem::detail::copy(boost::filesystem::path const&, boost::filesystem::path const&, unsigned int, boost::system::error_code*)", referenced from:
      OpenImageIO_v2_5::Filesystem::copy(OpenImageIO_v2_5::basic_string_view<char, std::__1::char_traits<char>>, OpenImageIO_v2_5::basic_string_view<char, std::__1::char_traits<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) in filesystem.o
  "boost::filesystem::detail::absolute(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*)", referenced from:
      OpenImageIO_v2_5::Filesystem::find_program(OpenImageIO_v2_5::basic_string_view<char, std::__1::char_traits<char>>) in filesystem.o
      OpenImageIO_v2_5::Filesystem::find_program(OpenImageIO_v2_5::basic_string_view<char, std::__1::char_traits<char>>) in filesystem.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am curious if the initial ld: warning: ... message is relevant. It seems like it's not since the boost libraries are being referenced in the linker arguments with full paths and ld seems to be finding them correctly.

When looking through the full log output I see that /Users/thayerdev/Documents/Development/GitHub/AuroraExternals/boost/lib/libboost_filesystem.dylib is present in the linker arguments, this file does exist at that path on my disk, it is an arm64 dylib, and when I run nm on it I can see that directory_iterator_construct is a defined symbol. So I'm not sure what might be wrong but so far I'm unable to get past this obstacle.

I am building with the following setup:
M1 Mac Mini
Sonoma 14.5
Xcode 15.4
CMake 3.29.8
Python 3.11.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions