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

Fix for building libtiff with Xcode 12 #1315

Merged
merged 2 commits into from
Sep 30, 2020
Merged

Fix for building libtiff with Xcode 12 #1315

merged 2 commits into from
Sep 30, 2020

Conversation

meshula
Copy link
Member

@meshula meshula commented Sep 9, 2020

Description of Change(s)

This fix elides an option from the build command line sent to libtiff, to deal with the --version-script option no longer being recognized as of Xcode 12.

Fixes Issue(s)

Ld /Users/dp/Projects/usd-py3env/build/tiff-4.0.7/libtiff/Release/libtiff.5.2.5.dylib normal x86_64
cd /Users/dp/Projects/usd-py3env/src/tiff-4.0.7
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.15 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/dp/Projects/usd-py3env/build/tiff-4.0.7/libtiff/Release -F/Users/dp/Projects/usd-py3env/build/tiff-4.0.7/libtiff/Release -filelist /Users/dp/Projects/usd-py3env/build/tiff-4.0.7/libtiff/tiff.build/Release/tiff.build/Objects-normal/x86_64/tiff.5.2.5.LinkFileList -install_name /libtiff.5.2.5.dylib -Xlinker -rpath -Xlinker /Users/dp/Projects/usd-py3env/lib -Xlinker -rpath -Xlinker /Users/dp/opt/miniconda3/envs/usd-py3env/lib -Wl,--version-script=/Users/dp/Projects/usd-py3env/src/tiff-4.0.7/libtiff/libtiff.map -dynamiclib -Wl,-headerpad_max_install_names -install_name @rpath/libtiff.5.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libm.tbd /Users/dp/Projects/usd-py3env/lib/libz.dylib /Users/dp/Projects/usd-py3env/lib/libjpeg.dylib /Users/dp/opt/miniconda3/envs/usd-py3env/lib/liblzma.dylib -compatibility_version 5.0.0 -current_version 5.2.5 -Xlinker -dependency_info -Xlinker /Users/dp/Projects/usd-py3env/build/tiff-4.0.7/libtiff/tiff.build/Release/tiff.build/Objects-normal/x86_64/tiff.5.2.5_dependency_info.dat -o /Users/dp/Projects/usd-py3env/build/tiff-4.0.7/libtiff/Release/libtiff.5.2.5.dylib
ld: unknown option: --version-script=/Users/dp/Projects/usd-py3env/src/tiff-4.0.7/libtiff/libtiff.map
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

@jtran56
Copy link

jtran56 commented Sep 9, 2020

Filed as internal issue #USD-6330

build_scripts/build_usd.py Outdated Show resolved Hide resolved
@drwave
Copy link

drwave commented Sep 14, 2020 via email

@meshula meshula changed the title Fix for building libtiff under Big Sur Fix for building libtiff with Xcode 12 Sep 16, 2020
@meshula
Copy link
Member Author

meshula commented Sep 16, 2020

@drwave Looking at what the libtiff cmakefile is doing, it doesn't seem like it would be legit for Apple to update clang to match this corner case behavior. The script that ships with libtiff says:

# Check if LD supports linker scripts, and define automake conditional
# HAVE_LD_VERSION_SCRIPT if so.  This functionality is currently
# constrained to compilers using GNU ld on ELF systems or systems
# which provide an adequate emulation thereof.

I don't spot a value add there. I broadened the scope of this patch to skip the script on Windows as well.

@pixar-oss pixar-oss merged commit 84459ec into PixarAnimationStudios:dev Sep 30, 2020
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.

5 participants