Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Python 3.11 builds with Boost 1.82 #2742

Closed
wants to merge 1 commit into from

Conversation

dgovil
Copy link
Collaborator

@dgovil dgovil commented Oct 18, 2023

Description of Change(s)

This PR resolves #2741 by using Boost 1.82 for Python 3.11 or above, in accordance with VFX Platform CY2024.

Fixes Issue(s)

#2741

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@jesschimein
Copy link
Contributor

Filed as internal issue #USD-8843

@sunyab
Copy link
Contributor

sunyab commented Dec 12, 2023

@dgovil Hey Dhruv, I'm looking at merging this in but I'm running into issues building OpenImageIO on my Linux machine with this change. I get a bunch of undefined reference errors with boost::filesystem, like below. Do you see anything similar on your machine?

/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/libOpenImageIO_Util.so.2.3.21: undefined reference to `boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, unsigned int, boost::system::error_code*)'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/libOpenImageIO_Util.so.2.3.21: undefined reference to `boost::filesystem::path::extension() const'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/libOpenImageIO_Util.so.2.3.21: undefined reference to `boost::filesystem::path::root_directory() const'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/libOpenImageIO_Util.so.2.3.21: undefined reference to `boost::filesystem::path::parent_path() const'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/libOpenImageIO_Util.so.2.3.21: undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/libOpenImageIO_Util.so.2.3.21: undefined reference to `boost::filesystem::path::replace_extension(boost::filesystem::path const&)'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/libOpenImageIO_Util.so.2.3.21: undefined reference to `boost::filesystem::path::filename() const'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/libOpenImageIO_Util.so.2.3.21: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'

@dgovil
Copy link
Collaborator Author

dgovil commented Dec 12, 2023

Oh interesting. I must have built without OIIO. I'll check that out today and get back to you

@dgovil
Copy link
Collaborator Author

dgovil commented Dec 12, 2023

Still looking for OIIO, but I was hitting an issue when I updated my Toolchain and Boost's fallback to C++03 was using deprecated symbols. I've set Boost to Cxx17 on macOS, though I think at some point we should do that across the board? I don't have a Win/Linux build setup to test if they also need 17 or not.

@dgovil
Copy link
Collaborator Author

dgovil commented Dec 12, 2023

@sunyab , at least on macOS with Clang 15, I'm not getting a compile error with OIIO. I did have to make a change to Boost for macOS to use C++17 and I wonder if adding those cxxflags to Linux as well would fix things for you?

@sunyab
Copy link
Contributor

sunyab commented Dec 12, 2023

I was able to get past my issue by updating my version of CMake to latest. I was running 3.25.3 which didn't have explicit support for boost 1.82.

So what I'd propose is:

  • File a separate PR for the boost C++17 changes.

  • For this PR, let's go back to what you had originally, but also add a check for CMake version here so that users are required to have 3.27 or above in this case:

    if context.buildPython and pyVer >= (3, 10):

If you'd like, I'd be happy to take this off your plate and make these changes locally since I'm already in the middle of testing builds anyway. What do you think?

@dgovil
Copy link
Collaborator Author

dgovil commented Dec 12, 2023

Ah interesting. Yeah, if you're already in there, it's probably faster if you do it since I won't be able to adequately test Linux. Thank you!

Split out the CXX17 PR here #2868

@dgovil dgovil mentioned this pull request Dec 12, 2023
2 tasks
@sunyab
Copy link
Contributor

sunyab commented Dec 15, 2023

I've checked in an updated version of this PR internally and it'll go out with the next updates to the dev branch. Closing this out, thanks!

@sunyab sunyab closed this Dec 15, 2023
@dgovil dgovil deleted the python311_boost182 branch December 15, 2023 00:54
@dgovil
Copy link
Collaborator Author

dgovil commented Dec 15, 2023

Thanks, Sunya!

pixar-oss pushed a commit that referenced this pull request Dec 15, 2023
Python 3.11 requires updated versions of CMake (3.27+) and
boost (1.82.0+).

This change builds off PR #2742 by @dgovil.

Fixes #2742

(Internal change: 2309146)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants