1

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.

1

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.

0

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

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.

-1

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

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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