Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 696914 - media-libs/assimp-4.0.1 - files/findassimp-3.3.1.patch: incorrect library path for AMD64
Summary: media-libs/assimp-4.0.1 - files/findassimp-3.3.1.patch: incorrect library pat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Sławek Lis (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-10-07 18:34 UTC by Maksym Sditanov
Modified: 2019-10-11 09:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maksym Sditanov 2019-10-07 18:34:35 UTC
Description:

assimp library consumers can't find assimp library due to incorrect path in cmake module.

Reason:

Original files/findassimp-3.3.1.patch contains:

        find_library(
          assimp_LIBRARIES
          NAMES assimp
-         PATHS /usr/local/lib/
+         PATHS /usr/lib/
        )

For AMD64 platforms library libassimp.so.4.0.1 installs to /usr/lib64.

The lib->lib64 compatibility symlink is removed (see 2019-06-05-amd64-17-1-profiles-are-now-stable news).

Fix:
Add path hint for /usr/lib64. Should be like:

--- a/cmake-modules/Findassimp.cmake    2016-09-26 07:52:09.719727490 +0200
+++ b/cmake-modules/Findassimp.cmake    2016-09-26 07:52:28.509727838 +0200
@@ -55,13 +55,13 @@
        find_path(
          assimp_INCLUDE_DIRS
          NAMES postprocess.h scene.h version.h config.h cimport.h
-         PATHS /usr/local/include/
+         PATHS /usr/include/
        )
 
        find_library(
          assimp_LIBRARIES
          NAMES assimp
-         PATHS /usr/local/lib/
+         PATHS /usr/lib/
+         PATHS /usr/lib64/
        )
 
        if (assimp_INCLUDE_DIRS AND assimp_LIBRARIES)
@@ -78,4 +78,4 @@
          endif (assimp_FIND_REQUIRED)
        endif (assimp_FOUND)
 
-endif(WIN32)
\ Brak znaku nowej linii na końcu pliku
+endif(WIN32)


Thanks
Comment 1 Maksym Sditanov 2019-10-07 18:49:54 UTC
P.S. Also create pull request for upstream: https://github.com/assimp/assimp/pull/2699
Comment 2 Maksym Sditanov 2019-10-07 19:13:02 UTC
+ Update: Also requires to fix-up include path in files/findassimp-3.3.1.patch (see upstream pull requites).


So find_path should be:

       find_path(
          assimp_INCLUDE_DIRS
          NAMES assimp/postprocess.h assimp/scene.h assimp/version.h assimp/config.h assimp/cimport.h
          PATHS /usr/local/include
          PATHS /usr/include/

        )
Comment 3 Sławek Lis (RETIRED) gentoo-dev 2019-10-09 05:44:08 UTC
Updated in version 4.1.0, please verify.
Thanks
Comment 4 Maksym Sditanov 2019-10-09 14:13:03 UTC
Hi @Sławek Lis

Thank you for applying patchset. Already got update by portage and library path seems OK now. 

Unfortunately, for proper work findassimp*.patch should also modify NAMES variable and include assimp prefix to all *.h files in find_path rule (Sorry, didn't obviously mention it in my comment https://bugs.gentoo.org/696914#c2)

find_path(
          assimp_INCLUDE_DIRS
          NAMES assimp/postprocess.h assimp/scene.h assimp/version.h assimp/config.h assimp/cimport.h
          PATHS /usr/local/include
          PATHS /usr/include/
        )

P.S. Upstream applied pull request https://github.com/assimp/assimp/pull/2699 with those fixes. I think, findassimp*.patch can be drop in next assimp release.

Thanks
Comment 5 Sławek Lis (RETIRED) gentoo-dev 2019-10-10 19:14:04 UTC
I've missed that part, sorry.
Updated patch.

Thank you very much for help!
Comment 6 Maksym Sditanov 2019-10-11 09:00:57 UTC
This issue resolved now. Re-checked on my side

Thanks.