#55667 closed update (fixed)
mame: Update version + minor linking fix for mame
| Reported by: | somebody-237654 | Owned by: | mf2k (Frank Schima) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | haspatch | Cc: | |
| Port: | mame |
Description
I recently tried to install the mame port (mame version 0.189) and received a checksum error. I noticed that a new version of mame was available (0.193), so it made sense to me to update the mame port to the latest version. I tested my updated port file and the build failed with a linking error (see below).
I investigated, and found that including command-line directives to the linker to explicitly link with the SLD2 library, "-L${prefix}/lib -lSDL2", resolved the building issue.
The attached port file:
1 - Updates to the newest version of mame (0.193)
2 - Updates the checksums
3 - Includes the required linker directive in build.args-append
Please Note!
I an new to macports, and I don't know if there is a "right" way to include a linking directive in a port. I implore somebody with more experience to look over my little change and tweak it as necessary to conform to the macports way of doing things. Thanks!
Log of Failed Build:
...
Compiling src/devices/cpu/mcs96/i8xc196.cpp...
Compiling src/devices/cpu/mcs96/mcs96.cpp...
Compiling src/devices/machine/ie15.cpp...
Archiving liboptional.a...
Compiling src/mame/mame.cpp...
Compiling generated/version.cpp...
Building driver list...
Emitting mame-Info.plist...
34845 driver(s) found
Compiling generated/mame/mame/drivlist.cpp...
Linking mame64...
Undefined symbols for architecture x86_64:
"_SDL_CloseAudio", referenced from:
sound_sdl::exit() in libosd_sdl.a(sdl_sound.o)
"_SDL_CreateRenderer", referenced from:
renderer_sdl1::create() in libosd_sdl.a(drawsdl.o)
renderer_sdl2::create() in libosd_sdl.a(draw13.o)
"_SDL_CreateTexture", referenced from:
renderer_sdl1::setup_texture(osd_dim const&) in libosd_sdl.a(drawsdl.o)
renderer_sdl2::RendererSupportsFormat(unsigned int, unsigned int, char const*) in libosd_sdl.a(draw13.o)
texture_info::texture_info(renderer_sdl2*, render_texinfo const&, quad_setup_data const&, unsigned int) in libosd_sdl.a(draw13.o)
[...]
"_SDL_UnlockTexture", referenced from:
renderer_sdl1::draw(int) in libosd_sdl.a(drawsdl.o)
texture_info::set_data(render_texinfo const&, unsigned int) in libosd_sdl.a(draw13.o)
"_SDL_UpdateTexture", referenced from:
texture_info::set_data(render_texinfo const&, unsigned int) in libosd_sdl.a(draw13.o)
"_SDL_WarpMouseInWindow", referenced from:
sdl_window_info::complete_create() in libosd_sdl.a(window.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../../../mame64] Error 1
make[1]: *** [mame] Error 2
make: *** [macosx_x64_clang] Error 2
make: Leaving directory `/opt/local/var/macports/build/_Users_william_tmp_mame/mame/work/mame-mame0193'
Command failed: cd "/opt/local/var/macports/build/_Users_william_tmp_mame/mame/work/mame-mame0193" && /usr/bin/make -j8 -w all CC=/usr/bin/clang CXX=/usr/bin/clang++ USE_LIBSDL=1 SDL_FRAMEWORK_PATH="-I/opt/local/include/SDL2 -D_THREAD_SAFE -L/opt/local/lib -lSDL2" USE_SYSTEM_LIB_EXPAT=1 USE_SYSTEM_LIB_FLAC=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_LUA=1 USE_SYSTEM_LIB_PORTAUDIO=1 USE_SYSTEM_LIB_PORTMIDI=1 USE_SYSTEM_LIB_SQLITE3=1 USE_SYSTEM_LIB_UTF8PROC=1 USE_SYSTEM_LIB_ZLIB=1
Exit code: 2
Error: Failed to build mame: command execution failed
Error: See /opt/local/var/macports/logs/_Users_william_tmp_mame/mame/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port mame failed
Attachments (1)
Change History (4)
Changed 9 years ago by somebody-237654
| Attachment: | update-mame-version.diff added |
|---|
comment:1 Changed 9 years ago by mf2k (Frank Schima)
| Keywords: | haspatch added; mame libsdl2 sdl2 removed |
|---|---|
| Summary: | Update version + minor linking fix for mame → mame: Update version + minor linking fix for mame |
comment:2 Changed 9 years ago by mf2k (Frank Schima)
| Owner: | set to mf2k |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
comment:3 Changed 9 years ago by jmroot (Joshua Root)
Should probably file a bug with upstream if it's not figuring out those link flags by itself.

Diff of Portfile