Compiling ZSNES 1.51 under 64-bit Linux

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
jdb2
New Member
Posts: 5
Joined: Fri Nov 12, 2010 7:55 am

Compiling ZSNES 1.51 under 64-bit Linux

Post by jdb2 »

I'm running Linux Mint 9 Isadora KDE 64-bit and want to run ZSNES via cross-compiling to 32-bit.

I've set up my environment like so :

( from 'env' )

Code: Select all

CFLAGS=-m32 --sysroot=/home/jdb2/sysroots
CXXFLAGS=-m32 --sysroot=/home/jdb2/sysroots
( the above are exported )

where 'ls -al ~/sysroots' produces :

Code: Select all

jdb2@aleph1 ~ $ ls -al ~/sysroots
total 12
drwxr-xr-x  3 jdb2 jdb2 4096 2010-11-29 05:52 .
drwxr-xr-x 84 jdb2 jdb2 4096 2010-11-29 05:11 ..
drwxr-xr-x  2 jdb2 jdb2 4096 2010-11-29 05:52 usr
and 'ls -al ~/sysroots/usr' produces :

Code: Select all

jdb2@aleph1 ~ $ ls -al ~/sysroots/usr
total 8
drwxr-xr-x 2 jdb2 jdb2 4096 2010-11-29 05:52 .
drwxr-xr-x 3 jdb2 jdb2 4096 2010-11-29 05:52 ..
lrwxrwxrwx 1 jdb2 jdb2   13 2010-11-29 04:58 include -> /usr/include/
lrwxrwxrwx 1 jdb2 jdb2   11 2010-11-29 04:58 lib -> /usr/lib32/
I've successfully built 32-bit applications that made heavy use of the gcc '-l' directive with the above with no issues.

I had to modify the configure file for a 32-bit build. Here is the patch after issuing an 'autogen.sh --prefix=/usr/local/zsnes' in the virgin source tree :

Code: Select all

--- zsnes_1_51/src/configure	2010-11-29 05:30:58.642539735 -0600
+++ /home/jdb2/zsnes_1_51/src/configure	2010-11-27 15:35:45.717888218 -0600
@@ -2128,9 +2128,9 @@
 
 VERSION=1.51
 
-CFLAGS="$CFLAGS -pipe -I. -I/usr/local/include -I/usr/include"
+CFLAGS="$CFLAGS  -pipe -I. -I/usr/local/include -I/usr/include"
 
-LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/lib"
+LDFLAGS="$LDFLAGS -L/usr/lib32"
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -3655,7 +3655,8 @@
     no_sdl=yes
   else
     SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
