[MINC-users] compiling dyld, 32, 64?
Dale Einarson
dale at bic.mni.mcgill.ca
Fri Mar 6 13:46:00 EST 2009
Hello,
Forgive me for starting a new thread but the former seemed to be
a couple of separate issue.
I built all of he minc tool avail on packages for Mac but not
without a lot of pain. I wanted to mention stuff like HDF 1.6.6
getting CPPFLAGS in reverse order... and libtool not getting the "-
arch x86_64" arg to gcc, g++ ... Ignorantly, I had built my own
version of MINC because I kept getting "wrong architecture" errors
form lots of stuff I wanted to build... I now realize that libtool
doesn't know that you are trying to build x86_64(see ugly hack below).
Would anyone like to share some folklore in regards to building
on MacOS? Is there any way to get glibtool to know the *FLAGS from
your environment?
Sadly I have had to do such ugly hacks as,
HDF
perl -pi -e 's/-O2 -g x86_64 -arch/-g -O2 -arch x86_64/g' Makefile */
Makefile */*/Makefile */*/*/Makefile
LIBTOOL
perl -pi -e 's/-fno-builtin/-arch x86_64 -fno-builtin/g' libtool
perl -pi -e 's/-dynamiclib/-dynamiclib -arch x86_64/g' libtool
############################
Ricks demo got line wrapped so I have provided a line-wrap'able copy.
cat <<EOF>test.c
#include <stdio.h>;
int main(int argc, char *argv[]) {
fprintf(stdout,"%d\n",sizeof(void*));
return 0;
}
EOF
gcc -o test-64 -arch x86_64 test.c
gcc -o test-32 -arch i386 test.c
lipo -create test-64 test-32 -output test-fat
#
# an added toy, just in case you wanted to save bits ;}
#
arch -arch i386 ./test-fat
arch -arch x86_64 ./test-fat
Cheers!
dale
More information about the MINC-users
mailing list