Repository 32bit  Forum
Repository 64bit  Wiki

Slamd64, compilare librerie a 32bit e a 64bit [RISOLTO]

Forum dedicato ai Porting ufficiali e non di Slackware, vedi Slack/390, ARMedslack, Slamd64, Slackintosh, Ocsid, Sloox, Zenwalk, How-Tux, Slax etc etc

Moderatore: Staff

Regole del forum
1) Specificare nome e versione del porting.
2) Specificare se discussione/suggerimento o richiesta d'aiuto.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.

La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.

Slamd64, compilare librerie a 32bit e a 64bit [RISOLTO]

Messaggioda Smjert » mar nov 13, 2007 16:59

Salve a tutti,
Mi stavo pacchettizzando Firestarter per poi installarmelo su Slamd64, nel fare ciò il configure mi ha chiesto parecchi pacchetti e quindi varie dipendenze, tra cui gtx+-2.0 o maggiori.
Cercando gtk nei miei pacchetti ho visto che ho:
gtk+-1.2.10-x86_64_slamd64-5
gtk+2-2.10.13-x86_64_slamd64-1
gtk+2-32-2.10.13-x86_64_slamd64-2


Che differenza c'è tra i primi due? gtk+- etc mi pare sia vecchio o sbaglio? (l'altra è una versione 2 no?).

E poi una domanda da niubbo (non che la prima sia tanto meglio :P).
L'ultima libreria mi pare ovvio che sia compilata a 32bit... ora dato che devo aggiornare queste librerie.. come faccio a compilarle a 32bit? (perchè ho diversi pacchetti che si appoggiano a quella)
Ultima modifica di Smjert il gio nov 15, 2007 10:13, modificato 1 volta in totale.
Smjert
Linux 1.0
Linux 1.0
 
Messaggi: 82
Iscritto il: sab nov 03, 2007 21:03

Re: Slamd64, compilare librerie a 32bit e a 64bit

Messaggioda gallows » mar nov 13, 2007 17:26

Smjert ha scritto:Che differenza c'è tra i primi due? gtk+- etc mi pare sia vecchio o sbaglio? (l'altra è una versione 2 no?).


GTK+2 non è retro-compatibile con GTK+(1) e alcune applicazione potrebbero essere scritte con GTK+(1)

L'ultima libreria mi pare ovvio che sia compilata a 32bit... ora dato che devo aggiornare queste librerie.. come faccio a compilarle a 32bit? (perchè ho diversi pacchetti che si appoggiano a quella)


Credo dipenda dalle flag passate al compilatore e dalle librerie che usi per il link. Non mi ricordo se sia possibile linkare librerie x86_64 con eseguibili a 32bit, aspetta che risponda qualche guru del 64bit :)
Avatar utente
gallows
Staff
Staff
 
Messaggi: 3466
Iscritto il: dom set 19, 2004 23:00
Località: Palermo
Kernel: FreeBSD 8.0-RELEASE-p3
Desktop: ratpoison

Messaggioda albatros » mar nov 13, 2007 20:47

Smjert ha scritto:come faccio a compilarle a 32bit? (perchè ho diversi pacchetti che si appoggiano a quella)
Leggi lo slackbuild, no?
@gallows:
Che io sappia, no...
Avatar utente
albatros
Iper Master
Iper Master
 
Messaggi: 2056
Iscritto il: sab feb 04, 2006 13:59
Località: 43°52' N 11°32' E
Slackware: current 64bit
Kernel: 3.8.4
Distribuzione: ubuntu 12.04

Messaggioda Smjert » mer nov 14, 2007 13:12

Quindi basta passare un CFLAGS con architettura i486 e mettere come --libdir /usr/lib?
Ho letto la slackbuild ma ho visto ora un'altra guida che spiega le FLAGS.. quindi quasi mi autorispondo alla mia domanda con un sì, giusto? :P
Smjert
Linux 1.0
Linux 1.0
 
Messaggi: 82
Iscritto il: sab nov 03, 2007 21:03

