MapServer / mapcache

MapCache source code directory. Please submit pull requests to the 'main' branch.
https://mapserver.org/mapcache
Other
137 stars 96 forks source link

mapcache install problem with libpng #69

Open ijustloveit13 opened 11 years ago

ijustloveit13 commented 11 years ago

I run on Ubuntu 13.4 (raring ringtail) 64 bit.

I have installed Mapserver 6.2.1 by the source.

I now want to install mapcache. I hvae libpng12, which is the latest version for Ubuntu.

./ configure:

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 -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... no checking for mawk... mawk 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... no 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 for a BSD-compatible install... /usr/bin/install -c checking for ANSI C header files... (cached) yes checking for symlink... yes checking for apxs2... /usr/bin/apxs2 Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. checking for apachectl utility... /usr/sbin/apachectl Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. checking whether to enable FASTCGI... not requested. use --with-fastcgi=dir to enable checking for apr-config in default locations... using /usr/bin/apr-config, use --with-apr-config=/path/to/apr-(1-)config to modify checking for apu-config in default locations... using /usr/bin/apu-config, use --with-apu-config=/path/to/apu-(1-)config to modify checking for apr_memcache_hash in -laprutil-1... no configure: WARNING: supplied apr-util does not contain memcache functions. memcache cache backend disabled checking sqlite3.h usability... yes checking sqlite3.h presence... yes checking for sqlite3.h... yes checking for sqlite3_open_v2 in -lsqlite3... yes using libsqlite3 from system libs. checking for pkg-config... /usr/bin/pkg-config checking for Pixman... searching default locations checking for pixman pkg-config entry... found checking if pixman version is >= 0.13.2... 0.28.2 configure: checking where PNG is installed... checking for png_init_io in -lpng... yes checking png.h usability... yes checking png.h presence... yes checking for png.h... yes using libpng from system libs. checking setjmp.h usability... yes checking setjmp.h presence... yes checking for setjmp.h... yes configure: checking where JPEG is installed... checking for jpeg_read_header in -ljpeg... yes checking jpeglib.h usability... yes checking jpeglib.h presence... yes checking for jpeglib.h... yes using libjpeg from system libs. configure: checking where TIFF is installed... checking for TIFFReadScanline in -ltiff... no checking tiffio.h usability... no checking tiffio.h presence... no checking for tiffio.h... no configure: WARNING: cannot find tiff headers in system path configure: WARNING: TIFF (libtiff) library cannot be found. install or reconfigure with --with-tiff=DIR checking for pcre library inclusion... in system locations checking for pcre_compile in -lpcre... yes checking pcre.h usability... yes checking pcre.h presence... yes checking for pcre.h... yes checking for gdal-config... no configure: WARNING: geos support disabled as gdal/ogr support was disabled/not found checking for geos-config... /usr/bin/geos-config checking for GEOSPreparedIntersects in -lgeos_c... yes checking for db.h... no configure: no Berkeley DB version 4 or higher found checking for curl-config... /usr/bin/curl-config configure: creating ./config.status config.status: creating Makefile.inc config.status: creating nginx/config config.status: creating lib/Makefile config.status: creating apache/Makefile config.status: creating util/Makefile config.status: creating cgi/Makefile config.status: executing libtool commands

make is where I encouner the problem. The erroneous part of the result is as follows:

... libtool: link: gcc -o .libs/mapcache_seed -DUSE_PCRE -DUSE_GEOS -DUSE_SQLITE -DUSE_PIXMAN -D_REENTRANT -D_GNU_SOURCE -pthread -O2 -Wall -DHAVE_SYMLINK -DNDEBUG -I../include -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -I/usr/include/pixman-1 -I/usr/include mapcache_seed.c ../lib/.libs/libmapcache.so -L/usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so -lpng -ljpeg /usr/lib/libapr-1.so /usr/lib/libaprutil-1.so -lpcre /usr/lib/x86_64-linux-gnu/libsqlite3.so -lpixman-1 -L/usr/lib -lgeos_c -pthread -Wl,-rpath -Wl,/usr/local/bin ../lib/.libs/libmapcache.so: undefined reference to png_set_longjmp_fn' collect2: error: ld returned 1 exit status make[1]: *** [mapcache_seed] Error 1 make[1]: Leaving directory.../mapcache-1.0.0/util' make: *\ [all] Error 2

Can anybody help?

Episodio1 commented 11 years ago

Hi, Ijustkloveit13!

Where did you download mapcache source code from?

I grabbed it from https://github.com/mapserver/mapcache/zipball/master but there is not any "configure" file. I run "autoconf" and it says "there is no input file".

I found a svn repository at svn.osgeo.org/mapserver/trunk/mapserver/mapcache/ but I can't find what version it is nor in the new Github repository.

Can I merge github folder into svn folder? Thus I would get the "configure" (from svn) and the latest files from github

Thanks.

ijustloveit13 commented 11 years ago

