Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install postGIS from source to match the default install of postgreSQL on OS X 10.7. I installed GEOS and PORJ.4 from Kyngchaos and ran

$export CFLAGS="-Os -arch i386 -arch x86_64" 
$export PG_CPPFLAGS="-arch i386 -arch x86_64"
$export SHLIB_LINK="-arch i386 -arch x86_64"
$export LDFLAGS="-arch i386 -arch x86_64"
$cd ~/source/postgis
postgis $./configure --with-pgconfig=/usr/bin/pg_config --with-geosconfig=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --with-projdir=/Library/Frameworks/PROJ.framework/Unix

I get this

PostGIS is now configured for x86_64-apple-darwin11.0.0

however after running make i get the following error

collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/dh/11gwx5cs5sl8v4r7qrzf3pd00000gn/T//ccsAdaB9.out (No such file or directory)
make[1]: *** [] Error 1
make: *** [postgis] Error 2

Something i don't know about (architecture?) seems wrong here. Any clue? Thanks in advance.

share|improve this question
collect2: ld returned 1 exit status means that some error occurred earlier in the log. To really have a chance at debugging this, someone would need the full log---everything from the time you ran ./configure. You could post it in a pastebin like – Sharpie Aug 15 '11 at 15:46
I'm getting exactly the same problem, but with Snow Leopard. Did you solve them? These 2 links talk about the same, but don't provide a confirmed solution…… – jorgeas80 Mar 8 '12 at 18:08
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question. – Mark C Feb 2 '15 at 1:58

I'm going to take a guess and say that you need to pass --disable-dependency-tracking as an argument to ./configure. Usually Configure will set up Makefiles so that "dependency tracking" information is gathered by invoking GCC using -M* flags. These flags cannot be used when multiple --arch flags are passed to generate fat binaries.

Just a guess---can't say for sure without the full logs for configure and make.

share|improve this answer

Try this post: Installing PostgreSQL and PostGIS on Mac OS X (for Lion)

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

A quick workaround on Lion is to move /usr/local/bin before /usr/bin in /etc/paths, then logout and log back in.

share|improve this answer
I don't think this will solve his problem. He is already supplying configure with an explicit path to pg_config and states that he wants to "match the default install of postgreSQL on OS X 10.7"---i.e. the one installed in /usr and certainly not anything in /usr/local. – Sharpie Aug 15 '11 at 20:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.