Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Suggestions concerning linux version

Reply to topic
Author Message
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Suggestions concerning linux version
Post Posted: Wed Apr 27, 2005 11:47 am
1. buildupd.exe does not work. User has to delete it to be able to start compilation;
2. SEAL include file is called audio.h, not seal.h;
3. make is unable to create obj directory;
4. fwritable-strings was removed in gcc 4.0, so compilation won't probably work with it.

I've been able to get this far. Then I've come across this error:
cc -I. -I./tools -I./sound -Ilibs -I../include -I/home/jsikorski/downloads/seal-1.07/include                               -DUNIX -DX86_ASM -fwritable-strings -DMEKA_SOUND -DMEKA_EAGLE  -DMEKA_ZIP -DMEKA_PNG -DMEKA_JOY -DMEKA_Z80_DEBUGGER -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -DMARAT_Z80 -c g_file.c -oobj/g_file.o
cc1: note: -fwritable-strings is deprecated; see documentation for details
g_file.c: In function `FB_Add_Entries':
g_file.c:355: error: structure has no member named `Opt_UsesVLFN'
make: *** [obj/g_file.o] Error 1

What is wrong?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14754
  • Location: London
Reply with quote
Post Posted: Wed Apr 27, 2005 12:25 pm
Well, it's not hard to figure it out.

Line 355 refers to FB.Opt_UsesVLFN; FB is a struct which has no such entry. But we can see that in the DOS/Win32 section, there is almost identical code which presumably is correct:

            // Create a new file browser entry of given type
            t_filebrowser_entry *entry = FB_Entry_New (type, strdup (name));
            if (FB.Opt_UsesVLFN)
                FB_Entry_FindVLFN (entry);
...
            // Create a new file browser entry of given type
            t_filebrowser_entry *entry = FB_Entry_New (type, strdup (name));
            if (Configuration.fb_uses_DB)
                FB_Entry_FindVLFN (entry);


So presumably this was a recent change that has not been reflected in the Un*x sections.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Wed Apr 27, 2005 12:28 pm
Last edited by Bock on Wed Apr 27, 2005 12:43 pm; edited 3 times in total
Hello,

Belegdol wrote
1. buildupd.exe does not work. User has to delete it to be able to start compilation;
2. SEAL include file is called audio.h, not seal.h;
3. make is unable to create obj directory;
4. fwritable-strings was removed in gcc 4.0, so compilation won't probably work with it.

1. I'm not sure what to do here... I kept it because it's not auto compiled for the Visual C++ project, but DOS/Unix target can compile it. I guess I'll have to add to the Visual C++ project a way to build/execute it and then remove it from the source distribution.

2. *UPDATED* Proppy used seal.h I don't know why. I think some Linux packages renamed the file to audio.h that's why. I'll ask him.

3. What does it says/shows?

4. Can be safely removed. It thought it was removed already.

Quote
I've been able to get this far. Then I've come across this error:
cc -I. -I./tools -I./sound -Ilibs -I../include -I/home/jsikorski/downloads/seal-1.07/include                               -DUNIX -DX86_ASM -fwritable-strings -DMEKA_SOUND -DMEKA_EAGLE  -DMEKA_ZIP -DMEKA_PNG -DMEKA_JOY -DMEKA_Z80_DEBUGGER -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -DMARAT_Z80 -c g_file.c -oobj/g_file.o
cc1: note: -fwritable-strings is deprecated; see documentation for details
g_file.c: In function `FB_Add_Entries':
g_file.c:355: error: structure has no member named `Opt_UsesVLFN'
make: *** [obj/g_file.o] Error 1

What is wrong?

I'm sure that Proppy reported that in the past when he made Linux builds, I fixed it for him but maybe it did not get added to the main branch.

Change "Opt_UsesVLFN" by "Configuration.fb_uses_DB" and it should work.

Thanks for all those notice. I still don't have a Linux install on my computer (I'll see if I can use a spare system at work) but I'll process those changes.

