Help compiling zsnes in foresight linux

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

Moderator: ZSNES Mods

Post Reply
OmegaX
Rookie
Posts: 14
Joined: Sat Nov 04, 2006 4:04 am

Help compiling zsnes in foresight linux

Post by OmegaX »

Hi, i recently switched distro and i'm just testing if i can make things work in this one.
My specs:
Pentium 4 3.0 Ghz
Video card : nVidia GeForce 6200 TurboCache
OS: Foresight Linux 1.2
Well i downloaded ZSNES 1.51 source code from this page and i wanted to compile it (i had done it before in CentOS 4), so I run "./configure --enable release" and I got this error message

Code: Select all

checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
I have installed:
SDL=1.2.9-1.3-1
nasm=0.98.39-4-0.1
zlib=1.2.3-1-0.1
libpng=1.2.13-0.1-1
ncurses=5.4-3.3-1

this is the content of the "config.log" file (i didn't find an attachment button so i posted it whole):

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.59.  Invocation command line was

  $ ./configure --enable-release

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

hostname = localhost.localdomain
uname -m = i686
uname -r = 2.6.20.6-1.smp.gcc3.4.x86.i686
uname -s = Linux
uname -v = #1 SMP Sat Apr 7 10:02:24 EDT 2007

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

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

PATH: /usr/lib/jvm/sun-java-6/jre/bin
PATH: /usr/lib/jvm/sun-java-6/bin
PATH: /usr/lib/jvm/sun-java-6/jre/bin
PATH: /usr/lib/jvm/sun-java-6/bin
PATH: /usr/lib/jvm/sun-java-6/jre/bin
PATH: /usr/lib/jvm/sun-java-6/bin
PATH: /usr/kerberos/bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /bin
PATH: /usr/bin
PATH: /usr/bin/X11
PATH: /usr/X11R6/bin
PATH: /usr/local/bin
PATH: /opt/X11R6/bin


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

configure:1372: checking build system type
configure:1390: result: i686-pc-linux-gnulibc1
configure:1398: checking host system type
configure:1412: result: i686-pc-linux-gnulibc1
configure:1420: checking target system type
configure:1434: result: i686-pc-linux-gnulibc1
configure:1461: checking for a BSD-compatible install
configure:1516: result: /usr/bin/install -c
configure:1573: checking for gcc
configure:1589: found /usr/bin/gcc
configure:1599: result: gcc
configure:1843: checking for C compiler version
configure:1846: gcc --version </dev/null >&5
gcc (GCC) 3.4.4
Copyright (C) 2004 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:1849: $? = 0
configure:1851: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc/i386-unknown-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --target=i386-unknown-linux --host=i386-unknown-linux --prefix=/usr --enable-threads=posix --enable-shared --enable-__cxa_atexit --build=i386-unknown-linux --enable-java-awt=gtk --with-system-zlib --disable-libunwind-exceptions
Thread model: posix
gcc version 3.4.4
configure:1854: $? = 0
configure:1856: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:1859: $? = 1
configure:1882: checking for C compiler default output file name
configure:1885: gcc  -pipe -I. -I/usr/local/include -I/usr/include   -L/usr/local/lib -L/usr/lib conftest.c  >&5
/usr/bin/ld: cannot find /usr/lib/libc_nonshared.a
collect2: ld returned 1 exit status
configure:1888: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:1927: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_build=i686-pc-linux-gnulibc1
ac_cv_build_alias=i686-pc-linux-gnulibc1
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
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=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_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=i686-pc-linux-gnulibc1
ac_cv_host_alias=i686-pc-linux-gnulibc1
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_target=i686-pc-linux-gnulibc1
ac_cv_target_alias=i686-pc-linux-gnulibc1

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

CC='gcc'
CFLAGS=' -pipe -I. -I/usr/local/include -I/usr/include'
CPP=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
DEBUGGER_FILES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GL_DRAW=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
JMA_FILES=''
LDFLAGS=' -L/usr/local/lib -L/usr/lib'
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MMLIB_FILES=''
NASMPATH=''
NFLAGS=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PSRFLAGS=''
PSR_TEMP=''
SHELL='/bin/sh'
VERSION='1.51'
ZC=''
ZCFLAGS=''
ZSNESEXE=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_NASMPATH=''
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnulibc1'
build_alias=''
build_cpu='i686'
build_os='linux-gnulibc1'
build_vendor='pc'
datadir='${prefix}/share'
exec_prefix='NONE'
force_arch=''
host='i686-pc-linux-gnulibc1'
host_alias=''
host_cpu='i686'
host_os='linux-gnulibc1'
host_vendor='pc'
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='i686-pc-linux-gnulibc1'
target_alias=''
target_cpu='i686'
target_os='linux-gnulibc1'
target_vendor='pc'

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

#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""

configure: exit 77
I hope anybody can help me, thanks in advance
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I have no idea what's causing this problem. Someone suggested that you may not have binutils installed...

Also, take a look at this thread: http://board.zsnes.com/phpBB2/viewtopic.php?t=7371

Ignore the SVN sections, just obtain the stuff required for compiling ZSNES.

It looks like you don't have glibc installed though...
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
OmegaX
Rookie
Posts: 14
Joined: Sat Nov 04, 2006 4:04 am

Post by OmegaX »

Recently i tried to search for devel packages for everything, since i'm new to this distro i didn't know how the devel packages are called, i got this ones but i get the same error:
SDL:devel,
gcc:devel
libgcc:devellib
libpng:devel
libstdc++:devel
nasm:runtime
zlib:devel
Mesa:devel
ncurses:devel
libao
libao:devel

I have installed glibc 2.5-17-4, but i haven't been able to install it's corresponding devel package (repo has version 2.3.6-8.7-1 but it crashes update tool when resolving dependencies). Do you think that the lack of glibc:devel is causing my problem?

EDIT: ok i got it to work installing glibc, glibc:devel and glibc:devellib; now configure gives me another error:

Code: Select all

[carlos@localhost src]$ ./configure --enable-release
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
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 ANSI C... 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
./configure: line 2961: syntax error near unexpected token `1.2.0,,AC_MSG_ERROR'
./configure: line 2961: `AM_PATH_SDL(1.2.0,,AC_MSG_ERROR(SDL >= 1.2.0 is required))'
i have installed packages:
SDL:devellib=1.2.9-1.3-1
SDL:devel=1.2.9-1.3-1
SDL=1.2.9-1.3-1
so the error doesn't seem to make sense to me.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Try using a different version of autoconf and automake.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

Try:

Code: Select all

apt-get install build-essential
OmegaX
Rookie
Posts: 14
Joined: Sat Nov 04, 2006 4:04 am

Post by OmegaX »

To Deathlike2, i have installed:
automake=1.9.6-3-0.1
autoconf=2.59-7-0.1
which versions should i have?
To Aerdan, i'm not using debian or ubuntu (altough i'm starting to wish ihe contrary :P), in foresight the package manager is conary :(
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

I'm using:
autoconf (GNU Autoconf) 2.61
automake (GNU automake) 1.4-p6
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
OmegaX
Rookie
Posts: 14
Joined: Sat Nov 04, 2006 4:04 am

problem solved... kinda

Post by OmegaX »

Ok, i got it to compile, i was (stupidly) running configure directly instead of autogen.sh (altough i used to do it that way in CentOS with no problem).
Thanks for the help, and sorry for the inconvinience.

EDIT: ok i have a new problem :S i got it to compile without openGL support, so i installed devel libs for my nvidia driver and run ./autogen.sh again, it detected OpenGL support but when i run make it throws the following error:

Code: Select all

[carlos@localhost src]$ make
tools/depbuild gcc " -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_REENTRANT  -D__OPENGL__ -march=prescott -O3 -fomit-frame-pointer -s" nasm " -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -D__OPENGL__ -O1" cfg.o endmem.o init.o initc.o input.o md.o patch.o ui.o vcache.o version.o zloader.o zmovie.o zpath.o zstate.o ztime.o ztimec.o chips/c4emu.o chips/c4proc.o chips/dsp1emu.o chips/dsp1proc.o chips/dsp2proc.o chips/dsp3emu.o chips/dsp3proc.o chips/dsp4emu.o chips/dsp4proc.o chips/fxemu2.o chips/fxemu2b.o chips/fxemu2c.o chips/fxtable.o chips/obc1emu.o chips/obc1proc.o chips/sa1proc.o chips/sa1regs.o chips/sdd1emu.o chips/seta10.o chips/sfxproc.o chips/st10proc.o chips/7110proc.o chips/seta11.o chips/st11proc.o cpu/dma.o cpu/dsp.o cpu/dspproc.o cpu/execute.o cpu/executec.o cpu/irq.o cpu/memory.o cpu/memtable.o cpu/spc700.o cpu/stable.o cpu/table.o cpu/tablec.o debugasm.o debugger.o gui/gui.o gui/guifuncs.o gui/menu.o effects/burn.o effects/smoke.o effects/water.o jma/7zlzma.o jma/crc32.o jma/iiostrm.o     jma/inbyte.o jma/jma.o jma/lzma.o       jma/lzmadec.o jma/winout.o jma/zsnesjma.o mmlib/mm.o mmlib/linux.o  video/makev16b.o video/makev16t.o video/makevid.o video/mode716.o video/mode716b.o video/mode716d.o video/mode716e.o video/mode716t.o video/mode7.o video/mode7ext.o video/mv16tms.o video/m716text.o video/newg162.o video/newgfx.o video/newgfx16.o video/newgfx2.o video/procvid.o video/procvidc.o video/sw_draw.o video/2xsaiw.o video/hq2x16.o video/hq2x32.o video/hq3x16.o video/hq3x32.o video/hq4x16.o video/hq4x32.o video/ntsc.o video/copyvwin.o linux/audio.o linux/battery.o linux/sdlintrf.o linux/sdllink.o linux/gl_draw.o linux/sw_draw.o linux/safelib.o zip/unzip.o zip/zpng.o > makefile.dep
g++ -o zsnes cfg.o endmem.o init.o initc.o input.o md.o patch.o ui.o vcache.o version.o zloader.o zmovie.o zpath.o zstate.o ztime.o ztimec.o chips/c4emu.o chips/c4proc.o chips/dsp1emu.o chips/dsp1proc.o chips/dsp2proc.o chips/dsp3emu.o chips/dsp3proc.o chips/dsp4emu.o chips/dsp4proc.o chips/fxemu2.o chips/fxemu2b.o chips/fxemu2c.o chips/fxtable.o chips/obc1emu.o chips/obc1proc.o chips/sa1proc.o chips/sa1regs.o chips/sdd1emu.o chips/seta10.o chips/sfxproc.o chips/st10proc.o chips/7110proc.o chips/seta11.o chips/st11proc.o cpu/dma.o cpu/dsp.o cpu/dspproc.o cpu/execute.o cpu/executec.o cpu/irq.o cpu/memory.o cpu/memtable.o cpu/spc700.o cpu/stable.o cpu/table.o cpu/tablec.o debugasm.o debugger.o gui/gui.o gui/guifuncs.o gui/menu.o effects/burn.o effects/smoke.o effects/water.o jma/7zlzma.o jma/crc32.o jma/iiostrm.o  jma/inbyte.o jma/jma.o jma/lzma.o       jma/lzmadec.o jma/winout.o jma/zsnesjma.o mmlib/mm.o mmlib/linux.o  video/makev16b.o video/makev16t.o video/makevid.o video/mode716.o video/mode716b.o video/mode716d.o video/mode716e.o video/mode716t.o video/mode7.o video/mode7ext.o video/mv16tms.o video/m716text.o video/newg162.o video/newgfx.o video/newgfx16.o video/newgfx2.o video/procvid.o video/procvidc.o video/sw_draw.o video/2xsaiw.o video/hq2x16.o video/hq2x32.o video/hq3x16.o video/hq3x32.o video/hq4x16.o video/hq4x32.o video/ntsc.o video/copyvwin.o linux/audio.o linux/battery.o linux/sdlintrf.o linux/sdllink.o linux/gl_draw.o linux/sw_draw.o linux/safelib.o zip/unzip.o zip/zpng.o  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_REENTRANT  -D__OPENGL__ -march=prescott -O3 -fomit-frame-pointer -s -fno-rtti  -L/usr/local/lib -L/usr/lib  -lz -L/usr/lib -lSDL -lpthread  -lpng -lm -lcurses -LNONE -lGL
linux/gl_draw.o: In function `gl_drawwin':
gl_draw.c:(.text+0x552): undefined reference to `BilinearFilter'
collect2: ld devolvió el estado de salida 1
make: *** [main] Error 1
Any ideas on how to make it compile with opengl support?

EDIT2: ok nevermind, SVN version compiles with no problem :D
Post Reply