Re: Crash in code linked with ld64 but not if linked with ld_classic
Re: Crash in code linked with ld64 but not if linked with ld_classic
- Subject: Re: Crash in code linked with ld64 but not if linked with ld_classic
- From: Andrew Kimpton <email@hidden>
- Date: Wed, 7 Nov 2007 10:32:22 -0500
On Nov 6, 2007, at 10:29 PM, Andrew Kimpton wrote:
The opensource handbrake project (http://handbrake.m0k.org) project
crashes if the app is linked on Leopard/Xcode 3 with the ld64 linker :
Thread 17 Crashed:
0 org.m0k.handbrake 0x0035ad9b
x264_pixel_satd_8x8_sse2 + 682
(I've cut the log down considerably - Handbrake creates a lot of
threads !)
The code in question originates with the VLC X264 project (libx264)
and is crafted assembly code - the code is working fine if the app
is built/linked with either Xcode 2.4 or Xcode 2.5
The actual link line used is :
/Developer/usr/bin/g++-4.0 -o /Development/hdhr/HandBrake/macosx/
build/HandBrake.build/UB/HandBrakeCLI.build/Objects-normal/i386/
HandBrakeCLI -L.. -F.. -filelist /Development/hdhr/HandBrake/macosx/
build/HandBrake.build/UB/HandBrakeCLI.build/Objects-normal/i386/
HandBrakeCLI.LinkFileList -arch i386 -mmacosx-version-min=10.3 ../
libhb/libhb.a ../contrib/lib/libmp4v2.a ../contrib/lib/liba52.a ../
contrib/lib/libavformat.a ../contrib/lib/libavcodec.a ../contrib/lib/
libavutil.a ../contrib/lib/libdvdread.a ../contrib/lib/
libdvdcss.a ../contrib/lib/libfaac.a ../contrib/lib/libmp3lame.a ../
contrib/lib/libmpeg2.a ../contrib/lib/libvorbis.a ../contrib/lib/
libvorbisenc.a ../contrib/lib/libogg.a ../contrib/lib/
libsamplerate.a ../contrib/lib/libx264.a ../contrib/lib/
libxvidcore.a -lz ../contrib/lib/libdca.a ../contrib/lib/libmkv.a ../
contrib/lib/libswscale.a -isysroot /Developer/SDKs/MacOSX10.4u.sdk
It looks like the use of -read_only_relocs suppress is the problem
here - it's not present on the displayed command line in the build
output but it is specified in the project settings.
I'll file a couple of bugs :
a) I think the flag should work 8-)
b) If the flag isn't going to work it shouldn't be so silently ignored
by ld64/Xcode 3
In the meantime building Handbrake with Xcode 2.5 is probably fine (it
needs to maintain Tiger compatibility anyways), and for my more
specific needs I can use a dylib built from Handbrake with Xcode 2.5
in my Leopard only Xcode 3 project - that seems to work fine.
Andrew 8-)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden