<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I have an odd error while compiling the last postgis versions<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">My OS is Centos Linux 7 x86_64<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">This is the error (the same on both versions):<br>make[2]: se ingresa al directorio `/home/nahum/Descargas/postgis-2.3.5/raster/loader'<br>gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom  -I/usr/local/include -I/usr/local/include   -c raster2pgsql.c<br>/bin/sh ../../libtool --mode=link gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom  -I/usr/local/include -I/usr/local/include   ../rt_core/librtcore.a raster2pgsql.o ../../liblwgeom/<a href="http://liblwgeom.la">liblwgeom.la</a> -L/usr/local/lib -lgdal  -L/usr/local/lib -lgeos_c  -lc -lm -o raster2pgsql<br>libtool: link: gcc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom -I/usr/local/include -I/usr/local/include raster2pgsql.o -o .libs/raster2pgsql  ../rt_core/librtcore.a ../../liblwgeom/.libs/liblwgeom.so -L/usr/local/lib -L/usr/lib64 -lSFCGAL /usr/local/lib/libgdal.so /usr/local/lib/libproj.so -ljson-c -lsqlite3 -lodbc -lodbcinst -lexpat -lpq -lpthread -lrt -lpcre -lcurl -lxml2 -lz -ldl /usr/local/lib/libgeos_c.so /usr/local/lib/libgeos.so -lc -lm<br><span style="color:rgb(255,0,0)">/usr/bin/ld: cannot find -lpq</span><br>collect2: error: ld returned 1 exit status<br>make[2]: *** [raster2pgsql] Error 1<br>make[2]: se sale del directorio `/home/nahum/Descargas/postgis-2.3.5/raster/loader'<br>make[1]: *** [rtloader] Error 2<br>make[1]: se sale del directorio `/home/nahum/Descargas/postgis-2.3.5/raster'<br>make: *** [all] Error 1<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Heres is the configure result:<br>2.3.5:<br>  PostGIS is now configured for x86_64-unknown-linux-gnu<br><br> -------------- Compiler Info ------------- <br>  C compiler:           gcc -g -O2<br>  SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P<br><br> -------------- Dependencies -------------- <br>  GEOS config:          /usr/local/bin/geos-config<br>  GEOS version:         3.6.2<br>  GDAL config:          /usr/local/bin/gdal-config<br>  GDAL version:         2.2.1<br>  SFCGAL config:        /usr/bin/sfcgal-config<br>  SFCGAL version:       1.2.2<br>  PostgreSQL config:    /usr/local/pgsql/bin/pg_config<br>  PostgreSQL version:   PostgreSQL 10.1<br>  PROJ4 version:        49<br>  Libxml2 config:       /usr/bin/xml2-config<br>  Libxml2 version:      2.9.1<br>  JSON-C support:       yes<br>  PCRE support:         yes<br>  PostGIS debug level:  0<br>  Perl:                 /usr/bin/perl<br><br> --------------- Extensions --------------- <br>  PostGIS Raster:       enabled<br>  PostGIS Topology:     enabled<br>  SFCGAL support:       enabled<br>  Address Standardizer support:       enabled<br><br> -------- Documentation Generation -------- <br>  xsltproc:             /usr/bin/xsltproc<br>  xsl style sheets:     /usr/share/sgml/docbook/xsl-stylesheets<br>  dblatex:              <br>  convert:              /usr/bin/convert<br>  mathml2.dtd:          <a href="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">http://www.w3.org/Math/DTD/mathml2/mathml2.dtd</a><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">And 2.4.2<br>  PostGIS is now configured for x86_64-unknown-linux-gnu<br><br> -------------- Compiler Info ------------- <br>  C compiler:           gcc -g -O2<br>  SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P<br><br> -------------- Dependencies -------------- <br>  GEOS config:          /usr/local/bin/geos-config<br>  GEOS version:         3.6.2<br>  GDAL config:          /usr/local/bin/gdal-config<br>  GDAL version:         2.2.1<br>  SFCGAL config:        /usr/bin/sfcgal-config<br>  SFCGAL version:       1.2.2<br>  PostgreSQL config:    /usr/local/pgsql/bin/pg_config<br>  PostgreSQL version:   PostgreSQL 10.1<br>  PROJ4 version:        49<br>  Libxml2 config:       /usr/bin/xml2-config<br>  Libxml2 version:      2.9.1<br>  JSON-C support:       yes<br>  protobuf-c support:   no<br>  PCRE support:         yes<br>  Perl:                 /usr/bin/perl<br><br> --------------- Extensions --------------- <br>  PostGIS Raster:       enabled<br>  PostGIS Topology:     enabled<br>  SFCGAL support:       enabled<br>  Address Standardizer support:       enabled<br><br> -------- Documentation Generation -------- <br>  xsltproc:             /usr/bin/xsltproc<br>  xsl style sheets:     /usr/share/sgml/docbook/xsl-stylesheets<br>  dblatex:              <br>  convert:              /usr/bin/convert<br>  mathml2.dtd:          <a href="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">http://www.w3.org/Math/DTD/mathml2/mathml2.dtd</a><br><br>configure: WARNING:  --------- GEOS VERSION WARNING ------------ <br>configure: WARNING:   You are building against GEOS 3.6.2 <br>configure: WARNING:   To take advantage of all the features of <br>configure: WARNING:   this PostGIS version requires GEOS 3.7.0 or higher which is not out yet.<br>configure: WARNING:   To take advantage of most of the features of this PostGIS<br>configure: WARNING:   we recommend GEOS 3.6 or higher<br>configure: WARNING:   You can download the latest versions from <br>configure: WARNING:   <a href="http://trac.osgeo.org/geos">http://trac.osgeo.org/geos</a> <br>configure: WARNING: <br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">And here is the output from ldconfig.<br>/usr/local/pgsql/lib:<br>        libpqwalreceiver.so -> libpqwalreceiver.so<br>        <a href="http://libpgrouting-2.4.so">libpgrouting-2.4.so</a> -> <a href="http://libpgrouting-2.4.so">libpgrouting-2.4.so</a><br>        libecpg_compat.so.3 -> libecpg_compat.so.3.10<br>        libecpg.so.6 -> libecpg.so.6.10<br>        libpgtypes.so.3 -> libpgtypes.so.3.10<br>        <span style="color:rgb(255,0,0)">libpq.so.5 -> libpq.so.5.10</span><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The last line contains libpq.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Everything is compiled from source gdal, geos, proj, postgresql.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The only thing is that I upgraded from postgresql 9.6.6 and postgis 2.3.3<br><br>Here is my pg_config<br>[nahum@localhost postgis-2.4.2]$ pg_config<br>BINDIR = /usr/local/pgsql/bin<br>DOCDIR = /usr/local/pgsql/share/doc<br>HTMLDIR = /usr/local/pgsql/share/doc<br>INCLUDEDIR = /usr/local/pgsql/include<br>PKGINCLUDEDIR = /usr/local/pgsql/include<br>INCLUDEDIR-SERVER = /usr/local/pgsql/include/server<br>LIBDIR = /usr/local/pgsql/lib<br>PKGLIBDIR = /usr/local/pgsql/lib<br>LOCALEDIR = /usr/local/pgsql/share/locale<br>MANDIR = /usr/local/pgsql/share/man<br>SHAREDIR = /usr/local/pgsql/share<br>SYSCONFDIR = /usr/local/pgsql/etc<br>PGXS = /usr/local/pgsql/lib/pgxs/src/makefiles/<a href="http://pgxs.mk">pgxs.mk</a><br>CONFIGURE = '--enable-nls=es' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-selinux' '--with-ldap' '--with-perl' '--with-python'<br>CC = gcc<br>CPPFLAGS = -DFRONTEND -D_GNU_SOURCE -I/usr/include/libxml2<br>CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2<br>CFLAGS_SL = -fPIC<br>LDFLAGS = -L../../src/common -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags<br>LDFLAGS_EX = <br>LDFLAGS_SL = <br>LIBS = -lpgcommon -lpgport -lpthread -lselinux -lxslt -lxml2 -lssl -lcrypto -lz -lreadline -lrt -lcrypt -ldl -lm  <br>VERSION = PostgreSQL 10.1<br><br clear="all"></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">​Can you help me on how to find where is my error. I googled and found a similar error on postgresql 8 and postgis 1.5<br><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">In <a href="https://www.postgresql.org/docs/current/static/libpq-build.html">https://www.postgresql.org/docs/current/static/libpq-build.html</a><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">says that "This means you forgot the <code class="gmail-option">-L</code>
        option or did not specify the right directory." but I don't know if it is related.<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br>Thanks in advance.<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Nahum​</div><br><br><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><b>Nahum Castro González</b><br>Blvd. Perdigón 214, Brisas del Lago.<br>
CP 37207<br>
León, Guanajuato, México<br>
Tel (477)1950304<br></div>Cel (477)1274694<br></div></div>
</div>