Messaggioda Smjert » mer nov 14, 2007 14:39

Altro problema, più o meno collegato con le librerie...
Satvo provando ad usare il programmino checkinstall per crearmi il pacchetto del nspluginwrapper.
Ho scaricato la versione 0.9.91.5, ho scompattato l'archivio, ho dato un
Codice: Seleziona tutto
CFLAGS="-O2 -march=nocona" ./configure --prefix=/usr

e il terminale mi ha risposto
Codice: Seleziona tutto
Install prefix            /usr
nspluginwrapper root dir  /usr/lib/nspluginwrapper
Bi-arch build             yes
Build viewer              yes
Build for Linux only      yes
32-bit library dir name   lib
64-bit library dir name   lib64
Source path               /tmp/PKG/Nspluginwrapper/nspluginwrapper-0.9.91.5
C compiler                gcc -std=c99
C++ compiler              g++
host OS                   linux
host CPU                  x86_64
host big endian           no
target OS                 linux
target CPU                i386

poi ho dato un make e checkinstall il quale però mi dice
Codice: Seleziona tutto
========================= Installation results ===========================
mkdir -p /usr/lib/nspluginwrapper/noarch
mkdir -p /usr/lib/nspluginwrapper/x86_64
mkdir -p /usr/lib/nspluginwrapper/x86_64/linux
mkdir -p /usr/lib/nspluginwrapper/i386
mkdir -p /usr/lib/nspluginwrapper/i386/linux
install -m 755 -s npwrapper.so /usr/lib/nspluginwrapper/x86_64/linux/npwrapper.so
gcc -std=c99 -m32 -o npviewer.bin npviewer-npw-viewer.o npviewer-npw-rpc.o npviewer-rpc.o npviewer-debug.o npviewer-utils.o npviewer-npruntime.o npviewer-cxxabi-compat.o -m32 -Llsb-build-i386 -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -ldl -lglib-2.0 -lX11 -lXt -ldl -lpthread -Wl,--export-dynamic -Wl,--version-script,/tmp/PKG/Nspluginwrapper/nspluginwrapper-0.9.91.5/src/npw-viewer.map -lsupc++
/usr/lib64/gcc/x86_64-slamd64-linux/4.1.2/../../../../x86_64-slamd64-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-slamd64-linux/4.1.2/libgcc.a when searching for -lgcc
/usr/lib64/gcc/x86_64-slamd64-linux/4.1.2/../../../../x86_64-slamd64-linux/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
make: *** [npviewer.bin] Error 1

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

Come risolvo questa cosa del lgcc?

Questo è il configure dell'nspluginwrapper
Codice: Seleziona tutto
#!/bin/sh
#
#  nspluginwrapper configure script (C) 2005-2007 Gwenole Beauchesne
#  derived from qemu configure script, (C) 2003 Fabrice Bellard
#
PACKAGE=nspluginwrapper

# set temporary file name
if test ! -z "$TMPDIR" ; then
    TMPDIR1="${TMPDIR}"
elif test ! -z "$TEMPDIR" ; then
    TMPDIR1="${TEMPDIR}"
else
    TMPDIR1="/tmp"
fi

TMPC="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.c"
TMPO="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.o"
TMPE="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}"
TMPS="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.S"

# default parameters
prefix="/usr"
lib32=""
lib64=""
x_base_dirs=""
biarch="guess"
build_viewer="guess"
linux_only="guess"
cc="gcc -std=c99"
cxx="g++"
host_os=`uname -s | tr '[A-Z]' '[a-z]'`
host_cpu=`uname -m`
target_os="linux"
target_cpu="i386"
case "$host_cpu" in
i386|i486|i586|i686|i86pc|BePC)
    host_cpu="i386"
    ;;
ia64)
    host_cpu="ia64"
    ;;
"Power Macintosh"|ppc)
    host_cpu="ppc"
    ;;
ppc64)
    host_cpu="ppc64"
    ;;
sparc)
    host_cpu="sparc"
    ;;
