cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake

japhir
Hi all!

I use cgal version 4.9-1

When trying to `cmake` a package (GPlates, currently making AUR package), that uses the line `include(${CGAL_USE_FILE})`, on my Arch Linux (4.10.6-1-ARCH) machine I get the following error:
```
CMake Error at src/CMakeLists.txt:86 (include):
  include could not find load file:

    /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake
```

This is because `UseCGAL.cmake` is located in `/usr/lib/CGAL`, and not in that subdirectory.

The directory seems to be set with the variable `CGAL_MODULES_DIR`, which is set in `/usr/lib/CGAL/UseCGAL.cmake` by the line `set(CGAL_MODULES_DIR"${CGAL_INSTALL_PREFIX}/lib64/CGAL" )`

But it should be overwritten by these lines in the same file, if I'm correct.
```
# CGAL_DIR is the directory where this CGALConfig.cmake is installed
string(REPLACE "lib64/CGAL" "" CGAL_INSTALL_PREFIX "${CGAL_CONFIG_DIR}")
```

I've tried to pass `-DCGAL_DIR:PATH=/usr/lib/CGAL` to make cmake command, but this doesn't fix the issue.

This link describes someone else's trouble with CGAL's dir. It might also have something to do with the qt4 building that is referred to later on in the discussion.
http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html

Basically my question is: help! I'm confused by if the implementation on my distro (https://www.archlinux.org/packages/community/x86_64/cgal/) is wrong, or if I need to make it with qt4, or how I can pass the correct arguments to cmake, such that it will compile.

Kind regards!

Ilja
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake

Piero Toffanin
Hello!

What are the contents of your CMakeFiles.txt?

I'm also on 4.10.6-1-ARCH and I used this one two days ago with success
for a single file CGAL program:

------

# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.


project( test_ )

cmake_minimum_required(VERSION 2.8.10)

find_package(CGAL QUIET COMPONENTS Core )

if ( CGAL_FOUND )

   include( ${CGAL_USE_FILE} )
   include_directories(${EIGEN3_INCLUDE_DIR})

   include( CGAL_CreateSingleSourceCGALProgram )

   create_single_source_cgal_program( "test.cpp" )

