Bug 1943862 - Invalid ASSIMP_LIBRARY_DIRS reported from CMake
Summary: Invalid ASSIMP_LIBRARY_DIRS reported from CMake
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: assimp
Version: epel8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Mattes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-27 23:24 UTC by Scott K Logan
Modified: 2024-01-16 15:45 UTC (History)
3 users (show)

Fixed In Version: assimp-5.0.1-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-01-16 15:45:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Scott K Logan 2021-03-27 23:24:24 UTC
Description of problem:
In assimpTargets-release.cmake.in [1], there is an assumption that ASSIMP_LIB_INSTALL_DIR is relative to the prefix. In the spec file, this is configured to %{_libdir}, an absolute path. This results in an invalid ASSIMP_LIBRARY_DIRS value of /usr//usr/lib64.

Version-Release number of selected component (if applicable): 5.0.1-2.el8


How reproducible: 100%


Steps to Reproduce:
1. grep ASSIMP_LIBRARY_DIRS /usr/lib64/cmake/assimp-5.0/assimpTargets-release.cmake 

Actual results:
set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}//usr/lib64")

Expected results:
set( ASSIMP_LIBRARY_DIRS "${ASSIMP_ROOT_DIR}/lib64")

Additional info:
Setting the three ASSIMP_*_INSTALL_DIR values to %{_lib}, bin, and include and rebuilding the package fixed the problem for me, but it might be a better idea to just patch assimpTargets-release.cmake.in to expect the absolute paths. I'm not sure which solution you'd prefer, but I'm happy to open a PR if you'd like me to.

[1] https://github.com/assimp/assimp/blob/8f0c6b04b2257a520aaab38421b2e090204b69df/assimpTargets-release.cmake.in#L94-L95

Comment 1 Rich Mattes 2021-03-29 20:35:42 UTC
It's probably better to update the spec file, it seems we're not using the variables as intended by including absolute paths.  I'll update %{_libdir} with %{_lib} and remove the other two, as the defaults are correct.

Comment 2 Scott K Logan 2021-03-29 20:48:00 UTC
> It's probably better to update the spec file, it seems we're not using the variables as intended by including absolute paths.

I can follow that logic. Thanks for the quick response.

Comment 3 Fedora Update System 2021-03-29 21:25:22 UTC
FEDORA-EPEL-2021-fd1b923c69 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-fd1b923c69

Comment 4 Fedora Update System 2021-03-30 14:46:21 UTC
FEDORA-EPEL-2021-fd1b923c69 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-fd1b923c69

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-04-14 14:26:50 UTC
FEDORA-EPEL-2021-fd1b923c69 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Jan Grulich 2023-01-17 11:55:19 UTC
I'm afraid that the way this was fixed is not correct, because following:
>get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
>
>if ("${LIB64}" STREQUAL "TRUE")
>    set(LIBSUFFIX 64)
>else()
>    set(LIBSUFFIX "")
>endif()

will give you "64" as suffix on i686. This is because apparently CMake sets "FIND_LIBRARY_USE_LIB64_PATHS" to "TRUE" by default everywhere.

See: https://github.com/Kitware/CMake/blob/bcd98b5f9846d7b9d2a6518501eb7ac56139665e/Modules/Platform/UnixPaths.cmake#L105

I currently hit this issue when trying to use system Assimp in qt6-qt3d where my build fails on i686 for this reason.

Comment 7 Scott K Logan 2024-01-04 15:53:28 UTC
Jan, can you confirm that the version in rawhide and f40 no longer suffers from this issue?

Comment 8 Jan Grulich 2024-01-16 15:45:19 UTC
(In reply to Scott K Logan from comment #7)
> Jan, can you confirm that the version in rawhide and f40 no longer suffers
> from this issue?

Hi, I tested it and it seems to work now. Thank you.


Note You need to log in before you can comment on or make changes to this bug.