sparc64)
    host_cpu="sparc64"
    ;;
x86_64|amd64)
    host_cpu="x86_64"
    ;;
*)
    host_cpu="unknown"
    ;;
esac
bigendian="no"

# find source path
# XXX: we assume an absolute path is given when launching configure,
# except in './configure' case.
source_path=${0%configure}
source_path=${source_path%/}
source_path_used="yes"
if test -z "$source_path" -o "$source_path" = "." ; then
    source_path=`pwd`
    source_path_used="no"
fi

for opt do
case "$opt" in
--prefix=*)
    prefix=`echo $opt | cut -d '=' -f 2`
    ;;
--pkglibdir=*)
    pkglibdir=`echo $opt | cut -d '=' -f 2`
    ;;
--target-os=*)
    target_os=`echo $opt | cut -d '=' -f 2 | tr '[A-Z]' '[a-z]'`
    ;;
--target-cpu=*)
    target_cpu=`echo $opt | cut -d '=' -f 2 | sed -e 's/^i.86$/i386/'`
    ;;
--generic-build)
    linux_only="no"
    ;;
--with-biarch)
    biarch="yes"
    ;;
--without-biarch)
    biarch="no"
    ;;
--with-viewer)
    build_viewer="yes"
    ;;
--without-viewer)
    build_viewer="no"
    ;;
--with-lib32=*)
    lib32=`echo $opt | cut -d '=' -f 2`
    ;;
--with-lib64=*)
    lib64=`echo $opt | cut -d '=' -f 2`
    ;;
--with-x11-prefix=*)
    x_base_dirs=`echo $opt | cut -d '=' -f 2`
    ;;
--with-cc=*)
    cc=`echo $opt | cut -d '=' -f 2`
    ;;
--with-cxx=*)
    cxx=`echo $opt | cut -d '=' -f 2`
    ;;
esac
done

# check for linux only build
if test "$linux_only" = "guess"; then
    if test "$host_os" = "linux" -a "$target_os" = "linux"; then
   linux_only="yes"
    else
   linux_only="no"
    fi
fi

# check for biarch build
if test "$biarch" = "guess"; then
    case $host_cpu:$target_cpu in
    x86_64:i386 | ppc64:ppc)
   biarch="yes"
   ;;
    *)
   biarch="no"
   ;;
    esac
fi

# check for viewer builds
if test "$build_viewer" = "guess"; then
    build_viewer="no"
    case $host_os in
    linux)
   if test "$host_cpu" = "$target_cpu" -o "$biarch" = "yes"; then
       build_viewer="yes"
   fi
   ;;
    esac
fi

# check for libdir name
if test -z "$lib64"; then
    case $host_os in
    linux)
   # test if the compiler is 64bit
        echo 'int i;' > $TMPC
   nspluginwrapper_64bit_output=no
   if $cc -o $TMPO -c $TMPC; then
       case `/usr/bin/file $TMPO` in
       *"ELF 64"*)
      nspluginwrapper_64bit_output=yes
      ;;
       esac
   fi
   rm -f $TMPC $TMPO
   ;;
    esac
    case $host_cpu:$nspluginwrapper_64bit_output in
    ppc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
   lib64="lib64"
   ;;
    *)
   lib64="lib"
   ;;
    esac
fi
if test -z "$lib32"; then
    lib32="lib"
fi

# check for installation root
if test -z "$pkglibdir"; then
    pkglibdir="$prefix/lib/$PACKAGE"
fi

# check for __attribute__((visibility())) support
cat > $TMPC << EOF
int foo __attribute__((visibility("hidden"))) = 1;
int bar __attribute__((visibility("protected"))) = 1;
EOF
has_visibility_attribute=no
if $cc -Werror -S $TMPC -o $TMPS >/dev/null 2>&1; then
    if grep '\.hidden.*foo' $TMPS >/dev/null; then
   if grep '\.protected.*bar' $TMPS >/dev/null; then
       has_visibility_attribute=yes
   fi
    fi
fi
rm -f $TMPC $TMPS