Let me know if you can compile with the above mentionned change.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Wed Apr 27, 2005 12:29 pm
Oh, Maxim answered before me :)
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Wed Apr 27, 2005 1:23 pm
Still no success:
[jsikorski@DOMOWY srcs]$ make
cc -I. -I./tools -I./sound -Ilibs -I../include -I/home/jsikorski/downloads/seal-1.07/include                                            -DUNIX -DX86_ASM -fwritable-strings -DMEKA_SOUND -DMEKA_EAGLE  -DMEKA_ZIP -DMEKA_PNG -DMEKA_JOY -DMEKA_Z80_DEBUGGER -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -DMARAT_Z80 -c g_file.c -oobj/g_file.o
cc1: note: -fwritable-strings is deprecated; see documentation for details
g_file.c: In function `FB_Add_Entries':
g_file.c:355: error: structure has no member named `Configuration'
make: *** [obj/g_file.o] Error 1
[jsikorski@DOMOWY srcs]$


I am using seal lib from http://www.sonicspot.com/sealsdk/sealsdk.html and the header is called audio.h. And finally, the obj problem:
[jsikorski@DOMOWY srcs]$ make
./buildupd.exe
cc -I. -I./tools -I./sound -Ilibs -I../include -I/home/jsikorski/downloads/seal-1.07/include                                            -DUNIX -DX86_ASM -fwritable-strings -DMEKA_SOUND -DMEKA_EAGLE  -DMEKA_ZIP -DMEKA_PNG -DMEKA_JOY -DMEKA_Z80_DEBUGGER -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -DMARAT_Z80 -c meka.c -oobj/meka.o
cc1: note: -fwritable-strings is deprecated; see documentation for details
Assembler messages:
FATAL: can't create obj/meka.o: No such file or directory
make: *** [obj/meka.o] Error 1
[jsikorski@DOMOWY srcs]$
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Wed Apr 27, 2005 1:40 pm
Belegdol wrote
Still no success:
[jsikorski@DOMOWY srcs]$ make
cc -I. -I./tools -I./sound -Ilibs -I../include -I/home/jsikorski/downloads/seal-1.07/include                                            -DUNIX -DX86_ASM -fwritable-strings -DMEKA_SOUND -DMEKA_EAGLE  -DMEKA_ZIP -DMEKA_PNG -DMEKA_JOY -DMEKA_Z80_DEBUGGER -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -DMARAT_Z80 -c g_file.c -oobj/g_file.o
cc1: note: -fwritable-strings is deprecated; see documentation for details
g_file.c: In function `FB_Add_Entries':
g_file.c:355: error: structure has no member named `Configuration'
make: *** [obj/g_file.o] Error 1
[jsikorski@DOMOWY srcs]$

Sorry I meant, change "FB.Opt_UsesVLFN" by "Configuration.fb_uses_DB" and it should work. "Configuration" is not a structure inside FB, it's global.

Belegdol wrote
I am using seal lib from http://www.sonicspot.com/sealsdk/sealsdk.html and the header is called audio.h. And finally, the obj problem:
[jsikorski@DOMOWY srcs]$ make
./buildupd.exe
cc -I. -I./tools -I./sound -Ilibs -I../include -I/home/jsikorski/downloads/seal-1.07/include                                            -DUNIX -DX86_ASM -fwritable-strings -DMEKA_SOUND -DMEKA_EAGLE  -DMEKA_ZIP -DMEKA_PNG -DMEKA_JOY -DMEKA_Z80_DEBUGGER -Wall -march=pentium -O6 -ffast-math -fno-strength-reduce -funroll-all-loops -DMARAT_Z80 -c meka.c -oobj/meka.o
cc1: note: -fwritable-strings is deprecated; see documentation for details
Assembler messages:
FATAL: can't create obj/meka.o: No such file or directory
make: *** [obj/meka.o] Error 1
[jsikorski@DOMOWY srcs]$


Run "make makedir"
I suppose it's possible to make rules to automatically create the directories, thought.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Sources updated
Post Posted: Wed Apr 27, 2005 11:05 pm
Belegdol,
Apart from the seal.h/audio.h problem, I've updated the sources code to reflect what you mentionned:
http://www.smspower.org/meka/snapshots/meka-src-2005-04-27.zip

  - Sources
     - (Linux) Updated Makefile and some sources tidbits for proper
       compilation (thanks Proppy, Belegdol).
     - (Linux,DOS) Object directories are now created automatically.
     - (Linux,DOS) Removed "smscheck" tool from project. Has nothing to do with MEKA.
     - (Win32) Make it that build date/time stamp in build.c is updated when
       rebuilding the solution. Removed buildupd.exe executable from sources.
     - (DOS) I'm stopping to maintain the MS-DOS port. A maintener is welcome.

