[postgis-users] Install problem with PROJ directory

Paragon Corporation lr at pcorp.us
Sun Sep 27 18:39:39 PDT 2015


Try changing the 
To

./configure --with-projdir=/opt/local


Or with:

./configure --with-projdir=/usr/local


The directory path is  that that includes the include and bin for proj.  Not
the include path.

Hope that helps,
Regina
http://www.postgis.us
http://postgis.net


-----Original Message-----
From: postgis-users-bounces at lists.osgeo.org
[mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of One
Sent: Sunday, September 27, 2015 3:34 AM
To: postgis-users at lists.osgeo.org
Subject: Re: [postgis-users] Install problem with PROJ directory

I have a problem similar to the OP. I installed PostgreSQL and Proj4 on my
Mac, and now I want to install PostGIS from source. However, when I run the
./configure command, I get this result:

...
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: could not find proj_api.h - you may need to specify the
directory of a PROJ.4 installation using --with-projdir

I believe that postgres and proj were installed correctly because sample
psql and proj commands appear to work okay.

If I do "which proj", I get this result:
/usr/local/bin/proj

Also, a search for "proj_api.h" shows these results, minus the file in the
source directory:
/Library/Frameworks/PROJ.framework/Versions/4/Headers/proj_api.h
/opt/local/include/proj_api.h
/usr/local/include/proj_api.h

I have tried the following and still failed to configure:
./configure --with-projdir=/usr/local/bin ./configure
--with-projdir=/Library/Frameworks/PROJ.framework/Versions/4/Headers/
./configure --with-projdir=/opt/local/include/
./configure --with-projdir=/usr/local/include

My specs:

-MacBookPro OS X Yosemite Version 10.10.2 -XCode version 6.3.2 -PostgreSQL
version 9.3.5 , installed from source (I am using an older version of
Postgres because I need a version that's compatible with ArcGIS).
-Proj4 version 4.9.1 (the one at /usr/local/bin/proj is installed from
source, and the one at /opt/local is installed from MacPorts)

I am installing PostGIS from source, and not Homebrew, MacPorts, or
KyngChaos, because I need a version that will work with PostgreSQL 9.3.5.

What should I try next? 

Thanks for your help.

------

Sample output:

$ ./configure
--with-projdir=/Library/Frameworks/PROJ.framework/Versions/4/Headers
checking build system type... x86_64-apple-darwin14.1.0 checking host system
type... x86_64-apple-darwin14.1.0 checking how to print strings... printf
checking for gcc... gcc checking whether the C compiler works... yes
checking for C compiler default output file name... a.out checking for
suffix of executables... 
checking whether we are cross compiling... no checking for suffix of object
files... o checking whether we are using the GNU C compiler... yes checking
whether gcc accepts -g... yes checking for gcc option to accept ISO C89...
none needed checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep checking
for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolcha
in/usr/bin/ld
checking if the linker
(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch
ain/usr/bin/ld)
is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm checking
the name lister (/usr/bin/nm) interface... BSD nm checking whether ln -s
works... yes checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin14.1.0 file names to
x86_64-apple-darwin14.1.0 format... func_convert_file_noop checking how to
convert x86_64-apple-darwin14.1.0 file names to toolchain format...
func_convert_file_noop checking for
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolcha
in/usr/bin/ld
option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all checking for
dlltool... no checking how to associate runtime and link libraries... printf
%s\n checking for ar... ar checking for archiver @FILE support... no
checking for strip... strip checking for ranlib... ranlib checking for
gawk... no checking for mawk... no checking for nawk... no checking for
awk... awk checking command to parse /usr/bin/nm output from gcc object...
ok checking for sysroot... no checking for a working dd... /bin/dd checking
how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt...
no checking if : is a manifest tool... no checking for dsymutil... dsymutil
checking for nmedit... nmedit checking for lipo... lipo checking for
otool... otool checking for otool64... no checking for -single_module linker
flag... yes checking for -exported_symbols_list linker flag... yes checking
for -force_load linker flag... yes checking how to run the C preprocessor...
gcc -E checking for ANSI C header files... yes checking for sys/types.h...
yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for
string.h... yes checking for memory.h... yes checking for strings.h... yes
checking for inttypes.h... yes checking for stdint.h... yes checking for
unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes checking for gcc
option to produce PIC... -fno-common -DPIC checking if gcc PIC flag
-fno-common -DPIC works... yes checking if gcc static flag -static works...
no checking if gcc supports -c -o file.o... yes checking if gcc supports -c
-o file.o... (cached) yes checking whether the gcc linker
(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch
ain/usr/bin/ld)
supports shared libraries... yes
checking dynamic linker characteristics... darwin14.1.0 dyld checking how to
hardcode library paths into programs... immediate checking whether stripping
libraries is possible... yes checking if libtool supports shared
libraries... yes checking whether to build shared libraries... yes checking
whether to build static libraries... yes checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes checking
whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO
C89... (cached) none needed checking how to run the C preprocessor... gcc -E
checking for g++... g++ checking whether we are using the GNU C++
compiler... yes checking whether g++ accepts -g... yes checking how to run
the C++ preprocessor... g++ -E checking for ld used by g++...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolcha
in/usr/bin/ld
checking if the linker
(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch
ain/usr/bin/ld)
is GNU ld... no
checking whether the g++ linker
(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch
ain/usr/bin/ld)
supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC checking if g++
PIC flag -fno-common -DPIC works... yes checking if g++ static flag -static
works... no checking if g++ supports -c -o file.o... yes checking if g++
supports -c -o file.o... (cached) yes checking whether the g++ linker
(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch
ain/usr/bin/ld)
supports shared libraries... yes
checking dynamic linker characteristics... darwin14.1.0 dyld checking how to
hardcode library paths into programs... immediate checking for grep that
handles long lines and -e... (cached) /usr/bin/grep checking for ant... no
checking for cpp... /usr/bin/cpp checking if g++ supports -Wall... yes
checking if g++ supports -Wmissing-prototypes... yes checking if g++
supports -ffloat-store... no checking for flex... flex checking lex output
file root... lex.yy checking lex library... -ll checking whether yytext is a
pointer... yes checking for bison... bison -y checking ieeefp.h usability...
no checking ieeefp.h presence... no checking for ieeefp.h... no checking
termios.h usability... yes checking termios.h presence... yes checking for
termios.h... yes checking for vasprintf... yes checking for asprintf... yes
checking for _LARGEFILE_SOURCE value needed for large files... no checking
whether isfinite is declared... yes checking whether isfinite is declared...
yes checking for perl... /usr/bin/perl checking for convert... no
configure: WARNING: ImageMagick does not seem to be installed. Documentation
cannot be built checking for xsltproc... /usr/bin/xsltproc checking for
xmllint... /usr/bin/xmllint checking for dblatex... no
configure: WARNING: dblatex is not installed so PDF documentation cannot be
built
configure: WARNING: could not locate Docbook stylesheets required to build
the documentation checking CUnit/CUnit.h usability... no checking
CUnit/CUnit.h presence... no checking for CUnit/CUnit.h... no
configure: WARNING: could not locate CUnit required for unit tests checking
iconv.h usability... yes checking iconv.h presence... yes checking for
iconv.h... yes checking for libiconv_open in -liconv... no checking for
iconv_open in -lc... no checking for iconv_open in -liconv... yes checking
for iconvctl... no checking for libiconvctl... no checking for pg_config...
/usr/local/pgsql/bin/pg_config checking PostgreSQL version... PostgreSQL
9.3.5 checking libpq-fe.h usability... yes checking libpq-fe.h presence...
yes checking for libpq-fe.h... yes checking for PQserverVersion in -lpq...
yes checking for xml2-config... /usr/bin/xml2-config checking libxml/tree.h
usability... yes checking libxml/tree.h presence... yes checking for
libxml/tree.h... yes checking libxml/parser.h usability... yes checking
libxml/parser.h presence... yes checking for libxml/parser.h... yes checking
libxml/xpath.h usability... yes checking libxml/xpath.h presence... yes
checking for libxml/xpath.h... yes checking libxml/xpathInternals.h
usability... yes checking libxml/xpathInternals.h presence... yes checking
for libxml/xpathInternals.h... yes checking for xmlInitParser in -lxml2...
yes checking for geos-config... /usr/local/bin/geos-config checking GEOS
version... 3.4.2 checking geos_c.h usability... yes checking geos_c.h
presence... yes checking for geos_c.h... yes checking for initGEOS in
-lgeos_c... yes checking for sfcgal-config... /usr/local/bin/sfcgal-config
checking whether make sets $(MAKE)... yes checking for a BSD-compatible
install... /usr/bin/install -c checking for a thread-safe mkdir -p...
./install-sh -c -d checking whether NLS is requested... yes checking for
msgfmt... /opt/local/bin/msgfmt checking for gmsgfmt...
/opt/local/bin/msgfmt checking for xgettext... /opt/local/bin/xgettext
checking for msgmerge... /opt/local/bin/msgmerge checking for ld used by
GCC...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolcha
in/usr/bin/ld
checking if the linker
(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch
ain/usr/bin/ld)
is GNU ld... no
checking for shared library run path origin... done checking for
CFPreferencesCopyAppValue... yes checking for CFLocaleCopyCurrent... yes
checking for GNU gettext in libc... no checking for iconv... yes checking
for working iconv... yes checking how to link with libiconv... -liconv
checking for GNU gettext in libintl... no checking whether to use NLS... no
Using user-specified proj directory:
/Library/Frameworks/PROJ.framework/Versions/4/Headers
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: could not find proj_api.h - you may need to specify the
directory of a PROJ.4 installation using --with-projdir

------
Steps I followed to install Proj4 from source:

mkdir proj4
cd proj4
curl -O http://download.osgeo.org/proj/proj-4.9.1.tar.gz
gunzip proj-4.9.1.tar.gz
tar xf proj-4.9.1.tar
cd proj-4.9.1
./configure
make
make check
make install




--
View this message in context:
http://postgis.17.x6.nabble.com/Install-problem-with-PROJ-directory-tp499868
7p5008851.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




More information about the postgis-users mailing list