# check for .init_array/.fini_array support
cat > $TMPC << EOF
static int x = -1;
int main(void) { return x; }
int foo(void) { x = 0; }
int (*fp)(void) __attribute__((section(".init_array"))) = foo;
EOF
has_initfini_array=no
if $cc -Werror $TMPC -o $TMPE >/dev/null 2>&1; then
    if $TMPE; then
   has_initfini_array=yes
    fi
fi
rm -f $TMPC $TMPE

# check for egrep program
if echo a | (grep -E '(a|b)') >/dev/null 2>&1; then
    EGREP='grep -E'
else
    EGREP='egrep'
fi

# check for __stack_chk_fail() in target GNU C library
if test "$biarch" = "yes"; then
    glibc_header_dir="/usr/include"
    libc_provides_ssp=no
    if test -f $glibc_header_dir/features.h \
   && $EGREP '^[    ]*#[    ]*define[    ]+__GNU_LIBRARY__[    ]+([1-9][0-9]|[6-9])' \
   $glibc_header_dir/features.h > /dev/null; then
   if $EGREP '^[    ]*#[    ]*define[    ]+__GLIBC__[    ]+([1-9][0-9]|[3-9])' \
       $glibc_header_dir/features.h > /dev/null; then
       libc_provides_ssp=yes
   elif $EGREP '^[    ]*#[    ]*define[    ]+__GLIBC__[    ]+2' \
       $glibc_header_dir/features.h > /dev/null \
       && $EGREP '^[    ]*#[    ]*define[    ]+__GLIBC_MINOR__[    ]+([1-9][0-9]|[4-9])' \
       $glibc_header_dir/features.h > /dev/null; then
       libc_provides_ssp=yes
   fi
    fi
fi

# check for compiler flag
check_cc_option() {
    echo "int i;" > $TMPC
    if $cc $* -c $TMPC -o $TMPO > /dev/null 2>&1; then
   rm -f $TMPC $TMPO
   return 0
    fi
    rm -f $TMPC
    return 1
}

# check for CFLAGS
if test -z "$CFLAGS"; then
    CFLAGS="-O2 -g"
    if check_cc_option -mtune=generic $CFLAGS; then
   CFLAGS="$CFLAGS -mtune=generic"
    fi
fi
if test "$biarch" = "yes" -a -z "$CFLAGS_32"; then
    CFLAGS_32="-m32 -O2 -g"
    if check_cc_option -mtune=generic $CFLAGS_32; then
   CFLAGS_32="$CFLAGS_32 -mtune=generic"
    fi
fi

# check for pkg-config
pkgconfig=`which pkg-config`
if test -z "$pkgconfig"; then
    echo "pkg-config not found"
    exit 1
fi

# check for Glib 2.0 compile CFLAGS
if $pkgconfig --exists glib-2.0; then
    GLIB_CFLAGS=`$pkgconfig --cflags glib-2.0`
    GLIB_LDFLAGS=`$pkgconfig --libs glib-2.0`
else
    echo "GLIB 2.0 environment not found"
    exit 1
fi
cat > $TMPC << EOF
#include <glib.h>
int main(void) {
    (void) g_main_pending();
    return 0;
}
EOF
if ! $cc $CFLAGS $GLIB_CFLAGS $GLIB_LDFLAGS $TMPC -o $TMPE > /dev/null 2>&1; then
    echo "GLIB 2.0 environment not usable"
    rm -f $TMPC
    exit 1
fi
rm -f $TMPC $TMPE

# check for GTK+ 2.0 compile CFLAGS
if test "$build_viewer" = "yes"; then
    if $pkgconfig --exists gtk+-2.0; then
   GTK_CFLAGS=`$pkgconfig --cflags gtk+-2.0`
   GTK_LDFLAGS=`$pkgconfig --libs gtk+-2.0`
    else
   echo "GTK+ 2.0 environment not found"
   exit 1
    fi
    cat > $TMPC << EOF
