Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2655 closed defect (fixed)

[PATCH] ActorEditor, regardless of configuration, always links against Release libAtlasUI.dylib

Reported by: Echelon9 Owned by: Echelon9
Priority: Should Have Milestone: Alpha 17
Component: Build & Packages Keywords:
Cc: Patch:

Description

See output below from Mac otools when inspecting binaries/system/ActorEditor_dbg:

$ otool -L binaries/system/ActorEditor_dbg 
binaries/system/ActorEditor_dbg:
	@executable_path/libAtlasUI.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

Note that it is linked against libAtlasUI.dylib, not libAtlasUI_dbg.dylib.

ActorEditor is unable to open on Mac in the Debug configuration, without this fix.

Attachments (1)

fix-trac-2655-premake_macosx.patch (1.1 KB ) - added by Echelon9 10 years ago.
Fix for premake sharedlib link issues on Mac OS X

Download all attachments as: .zip

Change History (7)

comment:1 by Echelon9, 10 years ago

I made an attempted fix by editing the premake4.lua script as follows. In essence, this was based on precedent within the same file for different Debug and Release configuration link settings.

Index: build/premake/premake4.lua
===================================================================
--- build/premake/premake4.lua	(revision 15464)
+++ build/premake/premake4.lua	(working copy)
@@ -1169,7 +1169,11 @@
 		links { "AtlasObject" }
 	end
 
-	links { "AtlasUI" }
+	configuration "Debug"
+		links { "AtlasUI_dbg" }
+	configuration "Release"
+		links { "AtlasUI" }
+	configuration { }
 
 end

Unfortunately, with this edit, ./clean-workspaces plus ./update-workspaces and a new make build the same linking error occurs.

by Echelon9, 10 years ago

Fix for premake sharedlib link issues on Mac OS X

comment:2 by Echelon9, 10 years ago

Scratch that rather silly early attempt at fixing the issue.

Have gone to read the premake docs, and the issue is in the deliberate install_name command invocation, as premake does not yet fully support that option natively on OS X.

Revised patch attached, which I've confirmed resolves the linking problems with Debug configuration on Mac.

With the patch:

$ otool -L ActorEditor_dbg 
ActorEditor_dbg:
	@executable_path/libAtlasUI_dbg.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

./ActorEditor_dbg also runs properly.

comment:3 by Echelon9, 10 years ago

Component: Core engineBuild & Packages
Keywords: review patch added
Owner: set to Echelon9
Status: newassigned
Summary: ActorEditor, regardless of configuration, always links against Release libAtlasUI.dylib[PATCH] ActorEditor, regardless of configuration, always links against Release libAtlasUI.dylib

comment:4 by Josh, 10 years ago

Keywords: reviewed added; review removed

Looks good. It will be committed later today.

comment:5 by JoshuaJB, 10 years ago

Resolution: fixed
Status: assignedclosed

In 15608:

Link actor editor built in debug mode to debug version of atlasUI. Fixes #2655. Patch by Echelon9.

comment:6 by Josh, 10 years ago

Keywords: reviewed patch removed

Thanks for the patch.

Note: See TracTickets for help on using tickets.