Re: still having problems with cross development
Re: still having problems with cross development
- Subject: Re: still having problems with cross development
- From: Monroe Williams <email@hidden>
- Date: Tue, 28 Oct 2003 20:29:32 -0800
On Oct 27, 2003, at 9:45 PM, Chris Espinosa wrote:
On Monday, October 27, 2003, at 07:01 PM, joshua portway wrote:
So - I've been spending the last couple of days desperately trying to
get the build to work. Now my target SDKs are all set to 10.2 and my
deployment targets are all set to 10.2. I've worked around what
appears to be a bug in the SDKs, where if you use the OpenGL
framework it won't link because XCode attempts to link against dylibs
that aren't there (I worked around it by copying the dylibs into the
10.2 sdk from a jaguar install).
Yes, the OpenGL community has a separate dynamic loading/versioning
scheme that's common to all OpenGL implementations, but very different
from the way other Mac OS X frameworks do it. The OpenGL sample code
has some examples of how to deal with different versions of OpenGL:
basically you build your own jump table and indirect through it for
every call.
I believe I've seen the mechanism you're talking about, and I don't
think it explains the issue Joshua is referring to. I just got far
enough to run into this myself. (I'm still not sure what I did to
solve the earlier problems I was having, but that's another issue.)
When I set up to use the 10.2.7 SDK with OpenGL.framework to the
project, my link step fails with:
ld: warning can't open dynamic library:
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework/Versions/A/Libraries/libGL.dylib (checking for
undefined symbols may be affected) (No such file or directory, errno =
2)
ld: warning prebinding disabled because dependent library:
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework/Versions/A/Libraries/libGL.dylib can't be searched
ld: warning can't open dynamic library:
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework/Versions/A/Libraries/libGLU.dylib (checking for
undefined symbols may be affected) (No such file or directory, errno =
2)
ld: warning suggest use of -bind_at_load, as lazy binding may result in
errors or different symbols being used
symbol _crypt used from dynamic library
/Developer/SDKs/MacOSX10.2.7.sdk/usr/lib/libSystem.dylib(crypt.So) not
from earlier dynamic library /usr/lib/libcrypto.0.9.dylib(fcrypt.o)
ld: Undefined symbols:
_glGetDoublev
_glGetFloatv
_glGetIntegerv
_glLoadIdentity
_glLoadMatrixf
_glMatrixMode
_glMultMatrixf
_glRotatef
...
and many, many more.
The problem could be that OpenGL.Framework/Versions/A/Libraries doesn't
exist in the SDK:
-----
$ ls -lR
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework/
total 8
lrwxr-xr-x 1 root admin 24 22 Oct 19:49 Headers ->
Versions/Current/Headers
lrwxr-xr-x 1 root admin 23 22 Oct 19:49 OpenGL ->
Versions/Current/OpenGL
drwxrwxr-x 4 root admin 136 5 Sep 16:35 Versions
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework//Versions:
total 4
drwxrwxr-x 4 root admin 136 5 Sep 16:35 A
lrwxr-xr-x 1 root admin 1 22 Oct 19:49 Current -> A
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework//Versions/A:
total 12
drwxrwxr-x 16 root admin 544 6 Aug 00:32 Headers
-rwxrwxr-x 1 root admin 11412 5 Sep 16:35 OpenGL
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework//Versions/A/Headers:
total 408
-rw-rw-r-- 1 root admin 567 30 May 14:11 CGLContext.h
-rw-rw-r-- 1 root admin 390 30 May 14:11 CGLCurrent.h
-rw-rw-r-- 1 root admin 70472 30 May 14:11 CGLMacro.h
-rw-rw-r-- 1 root admin 2539 14 Jul 2002 CGLProfiler.h
-rw-rw-r-- 1 root admin 606 30 May 14:11 CGLRenderers.h
-rw-rw-r-- 1 root admin 10445 30 May 14:11 CGLTypes.h
-rw-rw-r-- 1 root admin 2607 30 May 14:11 OpenGL.h
-rw-rw-r-- 1 root admin 88876 30 May 14:11 gl.h
-rw-rw-r-- 1 root admin 139430 30 May 14:11 glext.h
-rw-rw-r-- 1 root admin 294 30 May 14:11 gliContext.h
-rw-rw-r-- 1 root admin 47592 30 May 14:11 gliDispatch.h
-rw-rw-r-- 1 root admin 16259 30 May 14:11 glu.h
-rw-rw-r-- 1 root admin 2597 30 May 14:11 gluContext.h
-rw-rw-r-- 1 root admin 2242 30 May 14:11 gluMacro.h
$
-----
but I think there may be something else going on. The framework binary
seems to reference the libraries in the non-SDK locations:
-----
$ otool -L
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework/OpenGL
/Developer/SDKs/MacOSX10.2.7.sdk/System/Library/Frameworks/
OpenGL.framework/OpenGL:
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/
ApplicationServices (compatibility version 1.0.0, current version
18.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
(compatibility version 1.0.0, current version 120.4.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/
CoreFoundation (compatibility version 150.0.0, current version 263.5.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/
libGLU.dylib (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/
libGL.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 63.2.0)
$
-----
which hints that perhaps this is how it's supposed to be set up. Is
there some project setting we're supposed to tweak so that the linker
doesn't look in the SDK tree for these particular libraries?
I've tried dropping the OpenGL.framework from a 10.2.8 install into my
SDK tree, and that allows me to build and run on 10.3, but I crash in
glTexImage2D on 10.2. It's far from optimal to have everyone who wants
to build this code hack up their development environment like that, and
I suspect it's not the right answer anyway.
As has been said before, "help me obi-wan", etc, etc...
Thanks,
-- monroe
------------------------------------------------------------------------
Monroe Williams email@hidden
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.