#include <gtk/gtk.h>
int main(void) {
    gtk_main_quit();
    return 0;
}
EOF
    if ! $cc $CFLAGS $GTK_CFLAGS $GTK_LDFLAGS $TMPC -o $TMPE > /dev/null 2>&1; then
   echo "GTK+ 2.0 environment not usable"
   rm -f $TMPC
   exit 1
    fi
    rm -f $TMPC $TMPE
fi

# check for X11 base dir
if test -z "$x_base_dirs"; then
    x_base_dirs="
   /usr
   /usr/X11R6
   /usr/local/X11R6
   $prefix
    "
fi
for dir in $x_base_dirs; do
    x_include_dir="$dir/include"
    if test -f $x_include_dir/X11/Intrinsic.h; then
   x_lib_dir="$dir/$lib64"
   if test -f $x_lib_dir/libX11.so; then
       x_base_dir=$dir
       break
   fi
    fi
done
if test -z "$x_base_dir"; then
    echo "X11 environment not found"
    exit 1
fi

# big/little endian test
cat > $TMPC << EOF
#include <inttypes.h>
int main(int argc, char ** argv){
    volatile uint32_t i=0x01234567;
    return (*((uint8_t*)(&i))) == 0x67;
}
EOF

if $cc -o $TMPE $TMPC 2>/dev/null ; then
    $TMPE && bigendian="yes"
else
    echo "big/little test failed"
fi

rm -f $TMPO $TMPC $TMPE $TMPS

# floating point endian test
cat > $TMPC << EOF
/* This will not work unless sizeof(double) == 8.  */
extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];

/* This structure must have no internal padding.  */
struct possibility {
  char prefix[8];
  double candidate;
  char postfix[8];
};

#define C(cand) { "\nformat:", cand, ":tamrof\n" }
struct possibility table [] =
{
  C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
  C( 3.53802595280598432000e+18), /* D__float - VAX */
  C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
  C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
  C(-5.22995989424860458374e+10)  /* IBMHEXFP - s/390 format, EBCDIC */
};
EOF

if $cc -o $TMPO -c $TMPC 2>/dev/null; then
    od -c $TMPO |
    sed 's/^[0-7]*[    ]*/ /
    s/\*/./g
    s/ \\n/*/g
    s/ [0-9][0-9][0-9]/./g
    s/  \\[^ ]/./g' |
    tr -d '
 ' | tr -s '*' '
' | fold | sed '$a\
' > $TMPE

    if grep 'format:.@IEEEF.:tamrof' $TMPE >/dev/null 2>&1; then
   float_format='IEEE (big-endian)'
    elif grep 'format:.I@@PFE.:tamrof' $TMPE >/dev/null 2>&1; then
   float_format='IEEE (big-endian)'
    elif grep 'format:.FEEEI@.:tamrof' $TMPE >/dev/null 2>&1; then
   float_format='IEEE (little-endian)'
    elif grep 'format:.EFP@@I.:tamrof' $TMPE >/dev/null 2>&1; then
   float_format='IEEE (little-endian)'
    elif grep 'format:.__floa.:tamrof' $TMPE >/dev/null 2>&1; then
   float_format='VAX D-float'
    elif grep 'format:..PDP-1.:tamrof' $TMPE >/dev/null 2>&1; then
   float_format='PDP-10'
    elif grep 'format:.BMHEXF.:tamrof' $TMPE >/dev/null 2>&1; then
   float_format='IBM 370 hex'
    else
   echo "unknown floating point format"
   exit 1
    fi

    fbigendian=
    case $float_format in
    'IEEE (big-endian)')
   if test "$bigendian" = "no"; then
       fbigendian=1
   fi
   ;;
    'IEEE (little-endian)')
   if test "$bigendian" = "yes"; then
       fbigendian=0
   fi
   ;;
    *)
   echo "unsupported floating point format $float_format"
   exit 1
   ;;
    esac
else
    echo "floating point endian test failed"
fi

rm -f $TMPO $TMPC $TMPE

# print configure help
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
cat << EOF

Usage: configure [options]
Options: [defaults in brackets after descriptions]

EOF
echo "Standard options:"
echo "  --help                      print this message"
echo "  --prefix=PREFIX             install in PREFIX [$prefix]"
echo "  --pkglibdir=ROOT            install private files in ROOT [$pkglibdir]"
echo "  --target-os=OS              build plugin support for target OS [$target_os]"
echo "  --target-cpu=CPU            build plugin support for target CPU [$target_cpu]"
echo "  --with-viewer               build viewer [$build_viewer]"
echo ""
echo "Advanced options (experts only):"
echo "  --source-path=PATH          path of source code [$source_path]"
echo "  --generic-build             don't use system-specific additions"
echo "  --with-biarch               build both 32-bit and 64-bit components at once"
echo "  --with-lib32=NAME           use NAME as the 32-bit library dir name [$lib32]"
echo "  --with-lib64=NAME           use NAME as the 64-bit library dir name [$lib64]"
echo "  --with-x11-prefix=PREFIX    use PREFIX as the X11 base dir [autodetect]"
echo "  --with-cc=CC                use C compiler CC [$cc]"
echo "  --with-cxx=CXX              use C++ compiler CXX [$cxx]"
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
fi

echo "Install prefix            $prefix"
echo "nspluginwrapper root dir  $pkglibdir"
echo "Bi-arch build             $biarch"
echo "Build viewer              $build_viewer"
echo "Build for Linux only      $linux_only"
echo "32-bit library dir name   $lib32"
echo "64-bit library dir name   $lib64"
echo "Source path               $source_path"
echo "C compiler                $cc"
echo "C++ compiler              $cxx"
echo "host OS                   $host_os"
echo "host CPU                  $host_cpu"
echo "host big endian           $bigendian"
echo "target OS                 $target_os"
echo "target CPU                $target_cpu"

config_mak="config-host.mak"
echo "# Automatically generated by configure - do not modify" > $config_mak

config_h="config-host.h"
echo "/* Automatically generated by configure - do not modify */" > $config_h

