Do you really need PostGIS as a fat binary? If it is just for use on one Mac (i.e. you are not distributing binaries to other machines), save yourself a dumptruckload of pain and just build everything as x86_64. A package manager such a Homebrew or MacPorts can also help get things installed.
–
SharpieMar 9 '12 at 17:55

Yes, it's only for me. I could compile only for x86_64. I'm probably too lazy, because I followed instructions that compile for both archs. Thanks for the suggestion!
–
jorgeas80Mar 11 '12 at 22:36

Thanks for the tip. Now I'm getting a different error: ar: libpgcommon.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it) ar: libpgcommon.a: Inappropriate file type or format. I'd use the binaries, but the point is I'm a GDAL/PostGIS developer, and I need to compile both libraries by myself.
–
jorgeas80Mar 9 '12 at 8:01

Sorry, I'm probably misunderstanding your answer, but your suggestion was to compile PostGIS with those flags. My solution was to compile PostgreSQL, a prerequisite, using those flags too, instead of using a precompiled version of PostgreSQL. Anyway, I'll mark your answer as valid.
–
jorgeas80Mar 11 '12 at 22:33

Any binary that you will link against must match the architecture. So in your case client-postgresql/proj/geos/gdal/postgis/etc must match. When in doubt, use the file <library_name> command.
–
Ragi Yaser BurhumMar 12 '12 at 5:18

Yes, I discovered the "file" command, and it's really useful. Thanks for the tip!
–
jorgeas80Mar 13 '12 at 10:26