else()

     message(STATUS "This program requires the CGAL library, and will
not be compiled.")

endif()

-----

I don't think the CGAL package is at fault in this case.


On 04/04/2017 08:22 AM, japhir wrote:

> Hi all!
>
> I use cgal version 4.9-1
>
> When trying to `cmake` a package (GPlates, currently making AUR package),
> that uses the line `include(${CGAL_USE_FILE})`, on my Arch Linux
> (4.10.6-1-ARCH) machine I get the following error:
> ```
> CMake Error at src/CMakeLists.txt:86 (include):
>    include could not find load file:
>
>      /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake
> ```
>
> This is because `UseCGAL.cmake` is located in `/usr/lib/CGAL`, and not in
> that subdirectory.
>
> The directory seems to be set with the variable `CGAL_MODULES_DIR`, which is
> set in `/usr/lib/CGAL/UseCGAL.cmake` by the line
> `set(CGAL_MODULES_DIR"${CGAL_INSTALL_PREFIX}/lib64/CGAL" )`
>
> But it should be overwritten by these lines in the same file, if I'm
> correct.
> ```
> # CGAL_DIR is the directory where this CGALConfig.cmake is installed
> string(REPLACE "lib64/CGAL" "" CGAL_INSTALL_PREFIX "${CGAL_CONFIG_DIR}")
> ```
>
> I've tried to pass `-DCGAL_DIR:PATH=/usr/lib/CGAL` to make cmake command,
> but this doesn't fix the issue.
>
> This link describes someone else's trouble with CGAL's dir. It might also
> have something to do with the qt4 building that is referred to later on in
> the discussion.
> http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html
>
> Basically my question is: help! I'm confused by if the implementation on my
> distro (https://www.archlinux.org/packages/community/x86_64/cgal/) is wrong,
> or if I need to make it with qt4, or how I can pass the correct arguments to
> cmake, such that it will compile.
>
> Kind regards!
>
> Ilja
>
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/cmake-problem-could-not-load-file-usr-lib-CGAL-lib64-CGAL-UseCGAL-cmake-tp4662628.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake

Piero Toffanin

p.s. you can comment out the include_directories(${EIGEN3_INCLUDE_DIR}) directive.


On 04/04/2017 08:44 AM, Piero Toffanin wrote:
Hello!

What are the contents of your CMakeFiles.txt?

I'm also on 4.10.6-1-ARCH and I used this one two days ago with success for a single file CGAL program:

------

# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.


project( test_ )

cmake_minimum_required(VERSION 2.8.10)

find_package(CGAL QUIET COMPONENTS Core )

if ( CGAL_FOUND )

  include( ${CGAL_USE_FILE} )
  include_directories(${EIGEN3_INCLUDE_DIR})

  include( CGAL_CreateSingleSourceCGALProgram )

  create_single_source_cgal_program( "test.cpp" )

else()

    message(STATUS "This program requires the CGAL library, and will not be compiled.")

endif()

-----

I don't think the CGAL package is at fault in this case.


On 04/04/2017 08:22 AM, japhir wrote:
Hi all!

I use cgal version 4.9-1

When trying to `cmake` a package (GPlates, currently making AUR package),
that uses the line `include(${CGAL_USE_FILE})`, on my Arch Linux
(4.10.6-1-ARCH) machine I get the following error:
```
CMake Error at src/CMakeLists.txt:86 (include):
   include could not find load file:

     /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake
```

This is because `UseCGAL.cmake` is located in `/usr/lib/CGAL`, and not in
that subdirectory.

The directory seems to be set with the variable `CGAL_MODULES_DIR`, which is
set in `/usr/lib/CGAL/UseCGAL.cmake` by the line
`set(CGAL_MODULES_DIR"${CGAL_INSTALL_PREFIX}/lib64/CGAL" )`

But it should be overwritten by these lines in the same file, if I'm
correct.
```
# CGAL_DIR is the directory where this CGALConfig.cmake is installed
string(REPLACE "lib64/CGAL" "" CGAL_INSTALL_PREFIX "${CGAL_CONFIG_DIR}")
```

I've tried to pass `-DCGAL_DIR:PATH=/usr/lib/CGAL` to make cmake command,
but this doesn't fix the issue.

This link describes someone else's trouble with CGAL's dir. It might also
have something to do with the qt4 building that is referred to later on in
the discussion.
http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html

Basically my question is: help! I'm confused by if the implementation on my
distro (https://www.archlinux.org/packages/community/x86_64/cgal/) is wrong,
or if I need to make it with qt4, or how I can pass the correct arguments to
cmake, such that it will compile.

Kind regards!

Ilja




--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/cmake-problem-could-not-load-file-usr-lib-CGAL-lib64-CGAL-UseCGAL-cmake-tp4662628.html
Sent from the cgal-discuss mailing list archive at Nabble.com.




--

Piero Toffanin
IT Business Consultant

masseranolabs.com
<a href="tel:+12184619746">+1(218)461-9746
@pierotofy
<a href="skype:pierotofy?call">pierotofy

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake

japhir
It's a pretty huge file, so I've put it on pastebin: https://pastebin.com/rY9Usdp9.
The rest of the build files for GPlates are located in their source file: https://sourceforge.net/projects/gplates/files/gplates/2.0/gplates-2.0.0-unixsrc.tar.bz2/download

How do I go about testing the simple file? I'm currently reading the manual ;-).

Thanks!

Ilja Kocken, MSc. PhD Stratigraphy & Palaeontology Earth Sciences Utrecht University | van Unnik building room 5.20 | Heidelberglaan 2, 3584 CS Utrecht [hidden email]


From: [hidden email] [[hidden email]] on behalf of Piero Toffanin [[hidden email]]
Sent: Tuesday, April 04, 2017 14:47
To: [hidden email]
Subject: Re: [cgal-discuss] cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake

p.s. you can comment out the include_directories(${EIGEN3_INCLUDE_DIR}) directive.


On 04/04/2017 08:44 AM, Piero Toffanin wrote:
Hello!

What are the contents of your CMakeFiles.txt?

I'm also on 4.10.6-1-ARCH and I used this one two days ago with success for a single file CGAL program:

------

# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.


project( test_ )

cmake_minimum_required(VERSION 2.8.10)

find_package(CGAL QUIET COMPONENTS Core )

if ( CGAL_FOUND )

  include( ${CGAL_USE_FILE} )
  include_directories(${EIGEN3_INCLUDE_DIR})

  include( CGAL_CreateSingleSourceCGALProgram )

  create_single_source_cgal_program( "test.cpp" )

else()

    message(STATUS "This program requires the CGAL library, and will not be compiled.")

endif()

-----

I don't think the CGAL package is at fault in this case.


On 04/04/2017 08:22 AM, japhir wrote:
Hi all!

I use cgal version 4.9-1

When trying to `cmake` a package (GPlates, currently making AUR package),
that uses the line `include(${CGAL_USE_FILE})`, on my Arch Linux
(4.10.6-1-ARCH) machine I get the following error:
```
CMake Error at src/CMakeLists.txt:86 (include):
   include could not find load file:

     /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake
```

This is because `UseCGAL.cmake` is located in `/usr/lib/CGAL`, and not in
that subdirectory.

The directory seems to be set with the variable `CGAL_MODULES_DIR`, which is
set in `/usr/lib/CGAL/UseCGAL.cmake` by the line
`set(CGAL_MODULES_DIR"${CGAL_INSTALL_PREFIX}/lib64/CGAL" )`

But it should be overwritten by these lines in the same file, if I'm
correct.
```
# CGAL_DIR is the directory where this CGALConfig.cmake is installed
string(REPLACE "lib64/CGAL" "" CGAL_INSTALL_PREFIX "${CGAL_CONFIG_DIR}")
```

I've tried to pass `-DCGAL_DIR:PATH=/usr/lib/CGAL` to make cmake command,
but this doesn't fix the issue.

This link describes someone else's trouble with CGAL's dir. It might also
have something to do with the qt4 building that is referred to later on in
the discussion.
http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html

Basically my question is: help! I'm confused by if the implementation on my
distro (https://www.archlinux.org/packages/community/x86_64/cgal/) is wrong,
or if I need to make it with qt4, or how I can pass the correct arguments to
cmake, such that it will compile.

Kind regards!

Ilja




--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/cmake-problem-could-not-load-file-usr-lib-CGAL-lib64-CGAL-UseCGAL-cmake-tp4662628.html
Sent from the cgal-discuss mailing list archive at Nabble.com.




--

Piero Toffanin
IT Business Consultant

masseranolabs.com
<a href="tel:&#43;12184619746" target="_blank">+1(218)461-9746
@pierotofy
pierotofy

Loading...