AcademySoftwareFoundation / AcademySoftwareFoundation/OpenShadingLanguage

clang10 and pkgconfig issues with v1.11.4.1-dev

Open
#1,155 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.3k
Forks
414
Avg merge
3d 1h
Merged PRs (30d)
10

Description

With gcc9 and clang10 libclang-cpp has been introduced resulting in liboslexec and liboslcomp failing at link time, sorry I didn't have time to make a patch, I work around this in the spec file with:
%if 0%{?llvm_version} >= 10
"#" Add missing -lclang-cpp to linker scripts for liboslcomp and liboslexec
sed -i 's/\-ldl /\-ldl \-lclang-cpp /' src/liboslexec/CMakeFiles/oslexec.dir/link.txt
sed -i 's/\-ldl /\-ldl \-lclang-cpp /' src/liboslcomp/CMakeFiles/oslcomp.dir/link.txt
%endif
I'm not 100% sure when libclang was split but it wasn't in clang7 but it is in clang10
The other issue I made a patch for is:
CMakeLists.txt fails to provide Version:
@PACKAGE_VERSION_MAJOR@.@PACKAGE_VERSION_MINOR@.@PACKAGE_VERSION_PATCH@ for pc files resulting in a Version: field of .. I wouldn't have picked this up but rpmbuild chokes on the .. Version field when it creates the pkgconfig() provides.
[osl-pkgconfig-versions.patch.txt](https://github.com/imageworks/OpenShadingLanguage/files/4508954/osl-pkgconfig-versions.patch.txt)
See: https://build.opensuse.org/package/show/home:plater:blender/OpenShadingLanguage

Contributor guide

Open the contributing guide

Research direction

Reproduce the clang10/gcc9 build and inspect CMakeLists.txt plus src/liboslexec/CMakeFiles/oslexec.dir/link.txt and src/liboslcomp/CMakeFiles/oslcomp.dir/link.txt. Review the attached osl-pkgconfig-versions.patch.txt and verify that linking succeeds and generated pkg-config files contain a valid Version field acceptable to rpmbuild.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.