Re: Errors while installing PostGIS by an unusual method - Mailing list pgsql-general

From Ankit Sablok
Subject Re: Errors while installing PostGIS by an unusual method
Date
Msg-id CAN=xihWys7-AMaLHYdD62L6-_aNPVWQ0V-ew7V36cOmPmkotRg@mail.gmail.com
Whole thread Raw
In response to Re: Errors while installing PostGIS by an unusual method  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Errors while installing PostGIS by an unusual method
Re: Errors while installing PostGIS by an unusual method
List pgsql-general
Thanks for replying Tom and Asif, I think the issue was that libpq.so present in the /pgsql/lib directory did not have all its dependencies installed on the system namely openssl hence I execute the command sudo yum install openssl and that proceeded the configure script forward, but now I ran into a separate issue where I do see libxml2 libraries present in the /pgsql/lib directory and I have also set the appropriate PATH and LD_LIBRARY_PATH for the build to happen successfully, here is the configure log when I execute the following command

./configure --with-gdalconfig=/pgsql/bin/gdal-config --with-geosconfig=//pgsql/bin/geos-config --with-projdir=/pgsql --with-jsondir=/rdsdbbin/apg-1.0.6.2 --with-pgconfig=/pgsql/bin/pg_config --with-libxml2=/pgsql/bin/xml2-config

configure: WARNING: unrecognized options: --with-libxml2
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
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... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
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... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
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... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -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 (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
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 grep that handles long lines and -e... (cached) /bin/grep
checking for ant... no
checking for cpp... /usr/local/bin/cpp
checking if gcc supports -Wall... yes
checking if gcc supports -Wmissing-prototypes... yes
checking if gcc supports -ffloat-store... yes
checking if gcc supports --exclude-libs... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
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 xsltproc... /usr/bin/xsltproc
checking for convert... no
configure: WARNING: ImageMagick does not seem to be installed. Documentation cannot be built
checking for dblatex... no
configure: WARNING: dblatex is not installed so PDF documentation cannot be built
checking for xmllint... /usr/bin/xmllint
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... yes
checking for iconvctl... no
checking for libiconvctl... no
Using user-specified pg_config file: /pgsql/bin/pg_config
checking PostgreSQL version... PostgreSQL 9.6
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... no
configure: error: could not find libxml2

I am not sure how to fix that in general :(?

On Mon, Oct 24, 2016 at 5:37 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Ankit Sablok <ankitsab@buffalo.edu> writes:
> I am trying to install PostGIS on a RHEL_5 system and failing at it
> miserably. The way I am trying to install it is as follows. I copy over all
> the artifacts of postgresql server as in the bin, lib, share directories of
> postgresql server in a directory called pgql and I place it in the root
> directory i.e /pgsql is the directory which contains things like pg_config
> and all the other libs and bins that one gets by installing postgresql
> using the standard installation.

(1) did you remember the include directory?

(2) I think this process will not work unless /pgsql was also the install
directory on the source machine.  You can check that by running pg_config
by hand and seeing what it prints for INCLUDEDIR, but it looks to me like
it just parrots what PG's configure expected the installation path to be.

(This is assuming that PostGIS's configure even pays attention to what
pg_config says for INCLUDEDIR.  I've not checked.)

Is there a good reason why you're not building Postgres on the same
machine where you're building PostGIS?  It seems like a recipe for
trouble, with little to be gained.

                        regards, tom lane

pgsql-general by date:

Previous
From: Andre Mikulec
Date:
Subject: Re: configure PostgreSQL with PERL: Perl version 5.8 or later is required, but this is .
Next
From: Adrian Klaver
Date:
Subject: Re: configure PostgreSQL with PERL: Perl version 5.8 or later is required, but this is .