DSDK on Mac: Architecture Problems

For discussion of LizardTech's free Decode SDK for MrSID and JPEG 2000.

Moderator: jskiffington

DSDK on Mac: Architecture Problems

Postby kshehata » Mon Mar 08, 2010 2:50 pm

Hi there,

I'm just getting started using the GeoExpress DSDK to add SID view capabilities to our Java app. My platform is Mac OS X 10.6 (Snow Leopard). The example sources don't build correctly, and so far as I can tell the library file as given doesn't actually include any architecture info - necessary for it to be "universal". Any ideas as to what's going on here?

The command lipo tells me that it can't find any arch info:

[code]
kshehata-macbookpro:JavaMaps kshehata$ lipo -info lib/libltidsdk.a
lipo: archive with no architecture specification: lib/libltidsdk.a (can't determine architecture for it)
[/code]
kshehata
 
Posts: 14
Joined: Mon Mar 08, 2010 2:44 pm

Output from making examples

Postby kshehata » Mon Mar 08, 2010 2:52 pm

On paste bin:
h_t_t_p://pastebin.com/Z4vMpv7R
kshehata
 
Posts: 14
Joined: Mon Mar 08, 2010 2:44 pm

Postby gat » Mon Mar 08, 2010 3:01 pm

The DSDK is only supported and tested on 10.4 (32 bits only) and 10.5 (32 and 64 bits).

I'm not sure why your lipo command is not returning anything. it works for me just fine.

The 'file' command on the library shows:

file Geo_DSDK-7.0.0.2167/lib/Release/libltidsdk.a
Geo_DSDK-7.0.0.2167/lib/Release/libltidsdk.a: Mach-O universal binary with 4 architectures
Geo_DSDK-7.0.0.2167/lib/Release/libltidsdk.a (for architecture i386): current ar archive
Geo_DSDK-7.0.0.2167/lib/Release/libltidsdk.a (for architecture ppc7400): current ar archive
Geo_DSDK-7.0.0.2167/lib/Release/libltidsdk.a (for architecture x86_64): current ar archive
Geo_DSDK-7.0.0.2167/lib/Release/libltidsdk.a (for architecture ppc64): current ar archive

and lipo -info
lipo -info Geo_DSDK-7.0.0.2167/lib/Release/libltidsdk.a

Architectures in the fat file: Geo_DSDK-7.0.0.2167/lib/Release/libltidsdk.a are:
i386 ppc7400 x86_64 ppc64

You may be able to get the examples to compile by setting the following environment variable:

export MACOSX_DEPLOYMENT_TARGET=10.5

Again though, this is not a supported OS.

Thanks.
gat
 
Posts: 28
Joined: Mon Jan 12, 2009 12:41 pm

Postby kshehata » Mon Mar 08, 2010 3:45 pm

I've managed to get the examples to build by changing the makefile as per the patch below. I still can't get my project to build, as the linker complains about undefined symbols after reporting:
ld: warning: in /Users/kshehata/Work/src/gamma/MCS/JavaMaps/lib/libltidsdk.a, file is not of required architecture


--- makefile.org 2010-03-08 16:05:14.000000000 -0500
+++ makefile 2010-03-08 16:39:43.000000000 -0500
@@ -27,8 +27,8 @@
../../3rd-party/lib/Release/libgdal.a

# you may have to customize this path for your machine:
-USYSROOT = /Developer/SDKs/MacOSX10.5.sdk
-OS_CXX_FLAGS = -fPIC -O3 -DLT_OS_DARWIN8 -arch ppc -arch i386 -arch ppc64 -arch x86_64 -isysroot $(USYSROOT) -F$(USYSROOT)/System/Library/Frameworks -D_BSD_WCHAR_T_DEFINED_
+USYSROOT = /Developer/SDKs/MacOSX10.6.sdk
+OS_CXX_FLAGS = -fPIC -O3 -DLT_OS_DARWIN8 -arch i386 -arch x86_64 -isysroot $(USYSROOT) -F$(USYSROOT)/System/Library/Frameworks -D_BSD_WCHAR_T_DEFINED_
OS_LD_FLAGS =

COMMON_CXX_FLAGS = $(DEBUG) -D_REENTRANT
kshehata
 
Posts: 14
Joined: Mon Mar 08, 2010 2:44 pm

Postby gat » Mon Mar 08, 2010 3:49 pm

Yes, our next release of the SDK will support 10.6
gat
 
Posts: 28
Joined: Mon Jan 12, 2009 12:41 pm

Postby kshehata » Mon Mar 08, 2010 4:26 pm

Ok, that was weird. My working copy must have gotten messed up. I just unpacked a fresh copy of the library, and now everything builds in my test app, and lipo reports all of the architectures.

Still can't build the examples for ppc, but I can do without that. The important part is that I should now be able to start some JNI development.

Thanks for your help!
kshehata
 
Posts: 14
Joined: Mon Mar 08, 2010 2:44 pm

Postby kshehata » Mon Mar 08, 2010 4:35 pm

BTW: Is there a plan for Snow Leopard support? It looks like it's mainly working, just a fresh build and tweaking some paths, and you're probably good to go.
kshehata
 
Posts: 14
Joined: Mon Mar 08, 2010 2:44 pm


Return to SDKs

Who is online

Users browsing this forum: No registered users and 1 guest