[GRASS-dev] Not universal building on Mac

William Kyngesburye woklist at kyngchaos.com
Wed May 9 11:18:54 EDT 2007

On May 9, 2007, at 8:51 AM, Agustin Diez Castillo wrote:

> Errors compiling latest cvs on macosx intel, when using universal  
> flags( export CFLAGS="-arch ppc -arch i386"; export CXXFLAGS="-arch  
> ppc -arch i386"; export LDFLAGS="-arch ppc -arch i386"). Without  
> them works.
> /usr/bin/install -c  -m 644 scripts.hmp /Users/Shared/grasssource/ 
> grass6/dist.i686-apple-darwin8.9.1/fonts
> gtcltk
> if [ ! -d /Users/Shared/grasssource/grass6/dist.i686-apple- 
> darwin8.9.1/etc/gtcltk ]; then mkdir -p /Users/Shared/grasssource/ 
> grass6/dist.i686-apple-darwin8.9.1/etc/gtcltk; fi
> for file in *.tcl ; do /usr/bin/install -c  -m 644 $file /Users/ 
> Shared/grasssource/grass6/dist.i686-apple-darwin8.9.1/etc/gtcltk/ ;  
> done
> gcc -I/Users/Shared/grasssource/grass6/dist.i686-apple-darwin8.9.1/ 
> include  -g -O3        -DPACKAGE=\""grassmods"\"  -I/Users/Shared/ 
> grasssource/grass6/dist.i686-apple-darwin8.9.1/include \
>         -o OBJ.i686-apple-darwin8.9.1/grocat.o -c grocat.c
> gcc -L/Users/Shared/grasssource/grass6/dist.i686-apple-darwin8.9.1/ 
> lib -arch ppc -arch i386 -arch ppc -arch i386  -L/usr/local/pgsql/ 
> lib  OBJ.i686-apple-darwin8.9.1/grocat.o -o /Users/Shared/ 
> grasssource/grass6/dist.i686-apple-darwin8.9.1/etc/grocat
> /usr/bin/ld: for architecture ppc
> /usr/bin/ld: warning OBJ.i686-apple-darwin8.9.1/grocat.o cputype  
> (7, architecture i386) does not match cputype (18) for specified - 
> arch flag: ppc (file not loaded)
> /usr/bin/ld: Undefined symbols:
> _main
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//cchnyodT.out (No such file  
> or directory)
> make[2]: *** [/Users/Shared/grasssource/grass6/dist.i686-apple- 
> darwin8.9.1/etc/grocat] Error 1
> form

Somehow the universal flags didn't get into the grocat compile, but  
did make it to the grocat link.  Odd because grocat hasn't changed  
since last November, and it's a standard .o target.

Try make distclean?  Could be some leftovers from a single-arch build.

William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>

"We are at war with them. Neither in hatred nor revenge and with no  
particular pleasure I shall kill every ___ I can until the war is  
over. That is my duty."

"Don't you even hate 'em?"

"What good would it do if I did? If all the many millions of people  
of the allied nations devoted an entire year exclusively to hating  
the ____ it wouldn't kill one ___ nor shorten the war one day."

<Ha, ha> "And it might give 'em all stomach ulcers."

- Tarzan, on war

More information about the grass-dev mailing list