[MINC-users] compiling dyld, 32, 64?
Jon Erik Ween
jween at klaru-baycrest.on.ca
Wed May 20 09:30:56 EDT 2009
Hello friends
Sorry to be dense about this, but I can't figure out how to get the
config scripts on 64 bit Mac OS (10.5) to work out right, leading to
"wrong architecture" problems no matter what I do. I'm not a
programmer, so a lot of this stuff is above my head, but it seems to
me that things will tend to compile at default values, or occasionally
they way I want, but because it's not always predictable how things
go, incompatibilities ensue and building later packages then fail.
So, my configuration line is:
./configure --with-build-path=/usr/local/src --prefix=/usr/local
CFLAGS="-O2 -arch x86_64 -m64" CXXFLAGS="-O2 -arch x86_64 -m64"
CPPFLAGS="-O2 -arch x86_64 -m64" LDFLAGSS="-O2 -arch x86_64 -m64" FC=""
(I gave up on getting the fortran interfaces to work, not sure I need
it).
All package sources are in individual folders in /usr/local/src
I built netcdf-3.6.3 without problems
minc-1.5 without problems
bicpl-1.4.6 "can't find required" minc, config.log states "wrong
architecture", so it's not picking up on the right configuration, as
seems the case from the beginning of config.log (snippet below)
I tried Dale's hack on LIBTOOL (not sure what this does, but I got no
complaint):
> perl -pi -e 's/-fno-builtin/-arch x86_64 -fno-builtin/g' libtool
> perl -pi -e 's/-dynamiclib/-dynamiclib -arch x86_64/g' libtool
did not help. I've not messed with hdf since, or the time being, I've
given up minc-2
I'd appreciate any suggestions!!
Cheers
Jon
bicpl-1.4.6/config.log snippet:
byte 2244This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --with-build-path=/usr/local/src --prefix=/usr/local
CFLAGS=-O2 -arch x86_64 -m64 CXXFLAGS=-O2 -arch x86_64 -m64 CPPFLAGS=-
O2 -arch x86_64 -m64 LDFLAGSS=-O2 -arch x86_64 -m64 FC=
## --------- ##
## Platform. ##
## --------- ##
hostname = jween-3.local
uname -m = i386
uname -r = 9.6.0
uname -s = Darwin
uname -v = Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008;
root:xnu-1228.9.59~1/RELEASE_I386
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = Mach kernel version:
Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008;
root:xnu-1228.9.59~1/RELEASE_I386
Kernel configured for up to 8 processors.
8 processors are physically available.
8 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 10.00 gigabytes
Default processor set: 92 tasks, 459 threads, 8 processors
Load average: 0.48, Mach factor: 7.50
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/mni/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/local/fsl/bin
PATH: /usr/local/Slicer3/bin
PATH: /usr/local/afni
PATH: /usr/local/dicom/bin
PATH: /usr/local/mysql/bin
PATH: /usr/X11/bin
PATH: /usr/X11/bin
On 6-Mar-09, at 1:46 PM, Dale Einarson wrote:
> 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
>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
More information about the MINC-users
mailing list