Pagina 1 di 2

qwt slackware 13.1 x86_64 [risolto]

Inviato: gio 20 gen 2011, 11:16
da so_slack
buon giorno,
Non e possibile compilare qwt - 5.2.1 in slackware x86_64 ?
non c'e un paquete x86-64?
grazie

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 12:52
da 414N
Puoi usare lo SlackBuild su slackbuilds.org per crearti il pacchetto.

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 14:42
da so_slack
ho usato il pacchetto slackbuilds.org ma dice que non e per x86_64 (!)

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 14:58
da 414N
so_slack ha scritto:ho usato il pacchetto slackbuilds.org ma dice que non e per x86_64 (!)
Su slackbuilds.org non ci sono pacchetti, ma script SlackBuild per costruirseli. Devi scaricare l'archivio contentente i sorgenti del programma che vuoi compilare e l'archivio contenente lo SlackBuild. Successivamente, devi lanciare lo script da root per lanciare la compilazione e la creazione del pacchetto.
PS: from what you've written and how you wrote it, I guess you're not italian. If you're more comfortable with english speech, I can direct you to this tutorial on how to use SlackBuild scripts to build your own packages.
If you need further advice, feel free to ask.

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 15:17
da so_slack
yes i'm french
i know very well slackbuild , and i compile often. When i compile the library, using the slackbuild file i have this error
thanks

qwt-5.2.1/examples/cpuplot/cpupiemarker.h
+----------------------+
| Start SlackBuild QWT |
+----------------------+
cd src/ && make -f Makefile
make[1]: entrant dans le repertoire /tmp/txz/qwt/qwt-5.2.1/src
compiling qwt_abstract_scale_draw.cpp
compiling qwt_color_map.cpp
qwt_abstract_scale_draw.cpp:1: erreur: le processeur selectionne ne supporte pas le jeu d'instructions x86-64
qwt_color_map.cpp:1: erreur: le processeur selectionne ne supporte pas le jeu d'instructions x86-64

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 15:36
da 414N
Ah, now I see.
I just tried using that SlackBuild and it seems to be written in the "old" slackbuilds.org format, the one which doesn't autodetect the ARCH you're building on.
Without the autodetection, the ARCH is set to i486 by default. That's why your compilation fails with these errors:

Codice: Seleziona tutto

erreur: le processeur selectionne ne supporte pas le jeu d'instructions x86-64
the build system is trying to build a i486 executable (32 bit) with a 64 bit compiler.
Try launching the SlackBuild like this:

Codice: Seleziona tutto

ARCH=x86_64 su -c ./qwt.SlackBuild
it should solve your issue.
Personally, I put this line in my ~/.bashrc:

Codice: Seleziona tutto

export ARCH=x86_64
in order to avoid specifying it manually every time.
Offtopic: Sorry if I misjudged your abilities with SlackBuild scripts before and if I replied in english, but my french is kinda rusty :)

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 15:40
da so_slack
thank your for your help ;)

