Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared library install path suffix not defined #12

Closed
svalx opened this issue Dec 20, 2012 · 4 comments
Closed

Shared library install path suffix not defined #12

svalx opened this issue Dec 20, 2012 · 4 comments

Comments

@svalx
Copy link

svalx commented Dec 20, 2012

I"m building a vlc-qt for openSUSE 12.2 x86_64 by following the instructions in the INSTALL file:
$ cmake . -DCMAKE_INSTALL_PREFIX=/usr
$ make

make install.

and have issue with install path of .so and .pc files - there are installs to /usr/lib, not /usr/lib64 directory. It is wrong. RPM build also provides related errors. This is because the ${LIB_SUFFIX} is not defined in CMake and not passed explicitly by -DLIB_SUFFIX=64. In addition, libvlc-qt.pc install path omit LIB_SUFFIX. I wrote a patch:

--- CMakeLists.txt.orign 2012-12-21 00:40:21.747455383 +0400
+++ CMakeLists.txt 2012-12-21 00:43:50.383082960 +0400
@@ -143,6 +143,12 @@
SET(VLCQT_BINARY ${CMAKE_BINARY_DIR}/src/libvlc-qt.so)
ENDIF(MINGW)

+# Define shared library path suffix if not defined
+IF(NOT DEFINED LIB_SUFFIX)

  • IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64)
  •    SET(LIB_SUFFIX 64)
    
  • ENDIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64)
    +ENDIF(NOT DEFINED LIB_SUFFIX)

###########

Version

--- pkgconfig/CMakeLists.txt.orign 2012-12-20 21:18:44.327638377 +0400
+++ pkgconfig/CMakeLists.txt 2012-12-20 21:48:54.215499798 +0400
@@ -27,4 +27,4 @@
################

Installation

################
-INSTALL(FILES ${CMAKE_BINARY_DIR}/pkgconfig/libvlc-qt.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/pkgconfig/libvlc-qt.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig)

@svalx svalx closed this as completed Dec 20, 2012
@svalx svalx reopened this Dec 20, 2012
@ntadej
Copy link
Member

ntadej commented Dec 21, 2012

Is this Suse specific or for all recent Linux systems. I don"t want to break anything.

@svalx
Copy link
Author

svalx commented Dec 21, 2012

LIB_SUFFIX=64 for 64-bit Linux systems defined by Filesystem Hierarchy Standard and it is correctly at least for openSUSE and Fedora. In any case, may give any suffix for library path by use CMake -DLIB_SUFFIX option. "64" suffix automatically sets only if LIB_SUFFIX on 64-bit system not defined explicitly, for example by %cmake macros from rpm build system.

@ntadej
Copy link
Member

ntadej commented Dec 22, 2012

This libsuffix might not be used on Debian-based systems (there were some issues with missing symlinks for compatibility but I don"t want to break anything currently). You can manually set -DLIB_SUFFIX.

@ntadej ntadej closed this as completed Dec 22, 2012
@svalx
Copy link
Author

svalx commented Dec 24, 2012

Ok. Thank you ntadej.

akien-mga referenced this issue in open-source-parsers/jsoncpp Aug 17, 2016
RPM-based distros such as Fedora or Mageia put 64bit libraries in /usr/lib64
while 32bit libraries go to /usr/lib. This is usually taken into account
in CMake projects using a LIB_SUFFIX parameter that can be set to "" or "64".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants