Problems Compiling Linux WIP

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

Post Reply
tjbk_tjb
New Member
Posts: 5
Joined: Fri Aug 13, 2004 7:42 am

Problems Compiling Linux WIP

Post by tjbk_tjb »

I had recently loaded Mandrake Linux 9.2, when I decided I would load my favorite emulator, ZSNES. Unsatisfied with 1.36, I went to get the latest WIP. So, anyway, I downloaded the August 8 WIP. I couldn't execute autorun.sh. So I eventually figured out that I need to put allow execute permissions on everything. So I did. Then when I ran autorun it worked fine. Then, oh I'll just copy my terminal:

Code: Select all

[root@localhost src]# ./autogen.sh
Generating build information using aclocal and autoconf...
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc  -pipe -I. -Wall -I/usr/local/include -I/usr/include  -L/usr/local/lib -L/usr/lib) works... yes
checking whether the C compiler (gcc  -pipe -I. -Wall -I/usr/local/include -I/usr/include  -L/usr/local/lib -L/usr/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for nasm... nasm
checking for a BSD compatible install... /usr/bin/install -c
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking for zlib - version >= 1.1.0... yes
checking for libpng - version >= 1.2.0... yes
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for glGetError in -lGL... yes
checking for OpenGL... yes
checking if you want gdb friendly executable... no
checking which processor class to optimize for... 686
checking for ANSI C header files... yes
checking whether sys/types.h defines makedev... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h


ZSNES v1.36

SDL support                         Version 1.2.5
NASM support                        NASM version 0.98
ZLib support                        Version 1.1.4
PNG support (png screenshots)       Yes, version 1.2.5
OpenGL support                      Yes

The binary will be installed in /usr/local/bin

Configure complete, now type 'make' and pray.

[root@localhost src]# gmake
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -O1 -o chips/sfxproc.o chips/sfxproc.asm
nasm: unrecognised option `-O'
type `nasm -h' for help
gmake: *** [chips/sfxproc.o] Error 1
Noting that the "-O1" argument was messing stuff up, I removed it from the makefile. I hope that was a good idea. Then:

Code: Select all

[root@localhost src]# gmake
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/sfxproc.o chips/sfxproc.asm
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/fxemu2.o chips/fxemu2.asm

nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/dsp1proc.o chips/dsp1proc.asm
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/fxemu2b.o chips/fxemu2b.asm
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/fxemu2c.o chips/fxemu2c.asm
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/fxtable.o chips/fxtable.asm
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/sa1proc.o chips/sa1proc.asm
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/sa1regs.o chips/sa1regs.asm
gcc  -pipe -I. -Wall -I/usr/local/include -I/usr/include -D__LINUX__  -I/usr/include/SDL -D_REENTRANT  -D__OPENGL__ -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations -s -march=pentiumpro -o chips/dsp1emu.o -c chips/dsp1emu.c
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/st10proc.o chips/st10proc.asm
gcc  -pipe -I. -Wall -I/usr/local/include -I/usr/include -D__LINUX__  -I/usr/include/SDL -D_REENTRANT  -D__OPENGL__ -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations -s -march=pentiumpro -o chips/seta10.o -c chips/seta10.c
nasm  -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/dsp2proc.o chips/dsp2proc.asm
chips/dsp2proc.asm:249: short jump is out of range
chips/dsp2proc.asm:266: short jump is out of range
chips/dsp2proc.asm:271: short jump is out of range
chips/dsp2proc.asm:272: short jump is out of range
chips/dsp2proc.asm:273: short jump is out of range
chips/dsp2proc.asm:274: short jump is out of range
chips/dsp2proc.asm:275: short jump is out of range
chips/dsp2proc.asm:276: short jump is out of range
chips/dsp2proc.asm:277: short jump is out of range
chips/dsp2proc.asm:278: short jump is out of range
chips/dsp2proc.asm:279: short jump is out of range
chips/dsp2proc.asm:280: short jump is out of range
chips/dsp2proc.asm:303: short jump is out of range
chips/dsp2proc.asm:335: short jump is out of range
chips/dsp2proc.asm:377: short jump is out of range
chips/dsp2proc.asm:438: short jump is out of range
chips/dsp2proc.asm:510: short jump is out of range
chips/dsp2proc.asm:511: short jump is out of range
chips/dsp2proc.asm:516: short jump is out of range
gmake: *** [chips/dsp2proc.o] Error 1
How stupid am I and how can I fix this?
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

My first advice after a quick look is: upgrade nasm to 0.98.36 or 0.98.38 (NOT 0.98.37)
then restore the -O1 in the makefile and try again.

For reference here's my log:

Code: Select all

Generating build information using aclocal and autoconf...
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  -pipe -I. -Wall -I/usr/local/include -I/usr/include  -L/usr/local/lib -L/usr/lib) works... yes
checking whether the C compiler (gcc  -pipe -I. -Wall -I/usr/local/include -I/usr/include  -L/usr/local/lib -L/usr/lib) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for nasm... (cached) nasm
checking for a BSD compatible install... (cached) /bin/install -c
checking for sdl-config... (cached) /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking for zlib - version >= 1.1.0... yes
checking for libpng - version >= 1.2.0... yes
checking how to run the C preprocessor... (cached) gcc -E
checking for X... (cached) libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for glGetError in -lGL... (cached) yes
checking for OpenGL... yes
checking if you want gdb friendly executable... no
checking which processor class to optimize for... 686
checking for ANSI C header files... (cached) yes
checking whether sys/types.h defines makedev... (cached) yes
creating ./config.status
creating Makefile
creating config.h
config.h is unchanged
 
 
ZSNES v1.36
 
SDL support                         Version 1.2.7
NASM support                        NASM version 0.98.38 compiled on Nov 11 2003
ZLib support                        Version 1.2.1
PNG support (png screenshots)       Yes, version 1.2.5
OpenGL support                      Yes
 
The binary will be installed in /usr/local/bin
 
Configure complete, now type 'make' and pray.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
tjbk_tjb
New Member
Posts: 5
Joined: Fri Aug 13, 2004 7:42 am

Post by tjbk_tjb »

How stupid of me, anyways, it worked! Thank you very much!
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Glad to help.

And don't worry, that was far from the stupidity we're used to around here.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Post Reply