Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 MACOSX_DEPLOYMENT_TARGET=10.7
$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]: *** [postgis-1.5.so] 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
1  
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 gist.github.com. –  Sharpie Aug 15 '11 at 15:46
add comment

4 Answers

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
add comment

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

http://lists.osgeo.org/pipermail/postgis-users/2011-September/030665.html

http://lists.osgeo.org/pipermail/postgis-users/2011-September/030666.html

share|improve this answer
add comment

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

https://github.com/mxcl/homebrew/issues/6343

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
add comment

Your Answer

 
discard

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.