Cmake destination on 64-bit machines

Hello all,

Cmake seems to insist on installing all libraries in /usr/local/lib
instead on /usr/local/lib64. I can’t find an obvious way to define
a destination path in cmake, or an architecture.

My machine is an AMD64, running Slackware, where the difference between
32 and 64 bit libraries is defined by the directories. So, the
installation in lib causes quite a few problems…

What I found until now:
Tracing the execution of cmake:

CMakeSystem.cmake(6): SET(CMAKE_SYSTEM_PROCESSOR x86_64 )
GrPlatform.cmake(43): if(NOT DEFINED LIB_SUFFIX AND REDHAT AND
CMAKE_SYSTEM_PROCESSOR MATCHES 64$ )
GrPlatform.cmake(46): set(LIB_SUFFIX ${LIB_SUFFIX} CACHE STRING lib
directory suffix )

REDHAT isn’t defined (I believe) and neither is LIB_SUFFIX. So I tried
to run cmake:

cmake --DREDHAT --DLIB_SUFFIX=64 …

Still installs in lib instead of lib64.

Suggestions Please!

John

cmake --DREDHAT --DLIB_SUFFIX=64 …

Still installs in lib instead of lib64.

I think its the double dashes. Try -DLIB_SUFFIX=64

-josh

On Sun, 04 Mar 2012 09:20:07 -0800
Josh B. [email protected] wrote:

Still installs in lib instead of lib64.

I think its the double dashes. Try -DLIB_SUFFIX=64

Yes! Thanks… But why the double dash on --DREDHAT ?

John

On 03/04/2012 11:48 AM, John C. wrote:

On Sun, 04 Mar 2012 09:20:07 -0800
Josh B. [email protected] wrote:

Still installs in lib instead of lib64.

I think its the double dashes. Try -DLIB_SUFFIX=64

Yes! Thanks… But why the double dash on --DREDHAT ?

I dont recommend it. I think all the double dash arguments are ignored.

BTW, how would you detect a slackware install for the cmake build. Is
there a friendly etc file hanging around, just like debian/redhat
detection?

-Josh

On Mon, 05 Mar 2012 08:14:27 -0800
Josh B. [email protected] wrote:

I think its the double dashes. Try -DLIB_SUFFIX=64

Yes! Thanks… But why the double dash on --DREDHAT ?

I dont recommend it. I think all the double dash arguments are ignored.

Single dash (-DREDHAT) isn’t accepted - maybe it’s necessary to
set -DREDHAT=1 or so. I didn’t try that.

I’m chasing a linking error, where an old libpng.12 library pops up,
which then collides with the last version .15. For some reason grc
links with libxfce (which contains the old png version). I compile
loads of programs, never had this problem…

BTW, how would you detect a slackware install for the cmake build. Is
there a friendly etc file hanging around, just like debian/redhat detection?

/etc/slackware-version

is one of the first files installed on any slackware system. It
contains a simple string like:

Slackware 13.37.0

Architecture might be detectable from uname?

Cheers,
John

On 03/05/2012 11:00 AM, John C. wrote:

set -DREDHAT=1 or so. I didn’t try that.

try -DREDHAT=TRUE, that seems like it should work, since the build
system isnt otherwise setting REDHAT to false, its just undefined when
not detected.

On the other hand, here is a diff to detect slackware:
http://pastebin.com/n2aXKJzz

-Josh

On Mon, Mar 12, 2012 at 09:38, John C. [email protected] wrote:

Both solutions work fine. I applied the patch, and would suggest to
include it to help other stray Slackware users :wink:

This was done. Thanks, Josh.

Johnathan

On Mon, 05 Mar 2012 14:39:54 -0800
Josh B. [email protected] wrote:

try -DREDHAT=TRUE, that seems like it should work, since the build
system isnt otherwise setting REDHAT to false, its just undefined when
not detected.

On the other hand, here is a diff to detect slackware:
http://pastebin.com/n2aXKJzz

Thanks once again, Josh.

Both solutions work fine. I applied the patch, and would suggest to
include it to help other stray Slackware users :wink:

BTW, I also solved the png dependencies I had problems with.

John

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs