can't cross-compile graphviz

 
I'm trying to build graphviz 2.28.0 for iOS. The simulator build works fine since I'm building for the x86 processor still, but when I try to build for armv7 it fails in this way:
./mkdefs gdefs.h < ../../lib/gvpr/gprdata
/bin/sh: ./mkdefs: Bad CPU type in executable
make[3]: *** [gdefs.h] Error 126
It looks like the build script is trying to run ./mkdefs which fails since it's now built for armv7 instead of x86 (or x86-64). It sounds the same as this previous problem:
https://mailman.research.att.com/pipermail/graphviz-devel/2005/000104.html
but I can't get the workaround to work.
Is there a fix or a workaround for this?

can't cross-compile graphviz

The source package comes with gdefs.h already made. The only reason for make to try to build it again is if gprdata or mkdefs is newer than the current copy of gdefs.h. So you just need to run
 
    touch gdefs.h
 
to update the timestamp of gdefs.h, and then run make again.

can't cross-compile graphviz

I'm building for two different architectures (i386 and armv7) and them lipo-ing them together.  I got this to work by:
1. running the native (i386) configure/make first
2. copy needed libraries and gdefs.h elsewhere
3. make distclean
4. copy gdefs.h back to the correct folder
5. configure/make armv7 (this fails)
6.  Touch gdefs.h
7. Run make again (runs it for armv7)
8. lipo libraries from step 2 and step 7 together
 
Thanks for the help!

Recent comments