echo "CC=$cc" >> $config_mak
echo "CXX=$cxx" >> $config_mak
echo "CFLAGS=$CFLAGS" >> $config_mak
echo "GLIB_CFLAGS=$GLIB_CFLAGS" >> $config_mak
echo "GLIB_LDFLAGS=$GLIB_LDFLAGS" >> $config_mak
echo "GTK_CFLAGS=$GTK_CFLAGS" >> $config_mak
echo "GTK_LDFLAGS=$GTK_LDFLAGS" >> $config_mak
if test "$biarch" = "yes"; then
echo "LDFLAGS_32=-m32" >> $config_mak
echo "CFLAGS_32=$CFLAGS_32" >> $config_mak
else
echo 'CFLAGS_32=$(CFLAGS)' >> $config_mak
fi
if test "$host_os" = "linux"; then
    echo "OS=linux" >> $config_mak
    echo "#define HOST_LINUX 1" >> $config_h
    echo "#define HOST_OS \"linux\"" >> $config_h
elif test "$host_os" = "dragonfly"; then
    echo "OS=dragonfly" >> $config_mak
    echo "#define HOST_DRAGONFLY 1" >> $config_h
    echo "#define HOST_OS \"dragonfly\"" >> $config_h
elif test "$host_os" = "freebsd"; then
    echo "OS=freebsd" >> $config_mak
    echo "#define HOST_FREEBSD 1" >> $config_h
    echo "#define HOST_OS \"freebsd\"" >> $config_h
elif test "$host_os" = "netbsd"; then
    echo "OS=netbsd" >> $config_mak
    echo "#define HOST_NETBSD 1" >> $config_h
    echo "#define HOST_OS \"netbsd\"" >> $config_h
else
    echo "Unsupported OS"
    exit 1
fi
if test "$host_cpu" = "i386" ; then
    echo "ARCH=i386" >> $config_mak
    echo "#define HOST_I386 1" >> $config_h
    echo "#define HOST_ARCH \"i386\"" >> $config_h
