You are not logged in.

#1 2014-10-24 08:30:21

Plaristote
Member
Registered: 2012-02-07
Posts: 38

Issues with cmake find_package and yaourt

Hey !

I'm working on a project that uses the cppnetlib.
On MacOS, I used brew to install the lib, and my CMakeFile works just fine.
On Arch, I used yaourt, and when it reaches the `find_package` line, here's what happens:

CMake Error at /usr/lib64/cmake/cppnetlib/cppnetlibTargets.cmake:61 (message):
  The imported target "cppnetlib-uri" references the file

    "/tmp/yaourt-tmp-plaristote/aur-cpp-netlib/pkg/cpp-netlib/usr/lib64/libcppnetlib-uri.so.0.11.0"

Any idea why something's referencing yaourt's temporary folder ? And how I would fix that/prevent it in future occurences ?

Offline

#2 2014-10-24 16:14:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,768

Re: Issues with cmake find_package and yaourt

Moving to AUR issues


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-10-24 16:48:58

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Issues with cmake find_package and yaourt

Hi Plaristote,
I downloaded the PKGBUILD for ccp-netlib and after building the package, I can confirm that during the packaging process a file gets some references to the $pkgdir (that in your case is the yoaurt temporary directory). I left a comment with a possible fix on the cpp-netlib AUR page.
Meanwhile, you can edit the PKGBUILD and add the following code to the end of the package() function

for _file in $(find ${pkgdir}/usr/lib/cmake/cppnetlib -type f -name "*.cmake");
do
  sed -i -e "s|${pkgdir}/usr/lib64|${_basedir}/usr/lib|g" $_file
done

About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

Board footer

Powered by FluxBB