Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows version with XMP cannot be compiled as a static linked binary #32

Open
sago007 opened this issue Dec 30, 2016 · 0 comments
Open

Comments

@sago007
Copy link
Member

sago007 commented Dec 30, 2016

Currently the Windows nightly builds (http://openarena.ws/board/index.php?topic=5263.0) are compiled without XMP support.

The nightly build are compiled with static linking in an MXE environment.

I have constructed a Docker image with a static version of libxmp-lite but I get the following linker errors:

LD build/release-mingw32-x86/openarena.x86.exe
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x19fb): undefined reference to `_imp__xmp_get_frame_info'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1a11): undefined reference to `_imp__xmp_get_module_info'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1a5d): undefined reference to `_imp__xmp_play_buffer'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1ce5): undefined reference to `_imp__xmp_end_player'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1cf3): undefined reference to `_imp__xmp_release_module'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x1d01): undefined reference to `_imp__xmp_free_context'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x234a): undefined reference to `_imp__xmp_create_context'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x2364): undefined reference to `_imp__xmp_load_module_from_memory'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x242b): undefined reference to `_imp__xmp_start_player'
/tmp/ccX69R76.ltrans4.ltrans.o:<artificial>:(.text+0x2445): undefined reference to `_imp__xmp_get_module_info'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(control.o): In function `xmp_free_context':
/tmp/libxmp-lite-4.4.1/src/control.c:57: undefined reference to `_imp__xmp_release_module'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(load.o): In function `xmp_release_module':
/tmp/libxmp-lite-4.4.1/src/load.c:604: undefined reference to `_imp__xmp_end_player'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(format.o): In function `format_list':
/tmp/libxmp-lite-4.4.1/src/format.c:62: undefined reference to `xm_loader'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(format.o):format.c:(.rdata+0x0): undefined reference to `xm_loader'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(format.o):format.c:(.rdata+0x8): undefined reference to `it_loader'
/usr/lib/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/../../../../i686-w64-mingw32.static/lib/../lib/libxmp.a(format.o):format.c:(.rdata+0xc): undefined reference to `s3m_loader'
collect2: error: ld returned 1 exit status

As far as I can see the "imp_" means that the binary expect to be linked against a DLL instead.

The solution likely involves a strategic placed "#define" somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant