Hi All,
iPhone Advanced, adding a library to the generated XCode project causes a SIGBUS.
We have a lipsync library, with full source code. If i drop all the code into the Unity generated XCode project, it works fine. When I try to build the lipsync library as a static (.a) file and include it in the build (instead of source), the Iphone generates a SIGBUS error during load.
I’ve tinkered with build settings on the library to a significant degree. Basically, matching all the compiler settings between the library and the project. It links successfully, but then fails to load.
I’m wondering if anyone has had any success (or problems) using external (.a) files.
Obviously, there could be a million things. The good news is that i have control over both sets of source codes.
Are there any tricks or discoveries of others? Tilting at windmills, right now.
Regards,
Mark
Update!
I never could get the .a file to run without SIGBUS on startup. BUT I was able to do it by linking to the .o file from the library.
I changed XCode project settings:
Mach-O Type: Relocatable Object File
After build, there is a file located here:
build-Release-iphoneos\XXXX_iphone.build\Objects-normal\XXX.a-armv6-master.o
Adding the .o file to the unity project and remove the .a and PRESTO, no link problems, no SIGBUS.
Thought it might be useful to others.
The library is built with thumb.
Since Unity 1.6 thats no longer supported, you must have a non-thumb library if you want to use them.
There are several threads on the matter, most of them started straight after the 1.6 release.
I had Thumb turned off in the libraries XCode project.
does unity sigbus in the function where the engine is initialized and you don’t get any other meaningfull information?
It seems so, yes. but honestly, someone with experience could do a better job of debugging the issue at runtime. I’m an experienced programmer, but a newbie to the platform.
I had read the threads about THUMB, etc. This forum is extremely helpful… for this case, the recommendations didn’t help. i switched from the .a to the .o, it worked great. Weird? Yes!!