x64 - asm error, don't know how to compile

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
mister freak
New Member
Posts: 3
Joined: Sun Sep 30, 2007 5:25 am

x64 - asm error, don't know how to compile

Post by mister freak »

Hello.

Well, I read the sticky about 64 bit compiling. But I don't know how to build a target for 32 bit.
Can someone help me please with an instruction how to do this the right way?

I tried
export CLFAGS=-m32
export CXXFLAGS=-m32
but the same error.
I simply don't know if this is correct this way for 32-Bit.
Or is the failure lying somewhere else?

Code: Select all

parsegen: gcc  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -march=athlon64 -O3 -fomit-frame-pointer -s -O1 -o cfg.o -c cfg.c
nasm  -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -O1 -o endmem.o endmem.asm
nasm  -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -O1 -o init.o init.asm
init.asm:895: error: expression syntax error
make: *** [init.o] Fehler 1
Distribution is Debian Etch 64
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Which version of NASM are you using?
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
mister freak
New Member
Posts: 3
Joined: Sun Sep 30, 2007 5:25 am

Post by mister freak »

NASM version 0.99.03
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

NASM team is dumb in not using ZSNES to test that their version works as it's one of the best tests to make sure their builds are good. Too often we find NASM bugs.

0.99.01 is definitely broken to compile ZSNES, I tested 0.99.02, it seems to work, I'm not sure about 0.99.03 or 0.99.04, but I'll be checking shortly.

Latest stable for NASM is still 0.98.39, and as far as we know all of the later versions of 0.98 should be working except for .37 IIRC.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Okay, from the 99 line, only 2 works, someone smack someone at NASM.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
mister freak
New Member
Posts: 3
Joined: Sun Sep 30, 2007 5:25 am

Post by mister freak »

Thanks.
Now I got this warning messages.

Code: Select all

tools/depbuild gcc " -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -march=athlon64 -O3 -fomit-frame-pointer -s" nasm " -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -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/sw_draw.o linux/safelib.o zip/unzip.o zip/zpng.o > makefile.dep
gcc  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -march=athlon64 -O3 -fomit-frame-pointer -s -o version.o -c version.c
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/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/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -march=athlon64 -O3 -fomit-frame-pointer -s -fno-rtti  -L/usr/local/lib -L/usr/lib  -lz -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread  -lpng -lm -lcurses
/usr/bin/ld: warning: i386 architecture of input file `endmem.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `init.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `vcache.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `ztime.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/c4proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/dsp1proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/dsp2proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/dsp3proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/dsp4proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/fxemu2.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/fxemu2b.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/fxemu2c.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/fxtable.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/obc1proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/sa1proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/sa1regs.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/sfxproc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/st10proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/7110proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `chips/st11proc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/dma.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/dsp.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/dspproc.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/execute.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/irq.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/memory.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/spc700.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/stable.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/table.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `cpu/tablec.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `debugasm.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `gui/gui.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `gui/menu.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/makev16b.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/makev16t.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/makevid.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/mode716.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/mode716b.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/mode716d.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/mode716e.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/mode716t.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/mode7.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/mode7ext.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/mv16tms.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/m716text.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/newg162.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/newgfx.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/newgfx16.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/newgfx2.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/procvid.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/sw_draw.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/2xsaiw.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/hq2x16.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/hq2x32.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/hq3x16.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/hq3x32.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/hq4x16.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/hq4x32.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `video/copyvwin.o' is incompatible with i386:x86-64 output
/usr/bin/ld: warning: i386 architecture of input file `linux/sdlintrf.o' is incompatible with i386:x86-64 output
rm -f version.o
Don't know if this is critical.. Well, if i try to install, I get simply segmentation fault. Can it be associated with no installed graphics card drivers? I don't have 3d-drivers installed yet.
I tried to start it over ssh.

I also tried 32-bit binary packages, but I get the error

Code: Select all

zsnes32: /lib32/libc.so.6: version `GLIBC_2.4' not found (required by zsnes32)
zsnes32: /lib32/libc.so.6: version `GLIBC_2.4' not found (required by /usr/lib32/libSDL-1.2.so.0)
zsnes32: /lib32/libc.so.6: version `GLIBC_2.4' not found (required by /usr/lib32/libao.so.2)
zsnes32: /lib32/libc.so.6: version `GLIBC_2.4' not found (required by /usr/lib32/libdirectfb-0.9.so.25)
zsnes32: /lib32/libc.so.6: version `GLIBC_2.4' not found (required by /usr/lib32/libdirect-0.9.so.25)
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

The former looks like you are not compiling for a 32-bit target.

The latter suggests you don't have 32-bit libs.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Nach wrote:NASM team is dumb in not using ZSNES to test that their version works as it's one of the best tests to make sure their builds are good. Too often we find NASM bugs.
I can't help but put a warning here.
Remember the code was made to work on the ooold, buggy macro stuff nasm had back then. Convoluted and maybe incorrect on some stuff (some of the GUI hardcoded values just make no sense), but worked since the assembler was buggy as well.
Sometimes I think a clean, functionnal assembler would choke on some of that stuff... -_-
皆黙って俺について来い!!

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
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

grinvader wrote:
Nach wrote:NASM team is dumb in not using ZSNES to test that their version works as it's one of the best tests to make sure their builds are good. Too often we find NASM bugs.
I can't help but put a warning here.
Remember the code was made to work on the ooold, buggy macro stuff nasm had back then. Convoluted and maybe incorrect on some stuff (some of the GUI hardcoded values just make no sense), but worked since the assembler was buggy as well.
Sometimes I think a clean, functionnal assembler would choke on some of that stuff... -_-
I may agree with you if it choked on some of our crazy macros, but when it's choking on regular instructions...
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

HOW DO I REP RET

- ah wait, that one was from GCC, right ?
皆黙って俺について来い!!

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
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

grinvader wrote:HOW DO I REP RET

- ah wait, that one was from GCC, right ?
Yes, and after over a year, GCC team finally acknowledged the bug we reported. It also seems they uncovered a whole family of bugs which depend on fixing the bug we reported.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

I'm having the same/similar problem with 0.99.05:

Code: Select all

nasm  -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -D__OPENGL__ -DNO_DEBUGGER -O99999999 -D__RELEASE__ -o ztime.o ztime.asm
init.asm:886: error: expression syntax error
make: *** [init.o] Error 1
(this in src checked out from SVN)

Suppose I'll wait for another new NASM version..
AlucardZero
Rookie
Posts: 14
Joined: Mon Nov 20, 2006 6:25 am

Post by AlucardZero »

With NASM checked out from git and compiled yesterday (0.99.05 still, don't know how to find revision number) and ZSNES checked out from SVN (1.5.2, rev 5151), it compiles just fine.
Post Reply