but it don't work :p
do you have a x86_64 slackware version to test the compilation ?

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 16:59
da 414N
I just tried building it with the aforementioned SlackBuild, and it did build, indeed.
I modified the SlackBuild to build the latest stable version (5.2.1, as I saw from one of your previous posts it is the version you're interested in), to build on ARCH=x86_64 and I fixed some erroneus paths created by the make install step.

Codice: Seleziona tutto

#!/bin/sh

# Slackware build script for qwt

# Written by Zordrak
# Nobbled from Slacky and sanitised for sanity :)

# Modified by the Slackbuilds.org project

PRGNAM=qwt
VERSION=${VERSION:-5.2.1}
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then
    SLKCFLAGS="-O2 -march=i486 -mtune=i686"
    LIBDIRSUFFIX=""
    BASELIBDIR="lib${LIBDIRSUFFIX}"
elif [ "$ARCH" = "i686" ]; then
    SLKCFLAGS="-O2 -march=i686 -mtune=i686"
    LIBDIRSUFFIX=""
    BASELIBDIR="lib${LIBDIRSUFFIX}"
elif [ "$ARCH" = "x86_64" ]; then
    SLKCFLAGS="-O2 -fPIC"
    LIBDIRSUFFIX="64"
    BASELIBDIR="lib${LIBDIRSUFFIX}"
fi

set -e # Exit on most errors

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

#patch -p1 < $CWD/qwt-5.1.1-qwtconfig.pri.patch
sed -i "s%@BASELIBDIR@%$BASELIBDIR%" qwtconfig.pri

qmake INSTALLBASE=/usr CONFIG+=QwtExamples
make -j${NUMJOBS:-4} \
  CFLAGS="$SLKCFLAGS" \
  CXXFLAGS="$SLKCFLAGS"
make install INSTALL_ROOT=$PKG

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mv $PKG/usr/local/$PRGNAM-$VERSION/doc/man $PKG/usr
( cd $PKG/usr/man
  find . -type f -exec gzip -9 {} \;
  for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
cp -a CHANGES COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ./examples/bin/* $PKG/usr/doc/$PRGNAM-$VERSION/examples
mv $PKG/usr/local/$PRGNAM-$VERSION/doc/html $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

# Fix /usr/local madness T_T

mv $PKG/usr/local/$PRGNAM-$VERSION/lib/* $PKG/usr/lib${LIBDIRSUFFIX}
mv $PKG/usr/local/$PRGNAM-$VERSION/include $PKG/usr
rm -rf $PKG/usr/local

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
Please try this version and see if it works for you, now.

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 17:58
da so_slack
yes with your version it's ok, thank you so much now i can compile qgis :p
mille grazie ! :p

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 18:01
da so_slack
ok now i try to compile qgis
i made a ldconfig
but i have this error
-- Found GSL: -L/usr/lib64 -lgsl -lgslcblas -lm
-- Found GEOS: /usr/lib64/libgeos_c.so
-- Found GDAL: /usr/lib64/libgdal.so
CMake Error at cmake/FindQWT.cmake:41 (MESSAGE):
Could not find QWT
Call Stack (most recent call first):
CMakeLists.txt:143 (FIND_PACKAGE)

it's strange because i installed qwt ....

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 18:25
da 414N
so_slack ha scritto:ok now i try to compile qgis
i made a ldconfig
but i have this error
-- Found GSL: -L/usr/lib64 -lgsl -lgslcblas -lm
-- Found GEOS: /usr/lib64/libgeos_c.so
-- Found GDAL: /usr/lib64/libgdal.so
CMake Error at cmake/FindQWT.cmake:41 (MESSAGE):
Could not find QWT
Call Stack (most recent call first):
CMakeLists.txt:143 (FIND_PACKAGE)

it's strange because i installed qwt ....
My fault.
It seems my SlackBuild puts the qwt shared library in /usr/lib64/lib/libqwt.so.5.2.1.
You can try moving it by hand for now in the correct location (/usr/lib64) and see if cmake complies with it again (run ldconfig before launching the build process for qgis).
If it works, I'll fix the SlackBuild I posted before.

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 18:30
da so_slack
no i made
cp /usr/lib64/lib/libqwt.so.5.2.1 /usr/lib64
ldconfig

whereis libqwt.so.5.2.1
libqwt.so.5.2: /usr/lib64/libqwt.so.5.2.1

and
./qgis.SlackBuild

but same response
-- Found GDAL: /usr/lib64/libgdal.so
CMake Error at cmake/FindQWT.cmake:41 (MESSAGE):
Could not find QWT
Call Stack (most recent call first):
CMakeLists.txt:143 (FIND_PACKAGE)

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 18:37
da 414N
I think I found the culprit.
The template used by the CMakeLists.txt to find qwt tries to locate the shared library only in /usr/lib or /usr/local/lib, so it can't find it on Slackware64.
Try adding this line to the qgis SlackBuild just before cmake is launched:

Codice: Seleziona tutto

sed -i 's|/usr/lib|/usr/lib${LIBDIRSUFFIX}|g' cmake/FindQWT.cmake 
The library should be found now.

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 18:43
da so_slack
like this ?
sed -i 's|/usr/lib|/usr/lib${LIBDIRSUFFIX}|g' cmake/FindQWT.cmake

cmake . \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DQGIS_LIB_SUBDIR=lib${LIBDIRSUFFIX} \
-DQGIS_LIBEXEC_SUBDIR=lib${LIBDIRSUFFIX}/qgis \
-DQGIS_PLUGIN_SUBDIR=lib${LIBDIRSUFFIX}/qgis \
-DWITH_MAPSERVER=FALSE \
$WITHGRASS

it don't work :p
i tried to copy the file in /usr/lib but same problem

Re: qwt slackware 13.1 x86_64

Inviato: gio 20 gen 2011, 19:39
da 414N
Today is a bad day :)
I forgot to change the single quotes in the command with the double quotes.
So it should be like this:

Codice: Seleziona tutto

sed -i "s|/usr/lib|/usr/lib${LIBDIRSUFFIX}|g" cmake/FindQWT.cmake