elif test "$host_cpu" = "x86_64" ; then
    echo "ARCH=x86_64" >> $config_mak
    echo "#define HOST_X86_64 1" >> $config_h
    echo "#define HOST_ARCH \"x86_64\"" >> $config_h
elif test "$host_cpu" = "ppc" ; then
    echo "ARCH=ppc" >> $config_mak
    echo "#define HOST_PPC 1" >> $config_h
    echo "#define HOST_ARCH \"ppc\"" >> $config_h
elif test "$host_cpu" = "ppc64" ; then
    echo "ARCH=ppc64" >> $config_mak
    echo "#define HOST_PPC64 1" >> $config_h
    echo "#define HOST_ARCH \"ppc64\"" >> $config_h
elif test "$host_cpu" = "sparc" ; then
    echo "ARCH=sparc" >> $config_mak
    echo "#define HOST_SPARC 1" >> $config_h
    echo "#define HOST_ARCH \"sparc\"" >> $config_h
elif test "$host_cpu" = "sparc64" ; then
    echo "ARCH=sparc64" >> $config_mak
    echo "#define HOST_SPARC64 1" >> $config_h
    echo "#define HOST_ARCH \"sparc64\"" >> $config_h
elif test "$host_cpu" = "ia64" ; then
    echo "ARCH=ia64" >> $config_mak
    echo "#define HOST_IA64 1" >> $config_h
    echo "#define HOST_ARCH \"ia64\"" >> $config_h
else
    echo "Unsupported CPU"
    exit 1
fi
if test "$bigendian" = "yes" ; then
    echo "WORDS_BIGENDIAN=yes" >> $config_mak
    echo "#define WORDS_BIGENDIAN 1" >> $config_h
fi
if test -n "$fbigendian" ; then
    echo "#define FLOAT_WORDS_BIGENDIAN $fbigendian" >> $config_h
fi

echo "SRC_PATH=$source_path" >> $config_mak
echo "build_viewer=$build_viewer" >> $config_mak
echo "biarch=$biarch" >> $config_mak
echo "lib32=$lib32" >> $config_mak
echo "lib64=$lib64" >> $config_mak
echo "prefix=$prefix" >> $config_mak
echo "bindir=$prefix/bin" >> $config_mak
libdir="$prefix/$lib64"
echo "libdir=$libdir" >> $config_mak
echo "#define LIB \"$lib64\"" >> $config_h
echo "#define LIBDIR \"$libdir\"" >> $config_h
echo "x11prefix=$x_base_dir" >> $config_mak

VERSION=`sed < $source_path/$PACKAGE.spec -n '/^\%define version[   ]*/s///p'`
RELEASE=`sed < $source_path/$PACKAGE.spec -n '/^\%define release[   ]*/s///p'`
SVNDATE=`sed < $source_path/$PACKAGE.spec -n '/^\%define svndate[    ]*/s///p'`
if test -z "$SVNDATE"; then
    SVNDATE=`date '+%Y%m%d'`
fi
SNAPSHOT=0
if echo "$RELEASE" | grep -q ^0; then
    SNAPSHOT=1
fi
echo "VERSION=$VERSION" >> $config_mak
echo "SVNDATE=$SVNDATE" >> $config_mak
echo "SNAPSHOT=$SNAPSHOT" >> $config_mak
echo "#define NPW_SNAPSHOT $SNAPSHOT" >> $config_h
if test "$SNAPSHOT" = "1"; then
    echo "#define NPW_VERSION \"$VERSION-Pre ($SVNDATE)\"" >> $config_h
else
    echo "#define NPW_VERSION \"$VERSION\"" >> $config_h
fi

echo "pkglibdir=$pkglibdir" >> $config_mak
echo "#define NPW_LIBDIR \"$pkglibdir\"" >> $config_h

if test "$has_visibility_attribute" = "yes"; then
    echo "#define attribute_hidden __attribute__((visibility(\"hidden\")))" >> $config_h
    echo "#define attribute_protected __attribute__((visibility(\"protected\")))" >> $config_h
