View Issue Details

IDProjectCategoryView StatusLast Update
0006010ScribusBuild Systempublic2007-09-26 18:48
Reporterfundawang Assigned Tocbradney  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSMandrivaOS Versioncooker
Product Version1.3.3.9cvs 
Target VersionFixed in Version1.3.5svn 
Summary0006010: When building with cmake, scribus is always installed into /usr/lib rather than /usr/lib64
DescriptionAs titled.

Maybe following patch is needed.
Additional Information--- CMakeLists.txt~ 2007-07-19 21:34:32.000000000 +0800
+++ CMakeLists.txt 2007-07-19 21:34:36.000000000 +0800
@@ -79,9 +79,9 @@
 ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SCRIPTSDIR}\\\"")
 SET(TEMPLATEDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/templates/")
 ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${CMAKE_INSTALL_PREFIX}/${TEMPLATEDIR}\\\"")
-SET(LIBDIR "lib/${MAIN_DIR_NAME}${TAG_VERSION}/")
+SET(LIBDIR "lib${LIB_SUFFIX}/${MAIN_DIR_NAME}${TAG_VERSION}/")
 ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"")
-SET(PLUGINDIR "lib/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
+SET(PLUGINDIR "lib${LIB_SUFFIX}/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
 ADD_DEFINITIONS("-DPLUGINDIR=\\\"${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}\\\"")
 set(CMAKE_INSTALL_RPATH ${PLUGINDIR})
TagsNo tags attached.
Patch

Activities

cbradney

2007-07-19 20:38

administrator   ~0016834

who is definining LIB_SUFFIX?

fundawang

2007-07-20 09:45

reporter   ~0016835

In my Mandriva box, there is following rpm macro

$ cat /etc/rpm/macros.d/cmake.macros
#
# Macros for cmake
#
%_cmake_lib_suffix64 -DLIB_SUFFIX=64
%__cmake %{_bindir}/cmake

%cmake \
    CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
    CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
    FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
    mkdir build \
    cd build \
    %__cmake .. \\\
    %if "%{_lib}" != "lib" \
        -DLIB_SUFFIX=64 \\\
    %endif \
    -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
    -DBUILD_SHARED_LIBS:BOOL=ON \\\
    -DBUILD_STATIC_LIBS:BOOL=OFF

And, if you don't select LIB_SUFFIX defination, there must be some other ways to detect buildtarget.

plinnell

2007-07-20 22:20

viewer   ~0016838

Last edited: 2007-07-20 22:53

Easier fix:

#LIB LOCATION - lib or lib64 normally
#LIB
IF(WANT_LIB64)
  SET(LIB_DIR_NAME "lib64" CACHE TYPE STRING)
ELSE(WANT_LIB64)
  SET(LIB_DIR_NAME "lib" CACHE TYPE STRING)
ENDIF(WANT_LIB64)
SET(LIBDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/")
ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"")

#PLUGINS
SET(PLUGINDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
ADD_DEFINITIONS("-DPLUGINDIR=\\\"${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}\\\"")

Then in the spec file:

cmake -DCMAKE_INSTALL_PREFIX=%prefix ../ -DWANT_CAIRO=1 \
%ifarch x86_64 ppc64 s390x mips64 sparc64
cmake -DWANT_LIB64=1 DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} ../ -DWANT_CAIRO=1
%endif
#%endif

fundawang

2007-07-21 02:33

reporter   ~0016842

But it seems that other KDE4/Qt4 applications just accpect LIB_SUFFIX. i.e, without any changes in spec file.

cbradney

2007-07-21 07:50

administrator   ~0016843

That would assume someone is using Mandriva though, and also RPM.

fundawang

2007-07-21 08:03

reporter   ~0016844

OK. No matter the patch will be accepted, there must be some automatic way to detect on build machine. See:
http://kwave.svn.sourceforge.net/viewvc/kwave/trunk/CMakeLists.txt

plinnell

2007-07-26 09:57

viewer   ~0016873

OK, some testing with Novell's build server on Suse and Fedora tells me auto detecting 64 bit arches is not reliable so, my original suggestion seems to be more reliable.

fundawang

2007-07-26 10:02

reporter   ~0016874

Then, LIB_SUFFIX is more preferred. It seems that KDE4 is using that variable too. There is no use introducing another variable for the same thing.

Issue History

Date Modified Username Field Change
2007-07-19 14:05 fundawang New Issue
2007-07-19 20:38 cbradney Note Added: 0016834
2007-07-20 09:45 fundawang Note Added: 0016835
2007-07-20 22:20 plinnell Note Added: 0016838
2007-07-20 22:53 plinnell Note Edited: 0016838
2007-07-21 02:33 fundawang Note Added: 0016842
2007-07-21 07:50 cbradney Note Added: 0016843
2007-07-21 08:03 fundawang Note Added: 0016844
2007-07-21 08:46 plinnell Status new => assigned
2007-07-21 08:46 plinnell Assigned To => plinnell
2007-07-26 09:57 plinnell Note Added: 0016873
2007-07-26 10:02 fundawang Note Added: 0016874
2007-07-26 20:40 cbradney Assigned To plinnell => cbradney
2007-07-29 20:19 cbradney Status assigned => resolved
2007-07-29 20:19 cbradney Fixed in Version => 1.3.5cvs
2007-07-29 20:19 cbradney Resolution open => fixed
2007-09-26 18:48 cbradney Status resolved => closed