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

clang10 and pkgconfig issues with v1.11.4.1-dev #1155

Open
plater opened this issue Apr 21, 2020 · 4 comments
Open

clang10 and pkgconfig issues with v1.11.4.1-dev #1155

plater opened this issue Apr 21, 2020 · 4 comments

Comments

@plater
Copy link

plater commented Apr 21, 2020

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
See: https://build.opensuse.org/package/show/home:plater:blender/OpenShadingLanguage

@lgritz
Copy link
Collaborator

lgritz commented May 8, 2020

OH, I see, there is an error in the .pc.in files!

I will make a patch to fix it.

@lgritz
Copy link
Collaborator

lgritz commented May 8, 2020

For the version issue, the real bug was that the .pc.in files said PACKAGE_VERSION when they should have said PROJECT_VERSION. That is the correct fix rather than setting an additional PACKAGE_VERSION set of variables.

Proposed fix for that is here: #1168

@lgritz
Copy link
Collaborator

lgritz commented May 8, 2020

I'm not sure I know how to solve the first problem you mention. If you know specifically how to fix it, a patch would be very helpful.

@plater
Copy link
Author

plater commented May 8, 2020

We would have to locate where the relevant flags are created and use an
if (${LLVM_PACKAGE_VERSION} VERSION_GREATER "9.9")conditional maybe.

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

No branches or pull requests

2 participants