Opened 13 years ago
Closed 12 years ago
#1004 closed defect (fixed)
[PATCH] ActorEditor fails to load libAtlasUI at runtime
Reported by: | Yves | Owned by: | Yves |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 8 |
Component: | Non-game systems | Keywords: | |
Cc: | Yves | Patch: |
Description
Description
Running ActorEditor, ArchiveViewer or FileConverter return this error on Linux/Mac systems when build with the generated makefiles or XCode:
Linux:
./ArchiveViewer: error while loading shared libraries: ../../../binaries/system/libAtlasUI.so: cannot open shared object file: No such file or directory
Mac:
dyld: Library not loaded: ../../../binaries/system/libAtlasUI.dylib Referenced from: /Users/[User]/Projects/0ad/binaries/system/./ActorEditor Reason: image not found Trace/BPT trap
Running "objdump -p ActorEditor | grep AtlasUI" on Linux returns
NEEDED ../../../binaries/system/libAtlasUI.so
This relative path is wrong when the binary is in binaries/system. Removing the path from LDDEPS in the makefile or replacing it by a correct one solves the problem on Linux.
On OSX for both the makefiles and Xcode, there's an additional -install_name option required for linking libAtlasUI.
PATCH:
I've created a patch to only add static library projects to LDDEPS in makefiles. Unfortunately I'm not sure if I fully understand the reason why some libraries are added with the -l flag and also with a full relative path as LDDEPS. Premake only does this with Projects defined in its scripts as "StaticLib" or "SharedLib" and not for external libraries. I've tried replacing "links" with "linkoptions" only for the action "gmake", but it doesn't work because build-order-dependencies get lost this way. The advantage of my solution is that it won't change anything for the other platforms (e.g. Visual Studio).
For the Mac I've added an install_name option. It's probably not a very clean solution like I did it, but I didn't want to change too much and risk other bugs just to fix this one.
Question:
What is ColourTester? It has the same problem but I couldn't find any sources or buildscripts for it.
Attachments (1)
Change History (7)
by , 13 years ago
Attachment: | ActorEditor_Ticket_1004_v1.patch added |
---|
comment:1 by , 13 years ago
comment:2 by , 12 years ago
This seems to work fine for me on Linux, and your explanation of the change sounds reasonable - it shouldn't matter too much if it's a bit unclean as long as it works for us. I presume you can commit it yourself now?
follow-up: 5 comment:4 by , 12 years ago
I'm sorry I had to work this weekend and I'm too tired to do it now. I think it's better If I take the time and do it properly later. There could be problems when committing this patch directly because scripts.c gets auto-generated by premake and I've already committed another patch after I've made this one and need to combine the changes in scripts.c correctly (by applying the changes to all other files and then running "premake4 embed").
comment:5 by , 12 years ago
Keywords: | review removed |
---|
Replying to Yves:
No problem :) Think you'll be able to apply the patch this weekend? If not, it should probably wait until Alpha 9, since feature freeze is on the 18th.
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [10749]) Solves/Works around some linking problems for ActorEditor, ArchiveViewer and FileConverter. Closes #1004
Replying to Yves:
It was an old unused tool which got removed from SVN.