Opened 4 years ago

#5687 new defect

ActorEditor on FreebSD linking to libAtlasUI.so with relative path

Reported by: Guido Falsi Owned by:
Priority: Should Have Milestone: Backlog
Component: Atlas editor Keywords:
Cc: Patch:

Description

On FreeBSD, compiling using the port I get this error:

> ActorEditor 
ld-elf.so.1: Cannot open "../../../binaries/system/libAtlasUI.so"

This happens because the build system is linking it using a path relative to the build directories:

c++ -o "../../../binaries/system/ActorEditor" obj/ActorEditor_Release/ActorEditor.o    -fstack-protector-strong  -L../../../binaries/system -L/usr/local/lib -Wl,--no-undefined -Wl,--as-needed -Wl,-z,relro -Wl,-rpath,/usr/local/lib/0ad  ../../../binaries/system/libAtlasObject.a ../../../binaries/system/libAtlasUI.so

this produces the following binary:

> ldd /usr/local/bin/ActorEditor
/usr/local/bin/ActorEditor:
    ../../../binaries/system/libAtlasUI.so (0)
    libc.so.7 => /lib/libc.so.7 (0x800243000)

But once installed in the actual system (by default in PREFIX/bin) it can't locate the library anymore (it end installed in PREFIX/lib/0ad/libAtlasUI.so).

I've not found a way to tell the build system to link it to the library so that the dynamic linker can find it.

The main pyrogenesis binary is correctly linked:

> ldd /usr/local/bin/pyrogenesis | grep 0ad
    libSDL2-2.0.so.0 => /usr/local/lib/libSDL2-2.0.so.0 (0x800ad4000)
    libmozjs38-ps-release.so => /usr/local/lib/0ad/libmozjs38-ps-release.so (0x800c6e000)
    libnvtt.so => /usr/local/lib/0ad/libnvtt.so (0x801ec5000)
    libnvimage.so => /usr/local/lib/0ad/libnvimage.so (0x80314d000)
    libnvmath.so => /usr/local/lib/0ad/libnvmath.so (0x803175000)
    libnvcore.so => /usr/local/lib/0ad/libnvcore.so (0x80317e000)

The port can be viewed here:

https://svnweb.freebsd.org/ports/head/games/0ad/

if needed I can post full build logs.

Change History (0)

Note: See TracTickets for help on using tickets.