Hope it works better now.

I'm also interested to know if it works well under Win32, because I had to update the Visual Studio project to have a subproject creating the build.c file (it's kinda hacky).
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Thu Apr 28, 2005 5:39 am
Now it's almost perfect, but linker is unable to find -lalleg at the end. I've added -L/usr/local/lib/allegro/4.1 to the makefile, but it still does not work.Presumably I should add something more, but I don't know what. I am using allegro 4.1.18.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Thu Apr 28, 2005 5:52 am
Belegdol wrote
Now it's almost perfect, but linker is unable to find -lalleg at the end. I've added -L/usr/local/lib/allegro/4.1 to the makefile, but it still does not work.Presumably I should add something more, but I don't know what. I am using allegro 4.1.18.

Did you run "make install" on Allegro? Is there a "liballeg.a" file in the directory mentionned above? Else; you can make a copy of the linker line here so I can look at it.
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Thu Apr 28, 2005 8:35 am
Probably there is no liballeg.a, only the shared libs the allegro install script is very weird. I'll check this when I return home. Greets.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Thu Apr 28, 2005 9:12 am
Belegdol wrote
Probably there is no liballeg.a, only the shared libs the allegro install script is very weird. I'll check this when I return home. Greets.

Allegro has to be configured/compiled for static linkage.

Under DOS/Win32, Allegro requires the "STATIC_LINK" environment variable to be set during Make, but if I remember correctly, it's a "./configure" option under Linux. Please let me know if you find it and figure out the exact command line option to pass to "configure". I'll have to mention it in the compilation documentation.

Almost there :)
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Thu Apr 28, 2005 5:01 pm
The static library is built by default, but is called liballeg_unsharable.a. Also, -laudio should be used instead of -lseal. Finally, I am still unable to compile meka. I suck ;)
[jsikorski@DOMOWY srcs]$ make
cc -o ../meka.exe obj/meka.o obj/machine.o obj/cpu.o obj/m6502.a obj/debug.o obj/debugger.o obj/datadump.o obj/z80marat.a obj/video.o obj/video_t.o obj/video_m2.o obj/video_m5.o obj/video_c.o obj/vdp.o obj/palette.o obj/effects.o obj/fskipper.o obj/videoasm.o obj/mainloop.o obj/ioports.o obj/commport.o obj/vmachine.o obj/bios.o obj/country.o obj/bmemory.o obj/mappers.o obj/eeprom.o obj/beam.o obj/tvtype.o obj/mappersa.o obj/inputs.o obj/inputs_c.o obj/inputs_f.o obj/inputs_i.o obj/inputs_t.o obj/inputs_u.o obj/lightgun.o obj/keyboard.o obj/sportpad.o obj/rapidfir.o obj/tvoekaki.o obj/glasses.o obj/checksum.o obj/db.o obj/vlfn.o obj/patch.o obj/games.o obj/saves.o obj/misc.o obj/build.o obj/fonts.o obj/file.o obj/data.o obj/tools.o obj/tools_t.o obj/keyinfo.o obj/drivers.o obj/message.o obj/clock.o obj/capture.o obj/errors.o obj/sdsc.o obj/setup.o obj/config.o obj/config_v.o obj/config_j.o obj/gui.o obj/g_action.o obj/g_box.o obj/g_colors.o obj/g_emu.o obj/g_menu.o obj/g_menu_i.o obj/g_menu_t.o obj/g_mouse.o obj/g_init.o obj/g_tools.o obj/g_widget.o obj/g_update.o obj/themes.o obj/themes_b.o obj/specials.o obj/desktop.o obj/g_apps.o obj/g_file.o obj/app_options.o obj/textbox.o obj/app_tileview.o obj/textview.o obj/app_techinfo.o obj/app_memview.o obj/app_palview.o obj/app_about.o obj/eagle.a obj/sound/sound.o obj/sound/s_misc.o obj/sound/s_opl.o obj/sound/s_log.o obj/sound/sasound.o obj/sound/psg.o obj/sound/fmeditor.o obj/sound/wav.o obj/sound/vgm.o obj/sound/fmunit.o obj/sound/ym2413hd.o  obj/sound/emu2413/emu2413.o obj/sound/emu2413/mekaintf.o obj/sg1ksc3k.o obj/sf7000.oobj/nes.o obj/nes_maps.o obj/nes_ppu.o obj/coleco.o obj/fdc765.o obj/register.oobj/libaddon/zip/unzip.o obj/libaddon/png/loadpng.o obj/libaddon/png/savepng.o obj/libaddon/png/regpng.o obj/blit.o obj/blitintf.o obj/memory.o obj/tools/libmy.o obj/tools/liblist.o obj/tools/libparse.o obj/tools/tfile.o obj/osd/misc.o obj/osd/timer.o  -lalleg_unsharable -L/home/jsikorski/downloads/seal-1.07/lib/Linux-laudio -Llibs -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L../lib   -lXxf86dga -lXxf86vm -s -lpng -lz
obj/meka.o(.text+0x429): In function `Close_Callback':
: undefined reference to `set_close_button_callback'
obj/meka.o(.text+0x471): In function `Init_Allegro':
: undefined reference to `set_uformat'
obj/meka.o(.text+0x480): In function `Init_Allegro':
: undefined reference to `_get_allegro_version'
obj/meka.o(.text+0x498): In function `Init_Allegro':
: undefined reference to `get_config_text'
obj/meka.o(.text+0x4a6): In function `Init_Allegro':
: undefined reference to `allegro_error'
obj/meka.o(.text+0x4ab): In function `Init_Allegro':
: undefined reference to `ustrzcpy'
obj/meka.o(.text+0x4b7): In function `Init_Allegro':
: undefined reference to `set_color_depth'
...................................

And so on.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Thu Apr 28, 2005 5:31 pm
Belegdol wrote
The static library is built by default, but is called liballeg_unsharable.a. Also, -laudio should be used instead of -lseal. Finally, I am still unable to compile meka. You suck bock ;)

That's weird. Can you do a "nm liballeg_unsharable.a" and check if it has those symbols?

Or maybe, in MEKA's system.h, before #include <allegro.h>, add the following:

#define ALLEGRO_STATICLINK
#include <allegro.h>
[...]
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Thu Apr 28, 2005 5:49 pm
It appears that is does not. Maybe I have miscompiled allegro?
[edit]
Here is the full output of these two commands:

www.republika.pl/belegdol/temp/make.txt
www.republika.pl/belegdol/temp/la.txt
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Thu Apr 28, 2005 6:18 pm
Belegdol wrote
It appears that is does not. Maybe I have miscompiled allegro?

Changing system.h requires a make clean && make.

Otherwise, you may want to look for an explicit static compilation of Allegro. The "nm" output doesn't seem to contains every Allegro symbols. Maybe it's just some static elements that have to be linked along with the programs even when using the dynamic library.
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Thu Apr 28, 2005 6:37 pm
Almost there. Indeed, liballeg.a requires running ./configure --enable-static. But there are still some undefined references left:
[jsikorski@DOMOWY srcs]$ make
cc -o ../meka.exe obj/meka.o obj/machine.o obj/cpu.o obj/m6502.a obj/debug.o obj/debugger.o obj/datadump.o obj/z80marat.a obj/video.o obj/video_t.o obj/video_m2.o obj/video_m5.o obj/video_c.o obj/vdp.o obj/palette.o obj/effects.o obj/fskipper.o obj/videoasm.o obj/mainloop.o obj/ioports.o obj/commport.o obj/vmachine.o obj/bios.o obj/country.o obj/bmemory.o obj/mappers.o obj/eeprom.o obj/beam.o obj/tvtype.o obj/mappersa.o obj/inputs.o obj/inputs_c.o obj/inputs_f.o obj/inputs_i.o obj/inputs_t.o obj/inputs_u.o obj/lightgun.o obj/keyboard.o obj/sportpad.o obj/rapidfir.o obj/tvoekaki.o obj/glasses.o obj/checksum.o obj/db.o obj/vlfn.o obj/patch.o obj/games.o obj/saves.o obj/misc.o obj/build.o obj/fonts.o obj/file.o obj/data.o obj/tools.o obj/tools_t.o obj/keyinfo.o obj/drivers.o obj/message.o obj/clock.o obj/capture.o obj/errors.o obj/sdsc.o obj/setup.o obj/config.o obj/config_v.o obj/config_j.o obj/gui.o obj/g_action.o obj/g_box.o obj/g_colors.o obj/g_emu.o obj/g_menu.o obj/g_menu_i.o obj/g_menu_t.o obj/g_mouse.o obj/g_init.o obj/g_tools.o obj/g_widget.o obj/g_update.o obj/themes.o obj/themes_b.o obj/specials.o obj/desktop.o obj/g_apps.o obj/g_file.o obj/app_options.o obj/textbox.o obj/app_tileview.o obj/textview.o obj/app_techinfo.o obj/app_memview.o obj/app_palview.o obj/app_about.o obj/eagle.a obj/sound/sound.o obj/sound/s_misc.o obj/sound/s_opl.o obj/sound/s_log.o obj/sound/sasound.o obj/sound/psg.o obj/sound/fmeditor.o obj/sound/wav.o obj/sound/vgm.o obj/sound/fmunit.o obj/sound/ym2413hd.o  obj/sound/emu2413/emu2413.o obj/sound/emu2413/mekaintf.o obj/sg1ksc3k.o obj/sf7000.oobj/nes.o obj/nes_maps.o obj/nes_ppu.o obj/coleco.o obj/fdc765.o obj/register.oobj/libaddon/zip/unzip.o obj/libaddon/png/loadpng.o obj/libaddon/png/savepng.o obj/libaddon/png/regpng.o obj/blit.o obj/blitintf.o obj/memory.o obj/tools/libmy.o obj/tools/liblist.o obj/tools/libparse.o obj/tools/tfile.o obj/osd/misc.o obj/osd/timer.o  -lalleg -L/home/jsikorski/downloads/seal-1.07/lib/Linux -laudio -Llibs -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L../lib   -lXxf86dga -lXxf86vm-s -lpng -lz
obj/meka.o(.text+0x7c6): In function `main':
: undefined reference to `Decode_Tile_ASM_Init'
obj/meka.o(.text+0x106): In function `Init_Tables':
: undefined reference to `Decode_Tile_ASM_Init'
obj/machine.o(.text+0x1bc): In function `Machine_Set_Handler_Read':
: undefined reference to `Read_Default_ASM'
obj/machine.o(.text+0x1c6): In function `Machine_Set_Handler_Read':
: undefined reference to `Read_Default_ASM'
obj/machine.o(.text+0x309): In function `Machine_Set_Handler_Write':
: undefined reference to `Write_Mapper_32kRAM_ASM'
obj/machine.o(.text+0x313): In function `Machine_Set_Handler_Write':
: undefined reference to `Write_Mapper_32kRAM_ASM'
obj/machine.o(.text+0xa09): In function `Machine_Reset':
: undefined reference to `Read_Default_ASM'
obj/machine.o(.text+0xa13): In function `Machine_Reset':
: undefined reference to `Read_Default_ASM'
obj/machine.o(.text+0x1380): In function `Machine_Reset':
: undefined reference to `Write_Mapper_32kRAM_ASM'
obj/machine.o(.text+0x138a): In function `Machine_Reset':
: undefined reference to `Write_Mapper_32kRAM_ASM'
obj/debugger.o(.text+0x27cf): In function `Debugger_Eval_GetExpression_Block':
: undefined reference to `max'
obj/debugger.o(.text+0x29a3): In function `Debugger_Eval_GetExpression':
: undefined reference to `max'
obj/video_m5.o(.text+0x558): In function `Display_BackGround_Line_5_C':
: undefined reference to `Decode_Tile_ASM'
obj/video_m5.o(.text+0xb26): In function `Refresh_Sprites_5':
: undefined reference to `Find_Last_Sprite_ASM_Wide'
obj/video_m5.o(.text+0xe84): In function `Refresh_Sprites_5':
: undefined reference to `Find_Last_Sprite_ASM'
obj/video_m5.o(.text+0x109f): In function `Refresh_Sprites_5':
: undefined reference to `Decode_Tile_ASM'
obj/video_m5.o(.text+0x11cb): In function `Refresh_Sprites_5':
: undefined reference to `Sprite_Collide_Line_ASM'
obj/video_m5.o(.text+0x11e8): In function `Refresh_Sprites_5':
: undefined reference to `Decode_Tile_ASM'
obj/video_m5.o(.text+0x163b): In function `Refresh_Sprites_5':
: undefined reference to `Decode_Tile_ASM'
obj/video_m5.o(.text+0x1785): In function `Refresh_Sprites_5':
: undefined reference to `Sprite_Collide_Line_ASM'
obj/video_m5.o(.text+0x17a1): In function `Refresh_Sprites_5':
: undefined reference to `Decode_Tile_ASM'
obj/videoasm.o(.text+0x3d): In function `_Decode_Tile_ASM':
: undefined reference to `_VRAM'
obj/videoasm.o(.text+0xac): In function `_Find_Last_Sprite_ASM':
: undefined reference to `_SPR_AREA'
obj/videoasm.o(.text+0xb4): In function `_Find_Last_Sprite_ASM':
: undefined reference to `_Sprites_on_Line'
obj/videoasm.o(.text+0xe6): In function `_Find_Last_Sprite_ASM.L2':
: undefined reference to `_Sprites_on_Line'
obj/videoasm.o(.text+0xf5): In function `_Find_Last_Sprite_ASM.L4':
: undefined reference to `_Sprite_Last'
obj/videoasm.o(.text+0x10e): In function `_Find_Last_Sprite_ASM_Wide':
: undefined reference to `_SPR_AREA'
obj/videoasm.o(.text+0x116): In function `_Find_Last_Sprite_ASM_Wide':
: undefined reference to `_Sprites_on_Line'
obj/videoasm.o(.text+0x143): In function `_Find_Last_Sprite_ASM_Wide.L2':
: undefined reference to `_Sprites_on_Line'
obj/videoasm.o(.text+0x152): In function `_Find_Last_Sprite_ASM_Wide.L4':
: undefined reference to `_Sprite_Last'
obj/videoasm.o(.text+0x160): In function `_Sprite_Collide_Line_ASM':
: undefined reference to `_Sprites_Collision_Table'
obj/videoasm.o(.text+0x23f): In function `_Sprite_Collide_Line_ASM.Lcollide':
: undefined reference to `_sms'
obj/videoasm.o(.text+0x246): In function `_Sprite_Collide_Line_ASM.Lcollide':
: undefined reference to `_Do_Collision'
obj/mappersa.o(.text+0x8): In function `_Read_Default_ASM':
: undefined reference to `_Mem_Pages'
obj/mappersa.o(.text+0x32): In function `_Write_Mapper_32kRAM_ASM':
: undefined reference to `_Mem_Pages'
obj/app_tileview.o(.text+0x969): In function `TileViewer_Update':
: undefined reference to `Decode_Tile_ASM'
obj/blit.o(.text+0x714): In function `Blit_Fullscreen_Eagle':
: undefined reference to `eagle'
obj/blit.o(.text+0x774): In function `Blit_Fullscreen_Eagle':
: undefined reference to `eagle'
/usr/local/lib/liballeg.a(xwin.o)(.text+0x3b4): In function `_xwin_private_create_window':
: undefined reference to `XcursorSupportsARGB'
/usr/local/lib/liballeg.a(xwin.o)(.text+0xa1a): In function `_xwin_set_mouse_sprite':
: undefined reference to `XcursorImageCreate'
/usr/local/lib/liballeg.a(xwin.o)(.text+0xa72): In function `_xwin_set_mouse_sprite':
: undefined reference to `XcursorImageDestroy'
/usr/local/lib/liballeg.a(xwin.o)(.text+0x10b8): In function `_xwin_show_mouse':
: undefined reference to `XcursorImageLoadCursor'
/usr/local/lib/liballeg.a(xwin.o)(.text+0x7c95): In function `_xwin_private_set_window_defaults':
: undefined reference to `XpmCreatePixmapFromData'
collect2: ld returned 1 exit status
make: *** [../meka.exe] Error 1
[jsikorski@DOMOWY srcs]$