else
    echo "#define attribute_hidden" >> $config_h
    echo "#define attribute_protected" >> $config_h
fi
if test "$has_initfini_array" = "yes"; then
    echo "#define HAVE_INITFINI_ARRAY 1" >> $config_h
else
    echo "#undef HAVE_INITFINI_ARRAY" >> $config_h
fi
if test "$libc_provides_ssp" = "yes"; then
    echo "#define TARGET_LIBC_PROVIDES_SSP 1" >> $config_h
else
    echo "#undef TARGET_LIBC_PROVIDES_SSP" >> $config_h
fi

config_mak="config.mak"
echo "# Automatically generated by configure - do not modify" > $config_mak
echo "include config-host.mak" >> $config_mak

config_h="config.h"
echo "/* Automatically generated by configure - do not modify */" > $config_h
echo "#include \"config-host.h\"" >> $config_h

if test "$linux_only" = "yes"; then
    echo "#define BUILD_LINUX_ONLY 1" >> $config_h
fi

if test "$target_os" = "linux"; then
    echo "TARGET_OS=linux" >> $config_mak
    echo "#define TARGET_OS \"linux\"" >> $config_h
    echo "#define TARGET_LINUX 1" >> $config_h
elif test "$target_os" = "solaris"; then
    echo "TARGET_OS=solaris" >> $config_mak
    echo "#define TARGET_OS \"solaris\"" >> $config_h
    echo "#define TARGET_SOLARIS 1" >> $config_h
else
    echo "Unsupported target OS"
    exit 1
fi

if test "$target_cpu" = "i386" ; then
    echo "TARGET_ARCH=i386" >> $config_mak
    echo "#define TARGET_ARCH \"i386\"" >> $config_h
    echo "#define TARGET_I386 1" >> $config_h
elif test "$target_cpu" = "x86_64" ; then
    echo "TARGET_ARCH=x86_64" >> $config_mak
    echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
    echo "#define TARGET_X86_64 1" >> $config_h
elif test "$target_cpu" = "ppc" ; then
    echo "TARGET_ARCH=ppc" >> $config_mak
    echo "#define TARGET_ARCH \"ppc\"" >> $config_h
    echo "#define TARGET_PPC 1" >> $config_h
else
    echo "Unsupported target CPU"
    exit 1
fi

# build tree in object directory if source path is different from current one
if test "$source_path_used" = "yes" ; then
    case $source_path in
    ..*)
   sp1=..
   ;;
    esac
    ln -sf $source_path/Makefile Makefile
fi


Ah.. alla pappardella aggiungo inoltre che mi sono accorto ora di avere già un nspluginwrapper, ma di una versione precedente, se do il comando nspluginwrapper -v -a -i mi risponde
Codice: Seleziona tutto
Auto-install plugins from /usr/lib64/mozilla/plugins
Looking for plugins in /usr/lib64/mozilla/plugins
/usr/lib/nspluginwrapper/i386/linux/npviewer.bin: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
Auto-install plugins from /root/.mozilla/plugins
Looking for plugins in /root/.mozilla/plugins


Quindi manca qualcosa... ma cosa? e come faccio a rimetterla?

PS: il file libgcc_s.so.1 ce l'ho ma in /usr/lib64, nspluginwrapper è un'applicazione a 32 bit quindi cerca credo la libreria in /usr/lib.. però lì nn ce l'ho... da dove proviene questo file? quale pacchetto devo compilare a 32bit per avere lì quel file?
Smjert
Linux 1.0
Linux 1.0
 
Messaggi: 82
Iscritto il: sab nov 03, 2007 21:03

Messaggioda Smjert » gio nov 15, 2007 9:33

Colpa delle gcc32.. mancanti.. sorry
Smjert
Linux 1.0
Linux 1.0
 
Messaggi: 82
Iscritto il: sab nov 03, 2007 21:03


Torna a Porting Slackware

Chi c’è in linea

Visitano il forum: Bing [Bot] e 2 ospiti

cron