Hi Gustavo comment are inline.
On Sun, Jun 26, 2011 at 1:36 AM, Gustavo Gutierrez <[email protected]> wrote: > > > 2011/6/24 stewart mackenzie <[email protected]> >> >> Hi Gustavo >> >> Yes I am experiencing problems, had a moment to get back to this build >> issue. >> >> Firstly if you change the linux x86_64_32 it will break my build on >> the linux box. Last i checked that is what worked, ill double check >> tomorrow evening. Didn't have time to check ill do it when I can. > > I will have a look at that, I will setup a linux machine and see what > happens. >> >> secondly im a mac virgin, everything you tell me about this walled >> garden is news to me. That universal application idea sounds quite >> sensible - if it worked. :) >> >> > Remember that on mac a library (*.dylib) can actually contain two (and >> > more) different versions of the same library. This is to make "universal >> > applications". At the end you will have 32 and 64 versions of the same >> > library in one file (AFAIK). >> >> I dont get issues regarding the GMP build on my x86_64 mac. > > Be careful here, did you build gmp by yourself?. In any case, can you give > me the output of the following command: > > lipo -info /wherever/libgmp.dylib stewarts-MacBook-Pro-15:mozart stewart$ lipo -info /usr/local/lib/libgmp.dylib Non-fat file: /usr/local/lib/libgmp.dylib is architecture: x86_64 I used brew to install this, it did the compilation for me, I will see how I can get brew to compile with 32 bit arch. > > >> I get this: >> stewarts-MacBook-Pro-15:build stewart$ ../mozart/configure >> --prefix=/Users/stewart/oz >> [...] > > You are configuring outside of the sources. While this is the preferable way > for most projects I remember a couple of time it did not work for me with > mozart. Another thing is that you have to tell the apple gcc compiler to > produce code for i386. To do this try: > > ./configure CXXFLAGS="-arch i386" CPPFLAGS="-arch i386" > > That will tell gcc to produce i386 code and libraries whenever the c or the > c++ compiler is used. stewarts-MacBook-Pro-15:mozart stewart$ gcc -v Using built-in specs. Target: i686-apple-darwin10 Configured with: /var/tmp/gcc/gcc-5666.3~123/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Apple Inc. build 5666) (dot 3) okay i ran the configure in the git repo to test this. stewarts-MacBook-Pro-15:mozart stewart$ ./configure CXXFLAGS="-arch i386" CPPFLAGS="-arch i386" configure: warning: CXXFLAGS=-arch i386: invalid host type configure: warning: CPPFLAGS=-arch i386: invalid host type configure: error: can only configure for one host and one target at a time I then followed the warning and did one of each which resulted in this for both of them: stewarts-MacBook-Pro-15:mozart stewart$ make dirs="platform share contrib doc"; \ for i in $dirs; do \ if (cd $i && make bootstrap); \ then true; \ else exit 1; \ fi; \ done dirs="dss emulator wish tools"; \ for i in $dirs; do \ if (cd $i && make bootstrap); \ then true; \ else exit 1; \ fi; \ done g++ -march=i386 -mtune=i386 -O3 -fomit-frame-pointer -funsigned-char -I. -I./include -Wdisabled-optimization -Wuninitialized -Wall -Wold-style-cast -Woverloaded-virtual -Wshadow -Wswitch -Wreturn-type -Wunused -fPIC -c -o base.o ./src/base.cc ./src/base.cc:1: error: CPU you selected does not support x86-64 instruction set ./src/base.cc:1: error: CPU you selected does not support x86-64 instruction set make[2]: *** [base.o] Error 1 make[1]: *** [bootstrap] Error 1 make: *** [bootstrap] Error 1 > > >> >> stewarts-MacBook-Pro-15:build stewart$ make >> dirs="platform share contrib doc"; \ >> for i in $dirs; do \ >> if (cd $i && make bootstrap); \ >> then true; \ >> else exit 1; \ >> fi; \ >> done >> dirs="dss emulator wish tools"; \ >> for i in $dirs; do \ >> if (cd $i && make bootstrap); \ >> then true; \ >> else exit 1; \ >> fi; \ >> done >> g++ -march=i386 -mtune=i386 -O3 -fomit-frame-pointer -funsigned-char >> -I. -I/Users/stewart/dev/mozart/mozart/platform/dss/include >> -Wdisabled-optimization -Wuninitialized -Wall -Wold-style-cast >> -Woverloaded-virtual -Wshadow -Wswitch -Wreturn-type -Wunused -fPIC >> -c -o base.o /Users/stewart/dev/mozart/mozart/platform/dss/src/base.cc >> /Users/stewart/dev/mozart/mozart/platform/dss/src/base.cc:1: error: >> CPU you selected does not support x86-64 instruction set >> /Users/stewart/dev/mozart/mozart/platform/dss/src/base.cc:1: error: >> CPU you selected does not support x86-64 instruction set >> make[2]: *** [base.o] Error 1 >> make[1]: *** [bootstrap] Error 1 >> make: *** [bootstrap] Error 1 >> > > Try the configure change that I just proposed. > >> >> Hopefully we can get a decent changeset so that users can pick it up >> and run with it immediately. >> This seems like a major sticking point for many users. >> > > I agree. The problem in building mozart on mac os x is that the mozart > emulator is not ready to be compiled in 64 bits and that at some point apple > targets several architectures with its toolchain. Notice that the flags I > suggested you to add are specific to the gcc that ships with apple. A normal > version of gcc will give you errors with these options. well as long as i am able to add correct build instructions to the README and communicate what the required steps are im sure we dont have to hit the ideal goal of ./configure alone and it automatically does a correct configure. Im going to be a bore but could you do me a favour and list the exact steps you have taken to get a successful build on a mac. Appreciate your time Gustavo. Stewart. > > Regards, > -- > Gustavo Gutierrez > > _________________________________________________________________________________ > mozart-users mailing list > [email protected] > http://www.mozart-oz.org/mailman/listinfo/mozart-users > _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
