bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC]: Darwin framework patch


From: Adam Fedor
Subject: [RFC]: Darwin framework patch
Date: Thu, 14 Apr 2005 11:04:23 -0600

On Mac OS X/darwin, I get this error when I start ProjectCenter:

openapp ProjectCenter.debug
dyld: /usr/GNUstep/System/Applications/ProjectCenter.debug/ProjectCenter can't open library: ProjectCenter.framework/ProjectCenter (No such file or directory, errno = 2)
Trace/BPT trap

A very simple fix for this is to actually create the top-level symlink on darwin and not just with the apple combo:

Index: Instance/framework.make
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/make/Instance/framework.make,v
retrieving revision 1.62
diff -u -r1.62 framework.make
--- Instance/framework.make     6 Apr 2005 12:02:17 -0000       1.62
+++ Instance/framework.make     14 Apr 2005 16:34:14 -0000
@@ -385,7 +385,7 @@
$(ECHO_COMPILING)$(CC) $< -c $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -o $@$(END_ECHO)
 endif

-ifeq ($(FOUNDATION_LIB), apple)
+ifeq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
 # When building native frameworks on Apple, we need to create a
 # top-level symlink xxx.framework/xxx ---> the framework shared
 # library

============

I think there has been some discussion of this and 'true' framework support on darwin before. There's a rambling statement in ld_lib_path.sh about how the darwin linker is misbehaving, but really it is our fault. When we link the framework (target.make:310) we set the install_name to the framework name, and dyld is smart to look for the library under that name rather than the actual link name (but only if DYLD_FRAMEWORK_PATH is set, of course, will it find it).

Two alternative solutions to avoid this dilemma would be to:

1. set the install_name to lib$(GNUSTEP_INSTANCE), so that it works like all other platforms 2. set the install_name to the absolute path to the framework (this is how Apple does it, but we don't necessarily know until install time where that is).

Well, in the mean time, perhaps I'll just apply this patch. It doesn't change any behavior, it just makes the current (perhaps in some people's opinion, broken) behavior work.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]