-    SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
+    SDL_LIBS="-L/usr/lib32 -lSDL"
+    #SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
 
     sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`

Now, one would think that ZSNES would now compile, or at least configure, but it doesn't.

Issuing a './autogen.sh --prefix=/usr/local/zsnes' in the modified source tree produces the following :

Code: Select all

jdb2@aleph1 ~/zsnes_1_51/src $ ./autogen.sh --prefix=/usr/local/zsnes
Generating build information using aclocal and autoconf...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for nasm... nasm
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... no
*** Could not run SDL test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /usr/bin/sdl-config
configure: error: SDL >= 1.2.0 is required
Looking at the config.log you can see the problem :

Code: Select all

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.65.  Invocation command line was

  $ ./configure --prefix=/usr/local/zsnes

## --------- ##
## Platform. ##
## --------- ##

hostname = aleph1
uname -m = x86_64
uname -r = 2.6.32-25-generic
uname -s = Linux
uname -v = #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC 2010

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2162: checking build system type
configure:2176: result: x86_64-unknown-linux-gnu
configure:2196: checking host system type
configure:2209: result: x86_64-unknown-linux-gnu
configure:2229: checking target system type
configure:2242: result: x86_64-unknown-linux-gnu
configure:2282: checking for a BSD-compatible install
configure:2350: result: /usr/bin/install -c
configure:2409: checking for gcc
configure:2425: found /usr/bin/gcc
configure:2436: result: gcc
configure:2665: checking for C compiler version
configure:2674: gcc --version >&5
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2685: $? = 0
configure:2674: gcc -v >&5
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) 
configure:2685: $? = 0
configure:2674: gcc -V >&5
gcc: '-V' option must have argument
configure:2685: $? = 1
configure:2674: gcc -qversion >&5
gcc: unrecognized option '-qversion'
gcc: no input files
configure:2685: $? = 1
configure:2705: checking whether the C compiler works
configure:2727: gcc -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include   -L/usr/lib32 conftest.c  >&5
configure:2731: $? = 0
configure:2780: result: yes
configure:2783: checking for C compiler default output file name
configure:2785: result: a.out
configure:2791: checking for suffix of executables
configure:2798: gcc -o conftest -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include   -L/usr/lib32 conftest.c  >&5
configure:2802: $? = 0
configure:2824: result: 
configure:2846: checking whether we are cross compiling
configure:2854: gcc -o conftest -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include   -L/usr/lib32 conftest.c  >&5
configure:2858: $? = 0
configure:2865: ./conftest
configure:2869: $? = 0
configure:2884: result: no
configure:2889: checking for suffix of object files
configure:2911: gcc -c -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include  conftest.c >&5
configure:2915: $? = 0
configure:2936: result: o
configure:2940: checking whether we are using the GNU C compiler
configure:2959: gcc -c -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include  conftest.c >&5
configure:2959: $? = 0
configure:2968: result: yes
configure:2977: checking whether gcc accepts -g
configure:2997: gcc -c -g  conftest.c >&5
configure:2997: $? = 0
configure:3038: result: yes
configure:3055: checking for gcc option to accept ISO C89
configure:3119: gcc  -c -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include  conftest.c >&5
configure:3119: $? = 0
configure:3132: result: none needed
configure:3210: checking for g++
configure:3226: found /usr/bin/g++
configure:3237: result: g++
configure:3264: checking for C++ compiler version
configure:3273: g++ --version >&5
g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3284: $? = 0
configure:3273: g++ -v >&5
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) 
configure:3284: $? = 0
configure:3273: g++ -V >&5
g++: '-V' option must have argument
configure:3284: $? = 1
configure:3273: g++ -qversion >&5
g++: unrecognized option '-qversion'
g++: no input files
configure:3284: $? = 1
configure:3288: checking whether we are using the GNU C++ compiler
configure:3307: g++ -c -m32 --sysroot=/home/jdb2/sysroots/libroot  conftest.cpp >&5
configure:3307: $? = 0
configure:3316: result: yes
configure:3325: checking whether g++ accepts -g
configure:3345: g++ -c -g  conftest.cpp >&5
configure:3345: $? = 0
configure:3386: result: yes
configure:3462: checking for nasm
configure:3479: found /usr/bin/nasm
configure:3490: result: nasm
configure:3610: checking for sdl-config
configure:3628: found /usr/bin/sdl-config
configure:3641: result: /usr/bin/sdl-config
configure:3651: checking for SDL - version >= 1.2.0
configure:3739: gcc -o conftest -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT   -L/usr/lib32 conftest.c  -L/usr/lib32 -lSDL >&5
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libSDL.so when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libSDL.a when searching for -lSDL
/usr/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
configure:3739: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| #include <stdio.h>
| #include <stdlib.h>
| #include <string.h>
| #include "SDL.h"
| 
| char*
| my_strdup (char *str)
| {
|   char *new_str;
| 
|   if (str)
|     {
|       new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
|       strcpy (new_str, str);
|     }
|   else
|     new_str = NULL;
| 
|   return new_str;
| }
| 
| int main (int argc, char *argv[])
| {
|   int major, minor, micro;
|   char *tmp_version;
| 
|   /* This hangs on some systems (?)
|   system ("touch conf.sdltest");
|   */
|   { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
| 
|   /* HP/UX 9 (%@#!) writes to sscanf strings */
|   tmp_version = my_strdup("1.2.0");
|   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
|      printf("%s, bad version string\n", "1.2.0");
|      exit(1);
|    }
| 
|    if ((1 > major) ||
|       ((1 == major) && (2 > minor)) ||
|       ((1 == major) && (2 == minor) && (14 >= micro)))
|     {
|       return 0;
|     }
|   else
|     {
|       printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", 1, 2, 14);
|       printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
|       printf("*** best to upgrade to the required version.\n");
|       printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
|       printf("*** to point to the correct copy of sdl-config, and remove the file\n");
|       printf("*** config.cache before re-running configure\n");
|       return 1;
|     }
| }
| 
| 
configure:3758: result: no
configure:3792: gcc -o conftest -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT   -L/usr/lib32 conftest.c  -L/usr/lib32 -lSDL >&5
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libSDL.so when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libSDL.a when searching for -lSDL
/usr/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
configure:3792: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| #include <stdio.h>
| #include "SDL.h"
| 
| int main(int argc, char *argv[])
| { return 0; }
| #undef  main
| #define main K_and_R_C_main
| 
| int
| main ()
| {
|  return 0;
|   ;
|   return 0;
| }
configure:3817: error: SDL >= 1.2.0 is required

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-m32 --sysroot=/home/jdb2/sysroots/libroot'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-m32 --sysroot=/home/jdb2/sysroots/libroot'
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_force_arch_set=
ac_cv_env_force_arch_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_objext=o
ac_cv_path_SDL_CONFIG=/usr/bin/sdl-config
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_ac_ct_NASMPATH=nasm
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_target=x86_64-unknown-linux-gnu

## ----------------- ##
## Output variables. ##
## ----------------- ##

ARCH_INFO=''
CC='gcc'
CFLAGS='-m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__'
CPP=''
CPPFLAGS=''
CXX='g++'
CXXFLAGS='-m32 --sysroot=/home/jdb2/sysroots/libroot'
DEBUGGER_FILES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GL_DRAW=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
JMA_FILES=''
LDFLAGS=' -L/usr/lib32'
LIBOBJS=''
LIBPNG_CFLAGS=''
LIBPNG_LIBS=''
LIBPNG_VERSION=''
LIBS=''
LTLIBOBJS=''
MMLIB_FILES='$(MMLIB_D)/mm.o $(MMLIB_D)/linux.o'
NASMPATH='nasm'
NFLAGS=' -w-orphan-labels -D__UNIXSDL__ -f elf -DELF'
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PSRFLAGS=' -D__UNIXSDL__'
PSR_TEMP=''
SDL_CFLAGS=''
SDL_CONFIG='/usr/bin/sdl-config'
SDL_LIBS=''
SHELL='/bin/bash'
VERSION='1.51'
XMKMF=''
ZC=''
ZCFLAGS=''
ZLIB_CFLAGS=''
ZLIB_LIBS=''
ZLIB_VERSION=''
ZSNESEXE=''
ac_ct_CC='gcc'
ac_ct_CXX='g++'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
force_arch=''
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/local/zsnes'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='x86_64-unknown-linux-gnu'
target_alias=''
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='unknown'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 1
Specifically where it says :

Code: Select all

configure:3739: gcc -o conftest -m32 --sysroot=/home/jdb2/sysroots/libroot  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT   -L/usr/lib32 conftest.c  -L/usr/lib32 -lSDL >&5
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libSDL.so when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libSDL.a when searching for -lSDL
/usr/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
I am at a lost as to why the linker is looking for the x86-64 libs instead of the libs in /usr/lib32 since I have eliminated all references to /usr/lib where it counts.

Does anyone have any ideas?

Regards,

jdb2
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Re: Compiling ZSNES 1.51 under 64-bit Linux

Post by kode54 »

Are you sure you have the 32-bit SDL libraries installed?
jdb2
New Member
Posts: 5
Joined: Fri Nov 12, 2010 7:55 am

Re: Compiling ZSNES 1.51 under 64-bit Linux

Post by jdb2 »

kode54 wrote:Are you sure you have the 32-bit SDL libraries installed?
Yes. I have the ia32-libs package installed so the 32-bit version of the SDL libraries should have been installed when the 64-bit version was installed and indeed they were. If I do a 'ls -al /usr/lib32/*SDL*' I get :

Code: Select all

jdb2@aleph1 ~ $ ls -al /usr/lib32/*SDL*
lrwxrwxrwx 1 root root     15 2010-08-20 17:38 /usr/lib32/libSDL-1.2.so -> libSDL-1.2.so.0
lrwxrwxrwx 1 root root     20 2010-08-20 17:38 /usr/lib32/libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.3
-rw-r--r-- 1 root root 412484 2010-06-09 07:00 /usr/lib32/libSDL-1.2.so.0.11.3
lrwxrwxrwx 1 root root     21 2010-08-20 17:38 /usr/lib32/libSDL_image-1.2.so -> libSDL_image-1.2.so.0
lrwxrwxrwx 1 root root     25 2010-08-20 17:38 /usr/lib32/libSDL_image-1.2.so.0 -> libSDL_image-1.2.so.0.8.2
-rw-r--r-- 1 root root  46564 2009-11-30 18:12 /usr/lib32/libSDL_image-1.2.so.0.8.2
lrwxrwxrwx 1 root root     21 2010-08-20 17:38 /usr/lib32/libSDL_mixer-1.2.so -> libSDL_mixer-1.2.so.0
lrwxrwxrwx 1 root root     25 2010-08-20 17:38 /usr/lib32/libSDL_mixer-1.2.so.0 -> libSDL_mixer-1.2.so.0.2.6
-rw-r--r-- 1 root root 196268 2009-08-17 20:17 /usr/lib32/libSDL_mixer-1.2.so.0.2.6
lrwxrwxrwx 1 root root     19 2010-08-20 17:38 /usr/lib32/libSDL_net-1.2.so -> libSDL_net-1.2.so.0
lrwxrwxrwx 1 root root     23 2010-08-20 17:38 /usr/lib32/libSDL_net-1.2.so.0 -> libSDL_net-1.2.so.0.0.7
-rw-r--r-- 1 root root  11612 2007-10-31 08:36 /usr/lib32/libSDL_net-1.2.so.0.0.7
lrwxrwxrwx 1 root root     19 2010-08-20 17:38 /usr/lib32/libSDL_ttf-2.0.so -> libSDL_ttf-2.0.so.0
lrwxrwxrwx 1 root root     23 2010-08-20 17:38 /usr/lib32/libSDL_ttf-2.0.so.0 -> libSDL_ttf-2.0.so.0.6.3
-rw-r--r-- 1 root root  21864 2009-05-11 16:27 /usr/lib32/libSDL_ttf-2.0.so.0.6.3
Really, I have no clue why it is looking at the x86-64 libs.

Regards,

Jonathan
badinsults
"Your thread will be crushed."
Posts: 1236
Joined: Wed Jul 28, 2004 1:49 am
Location: Not in Winnipeg
Contact:

Re: Compiling ZSNES 1.51 under 64-bit Linux

Post by badinsults »

I'm no expert, but have you looked at this thread:

http://board.zsnes.com/phpBB3/viewtopic ... 18&t=12339
<pagefault> i'd break up with my wife if she said FF8 was awesome
jdb2
New Member
Posts: 5
Joined: Fri Nov 12, 2010 7:55 am

Re: Compiling ZSNES 1.51 under 64-bit Linux

Post by jdb2 »

badinsults wrote:I'm no expert, but have you looked at this thread:

http://board.zsnes.com/phpBB3/viewtopic ... 18&t=12339
I have, but thanks for reminding me. :)

The problem is that I'm having a link-time error as opposed to a run-time/dynamic-link-time error as described in the thread.

The thread is relevant to my other post about installing the i386 package though. In that case the package has a libao4 1.0+ dependency which I can confirm by doing an ldd on the zsnes binary :

Code: Select all

 jdb2@aleph1 ~ $ ldd /usr/bin/zsnes 
        linux-gate.so.1 =>  (0xf77de000)
        libz.so.1 => /usr/lib32/libz.so.1 (0xf77a5000)
        libSDL-1.2.so.0 => /usr/lib32/libSDL-1.2.so.0 (0xf7717000)
        libpng12.so.0 => /lib32/libpng12.so.0 (0xf76f1000)
*       libao.so.4 => /usr/lib32/libao.so.4 (0xf76e8000)
        libGL.so.1 => /usr/lib32/mesa/libGL.so.1 (0xf7683000)
        libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf758d000)
        libm.so.6 => /lib32/libm.so.6 (0xf7567000)
        libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7547000)
        libc.so.6 => /lib32/libc.so.6 (0xf73ed000)
        libpthread.so.0 => /lib32/libpthread.so.0 (0xf73d4000)
        libasound.so.2 => /usr/lib32/libasound.so.2 (0xf730c000)
        librt.so.1 => /lib32/librt.so.1 (0xf7303000)
        libdl.so.2 => /lib32/libdl.so.2 (0xf72ff000)
        libdirectfb-1.2.so.0 => /usr/lib32/libdirectfb-1.2.so.0 (0xf7287000)
        libfusion-1.2.so.0 => /usr/lib32/libfusion-1.2.so.0 (0xf727d000)
        libdirect-1.2.so.0 => /usr/lib32/libdirect-1.2.so.0 (0xf7267000)
        libX11.so.6 => /usr/lib32/libX11.so.6 (0xf714a000)
        libXext.so.6 => /usr/lib32/libXext.so.6 (0xf713a000)
        libXxf86vm.so.1 => /usr/lib32/libXxf86vm.so.1 (0xf7133000)
        libXdamage.so.1 => /usr/lib32/libXdamage.so.1 (0xf712f000)
        libXfixes.so.3 => /usr/lib32/libXfixes.so.3 (0xf7129000)
        libdrm.so.2 => /lib32/libdrm.so.2 (0xf711e000)
        /lib/ld-linux.so.2 (0xf77df000)
        libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf7104000)
        libXau.so.6 => /usr/lib32/libXau.so.6 (0xf70ff000)
        libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf70f9000)
I can confirm that libao.so.4 is 32-bit ( because I built it myself :P ) :

Code: Select all

jdb2@aleph1 ~ $ file /usr/lib32/libao.so.4
/usr/lib32/libao.so.4: symbolic link to `libao.so.4.0.0'
jdb2@aleph1 ~ $ file /usr/lib32/libao.so.4.0.0
/usr/lib32/libao.so.4.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), dynamically linked, not stripped
but I have no plugins-2 directory; instead a plugins-4 directory and there is no libalsa09.so in there even when I build and install libao4 with --enable-alsa. Hmmm... maybe that's the problem. As I state in my post, the installed zsnes binary with all dependencies installed segfaults -- a missing or mismatched dynamic library as all that I can think of as the cause right now.

Regards,

jdb2
badinsults
"Your thread will be crushed."
Posts: 1236
Joined: Wed Jul 28, 2004 1:49 am
Location: Not in Winnipeg
Contact:

Re: Compiling ZSNES 1.51 under 64-bit Linux

Post by badinsults »

Really, there is no point on compiling it yourself.

Use the experimental binaries in this thread:

http://board.zsnes.com/phpBB3/viewtopic ... 13&start=0
<pagefault> i'd break up with my wife if she said FF8 was awesome
Post Reply