Using the cross test code I no longer get that error message. I get others but those may be related to my cross compile build environment.
Can you give a try on:
I think this last one is a more appropriate fix.
Regarding to the other problems that you are facing while cross-compiling, if you want to share... not sure if I can help, but I can try.
Felipe "Zimmerle" Costa
Security Researcher, SpiderLabs
Trustwave | SMART SECURITY ON DEMAND