The typically unresolved $ UNIX2003 symbol means that you are communicating with an older SDK than the one with which the existing object files were created .
One strange look includes the path to me and please note that I am only vaguely familiar with the development of Mac and not at all with the development of the iPhone, this is the way
/Developer/Platforms/iPhoneOS.platform/Developer/usr/include
which is not actually in the SDK folder. Is it possible that you took rogue symbols, if any, from there? It seems unlikely since this happens later on the command line than the SDK includes paths.
Perhaps the characters are the expected versions of _fwrite and _strerror , and therefore gpg_error-gpg-error.o and libgpg-error.a are fine, and this is really a binding problem, although again unlikely, since you have
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib
as the -L option. I assume there is somewhere a libsystem dylib?
I assume the first thing to do is to check if the version of the UNIX2003 symbol is what you expect or not. I guess this is so, but as I said, I may be completely wrong. :)
Secondly, you can try to get verbose output from ld to see where it finds the characters. I'm sure there is an environment variable that you can set to make this happen, but I don't see any directions on the user manual page for ld . ( Update : two env variables: LD_TRACE_ARCHIVES and LD_TRACE_DYLIBS , but maybe they give the same thing as -t?).
Edit:
OK, so I was completely wrong with the UNIX2003 characters that were needed. lol.
When you built the libgpg error, I think it created the file
SRC / .deps / gpg_error-GPG-error.Po
which contains header dependencies (at least that was on my Linux system). This can give an idea of where he got the wrong header when creating gpg_error-gpg-error.o.
By the way, it looks like the libgpg-error script configuration accepts the -isysroot and -arch . Can you use them instead of your own version of configure script?
Edit2:
Ok, let’s go again :) Here are some things to try, starting with a clean source folder:
- use -isysroot instead of --sysroot
- use -isysroot as well as --sysroot
- temporarily make your regular system headers inaccessible, for example, renaming the folder. We hope that the assembly will fall if it does not find the header, and it will tell you for sure.