Maybe that's because all symbols should be in lowercase? No uppercase ones apperar on nm liballegro.a
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Thu Apr 28, 2005 6:44 pm
Ok, now there's 2 differents things.

First, MEKA functions in x86 assembly, assembled by Nasm, there's a problem with exported symbols. It seems to depend on the system/compiler/assembler but sometimes, exported symbols are prefixed by an underscore, sometimes not.

You'll have to edit the *.asm files. They all have a set of commented define that you can uncomment. For exemple, in videoasm.asm:

; Uncomment for UNIX build
;%DEFINE  _Decode_Tile_ASM            Decode_Tile_ASM
;%DEFINE  _Decode_Tile_ASM_Init       Decode_Tile_ASM_Init
;%DEFINE  _Find_Last_Sprite_ASM       Find_Last_Sprite_ASM
;%DEFINE  _Find_Last_Sprite_ASM_Wide  Find_Last_Sprite_ASM_Wide
;%DEFINE  _Sprite_Collide_Line_ASM    Sprite_Collide_Line_ASM

;%DEFINE  _VRAM                       VRAM
;%DEFINE  _SPR_AREA                   SPR_AREA
;%DEFINE  _Sprite_Last                Sprite_Last
;%DEFINE  _Sprites_on_Line            Sprites_on_Line
;%DEFINE  _Sprites_Collision_Table    Sprites_Collision_Table
;%DEFINE  _Do_Collision               Do_Collision
;%DEFINE  _sms                        sms

Uncomment all the lines. I think Allegro had a solution to do this automagically (figure out if the _ are needed or not), I'll have to look into that so that's it's cross platform and you don't have to edit this manually anymore.

Second / the other problem are X-Window symbols:

/usr/local/lib/liballeg.a(xwin.o)(.text+0x3b4): In function `_xwin_private_create_window':
: undefined reference to `XcursorSupportsARGB'
/usr/local/lib/liballeg.a(xwin.o)(.text+0xa1a): In function `_xwin_set_mouse_sprite':
: undefined reference to `XcursorImageCreate'
/usr/local/lib/liballeg.a(xwin.o)(.text+0xa72): In function `_xwin_set_mouse_sprite':
: undefined reference to `XcursorImageDestroy'
/usr/local/lib/liballeg.a(xwin.o)(.text+0x10b8): In function `_xwin_show_mouse':
: undefined reference to `XcursorImageLoadCursor'
/usr/local/lib/liballeg.a(xwin.o)(.text+0x7c95): In function `_xwin_private_set_window_defaults':
: undefined reference to `XpmCreatePixmapFromData'

Those are not used by Meka but rather Allegro. I hve no idea what they are. Maybe the 'Xcursor' functions are located in a different library? See if there's something of this kind. Else, try to compile an Allegro exemple and see the librairies it links with.
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Thu Apr 28, 2005 7:01 pm
Two left. I've added -lXcursor and -lXpm to the makefile.
obj/debugger.o(.text+0x27cf): In function `Debugger_Eval_GetExpression_Block':
: undefined reference to `max'
obj/debugger.o(.text+0x29a3): In function `Debugger_Eval_GetExpression':
: undefined reference to `max'
collect2: ld returned 1 exit status
make: *** [../meka.exe] Error 1
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Thu Apr 28, 2005 7:46 pm
Change "max" to "MAX" in debugger.c
Funny I thought I fixed that already, I must have missed some.

*EDIT* It's indeed fixed in the last source code I linked above in the thread. I guess you're using an older one. Anyway it's an easy fix you can do it. :)
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Thu Apr 28, 2005 7:56 pm
Yes, I am using 18.04. version. It has compiled now, cool!
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8661
  • Location: Paris, France
Reply with quote
Post Posted: Thu Apr 28, 2005 8:01 pm
Belegdol wrote
Yes, I am using 18.04. version. It has compiled now, cool!

Congratulation!! :)
Now, does it runs?
I'll update the source package with some fixes. But there's still the *.asm and the seal<->audio thing that requires manual intervention or be figured out properly.
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 50
  • Location: Poland
Reply with quote
Post Posted: Thu Apr 28, 2005 8:11 pm
It runs perfect, the sound works (I've experienced some problems on Mandrake and mekanix). THank you for help.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!