Ich weiß nicht weiter: PostGIS lässt sich nicht compilieren

Hallo,

ich hoffe, hier kann mir jemand helfen.

Eins vorweg: Ich kenn mich nicht wirklich gut aus mit linux und ubuntu - ich bin neu dabei.

Ich habe mit apt-get die neuste Version von PostgreSQL installiert.
Dann habe ich postgis-1.5.3 heruntergeladen, entpackt und mit Rootrechten im Ordner den Terminalbefehl ./configure ausgeführt. Das Folgende kommt dabei:

root@MAP-PC:~/postgis-1.5.3# ./configurechecking 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 -B
checking the name lister (/usr/bin/nm -B) 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 -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt 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... yes
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 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++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if g++ supports -Wall... yes
checking if g++ supports -Wmissing-prototypes... yes
checking if g++ supports -ffloat-store... yes
checking for flex... no
checking for lex... no
checking for bison... no
checking for byacc... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking for convert... /usr/bin/convert
checking for xsltproc... no
configure: WARNING: xsltproc is not installed so documentation cannot be built
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 liblwgeom 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
checking for pg_config... /usr/bin/pg_config
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
checking PostgreSQL version... 
./configure: line 15798: test: : integer expression expected
./configure: line 15801: test: : integer expression expected
./configure: line 15809: test: : integer expression expected
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
checking libpq-fe.h usability... no
checking libpq-fe.h presence... no
checking for libpq-fe.h... no
configure: error: could not find libpq-fe.h
root@MAP-PC:~/postgis-1.5.3#

Ich werde daraus einfach nicht schlau.

Ich verwende momentan Linux Mint 12 (Gnome), aber mit xubuntu 11.10 hatte ich die gleichen Probleme. Ich habe ein 64bit System.

Danke für jede Hilfe!
Martin

Ja, es gibt dazu (also für Debian-based Linuxe) auch ein postgres-devel - Paket - oder so ähnlich benamt. Das brauchst Du zum compilieren.

Andreas

Hmm, nun das verstehe ich nicht. Ich befolge doch die Anleitung zur Installation von PostGIS in ubuntu. Da ist nicht die Rede davon, dass ich noch etwas brauchen könnte. Nun, hier finde ich dieses “devel”: RPM resource postgresql-devel doch nicht für ubuntu.

Was nun?
Martin

PostGis benötigt, um selbst kompiliert werden zu können, teile der PostgreSQL Sourcen. Aus diesem Grund müssen diese auch auf deinem System installiert werden. Du hast vermutlich auf deinem Ubuntu System nur die Binärpakete installiert.

Die von dir oben genannten -devel Pakete sind für RPM Distributionen wie z. B. Fedora. Hilft dir also nicht weiter. Ich kenn mit mit Ubuntu auch nicht wirklich aus. Aber ein “aptitude search postgresql*” sollte dir doch einiges liefern. Eventuell musst du aber auch die Repositories anpassen, damit du Sourcepakete überhaupt findest.

cu tb

Hier gibts Pakete für Ubuntu: Ubuntu – Package Search Results – postgres
Das vorletzte ist ein Devel-Paket. Ohne Gewähr, ich kenn mich damit auch nicht aus :wink:

Gruß Uwe