I downloaded it from http://download.osgeo.org/mapserver/mapcache-1.0.0.tar.gz

Episodio1 commented 11 years ago

My config is a bit different, I have gdal support and TIFF, for example, and you have: configure: WARNING: cannot find tiff headers in system path configure: WARNING: TIFF (libtiff) library cannot be found. install or reconfigure with --with-tiff=DIR configure: WARNING: geos support disabled as gdal/ogr support was disabled/not found

I downloaded from https://svn.osgeo.org/mapserver/trunk/mapserver/mapcache I installed previously these packages: apt-get install libpng12-0 libfreetype6 libgd2-xpm zlib-bin libjpeg62-dev apt-get install libproj0 libcurl3 libagg-dev libtiff4-dev libgeotiff-dev apt-get install libgeos-dev libxml2-dev libgd2-xpm-dev libpng12-dev libgif-dev apt-get install libcurl4-openssl-dev libfreetype6-dev zlib1g-dev libproj-dev apt-get install apache2 apache2-prefork-dev libpixman-1-dev (I installed GDAL 1.10 compiled from source code as well)

I edited “include/mapcache.h” adding at beginning of file: # include < apr_reslist.h > becasue there was an error when compiling.

$ ./configure
$ make
$ make install

Mapcache built correctly.

ijustloveit13 commented 11 years ago

I did what you wrote. But, the error is still the same. I have problem with png as shown above

Episodio1 commented 11 years ago

Ok. I can't help you anymore. I don't know what is the error telling. Maybe if you try to find "png_set_longjmp_fn" in the source code? $ grep -l -r "png_set_longjmp" .
(there is a dot a the end) -l list files -r recursive "dot" from the current directory

I tried and it didn't find anything. But "pngset" did show up a few times.

ijustloveit13 commented 11 years ago

grep -l -r "png_set_longjmp" . resulted in:

./lib/.libs/libmapcache.so.0.0.0 ./lib/.libs/imageio_png.o

what should I do now?

tbonfort commented 11 years ago

I suspect you have conflicting versions of libpng installed on your system, can you locate all occurences of png.h and libpng*.so on your system ?

Episodio1 commented 11 years ago

Hi, TBONFORT.

Could you explain why there isn't any "configure" file in this github? "autoconf" doesnt work either because it doesn't find any input file.

Thanks.

tbonfort commented 11 years ago

@Episodio1 mapcache (and mapserver) now build with cmake.

mkdir build
cd build
cmake ..
make && sudo make install

Have a look into CMakeLists.txt for the list of available WITH_XXX options that you can pass to e.g. cmake .. -DWITH_TIFF=0.

ijustloveit13 commented 11 years ago

locate png.h

.../.local/share/Trash/files/libpng-1.2.6.1/png.h .../.local/share/Trash/files/libpng-1.2.6.1/contrib/gregbook/readpng.h .../.local/share/Trash/files/libpng-1.2.6.1/contrib/gregbook/writepng.h .../.local/share/Trash/files/libpng-1.6.1/png.h .../.local/share/Trash/files/libpng-1.6.1/contrib/gregbook/readpng.h .../.local/share/Trash/files/libpng-1.6.1/contrib/gregbook/writepng.h .../.local/share/Trash/files/libpng-1.6.2/png.h .../.local/share/Trash/files/libpng-1.6.2/contrib/gregbook/readpng.h .../.local/share/Trash/files/libpng-1.6.2/contrib/gregbook/writepng.h .../.local/share/Trash/files/lpng162/png.h .../.local/share/Trash/files/lpng162/contrib/gregbook/readpng.h .../.local/share/Trash/files/lpng162/contrib/gregbook/writepng.h /usr/include/png.h /usr/include/libpng12/png.h /usr/lib/syslinux/com32/include/png.h /usr/local/include/png.h /usr/local/include/libpng16/png.h

locate libpng*.so

lib/x86_64-linux-gnu/libpng12.so.0 /lib/x86_64-linux-gnu/libpng12.so.0.49.0 /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libpng12.so /usr/lib/x86_64-linux-gnu/libpng12.so.0 /usr/local/lib/libpng.so /usr/local/lib/libpng16.so /usr/local/lib/libpng16.so.16 /usr/local/lib/libpng16.so.16.1.0 /usr/local/lib/libpng16.so.16.2.0 .../.local/share/Trash/files/libpng-1.2.6.1/.libs/libpng16.so .../.local/share/Trash/files/libpng-1.2.6.1/.libs/libpng16.so.16 .../.local/share/Trash/files/libpng-1.2.6.1/.libs/libpng16.so.16.1.0 .../.local/share/Trash/files/libpng-1.6.1/.libs/libpng16.so .../.local/share/Trash/files/libpng-1.6.1/.libs/libpng16.so.16 .../.local/share/Trash/files/libpng-1.6.1/.libs/libpng16.so.16.1.0