<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="quote dark-border-color"><div class="quote light-border-color">
<div class="quote-author" style="font-weight: bold;">Andy Colson wrote</div>
<div class="quote-message">
You need the Apache Portable Runtime library. Its a generic lib, not the webserver.
This gives an overview of all the area's it covers:
http://apr.apache.org/docs/apr/1.4/modules.html
</div>
</div></blockquote>
Thanks Andy for the reply, I do have apr, no idea if it's the generic lib or webserver one but they are 1.4 version:
Gery@gery /opt/mapcache/mapcache-rel-1-2-1/build
$ cygcheck -c | grep apr
apr1 1.4.8-1 OK
aprutil1 1.5.4-1 OK
libapr1 1.4.8-1 OK
libapr1-debuginfo 1.4.8-1 OK
libapr1-devel 1.4.8-1 OK
libaprutil1 1.5.4-1 OK
libaprutil1-debuginfo 1.5.4-1 OK
libaprutil1-devel 1.5.4-1 OK
Based on Stephen's answer (http://stackoverflow.com/questions/27755442/compiling-error-core-c-in-mapcache-with-cygwin), I should compile mapcache only as cgi (ie., no apache module), so I used:
cmake .. -DCMAKE_LEGACY_CYGWIN_WIN32=0 -DWITH_SQLITE=0 -DWITH_MAPSERVER=1 -DMAPSERVER_LIBRARY="/opt/mapserver/mapserver-6.4.1/build/libmapserver.dll.a" -DCMAKE_PREFIX_PATH="/opt/mapserver/mapserver-6.4.1;" -DWITH_APACHE=0
but I get the same error pointing to core.c. I used mapserver flags to use cgi as explained by Pablo's post (http://lists.osgeo.org/pipermail/mapserver-users/2013-September/075296.html).
So, after cmake I get:
Gery@gery /opt/mapcache/mapcache-rel-1-2-1/build
$ cmake .. -DCMAKE_LEGACY_CYGWIN_WIN32=0 -DWITH_SQLITE=0 -DWITH_MAPSERVER=1 -DMAPSERVER_LIBRARY="/opt/mapserver/mapserver-6.4.1/build/libmapserver.dll.a" -DCMAKE_PREFIX_PATH="/opt/mapserver/mapserver-6.4.1;" -DWITH_APACHE=0
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/bin/gcc.exe
-- Check for working C compiler: /usr/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for symlink
-- Looking for symlink - found
-- Found ZLIB: /usr/lib/libz.dll.a (found version "1.2.8")
-- Found PNG: /usr/lib/libpng.dll.a (found version "1.5.18")
-- Found JPEG: /usr/lib/libjpeg.dll.a
-- Found CURL: /usr/lib/libcurl.dll.a (found version "7.38.0")
-- Found APR: /usr/lib/libapr-1.dll.a
-- Found APU: /usr/lib/libaprutil-1.dll.a
-- Found PkgConfig: /usr/bin/pkg-config.exe (found version "0.28")
-- checking for module 'pixman'
-- package 'pixman' not found
-- checking for module 'pixman-1'
-- found pixman-1, version 0.32.4
-- Found PIXMAN: /usr/lib/libpixman-1.dll.a
-- Found MAPSERVER: /opt/mapserver/mapserver-6.4.1/build/libmapserver.dll.a
-- * Configured options for the mapcache library
-- * Mandatory components
-- * png: /usr/lib/libpng.dll.a
-- * jpeg: /usr/lib/libjpeg.dll.a
-- * Curl: /usr/lib/libcurl.dll.a
-- * Apr: /usr/lib/libapr-1.dll.a
-- * Optional components
-- * PIXMAN: /usr/lib/libpixman-1.dll.a
-- * SQLITE: disabled
-- * Berkeley DB: disabled
-- * Memcache: disabled
-- * TIFF: disabled
-- * GeoTIFF: disabled
-- * Experimental TIFF write support: disabled
-- * PCRE: disabled
-- * Experimental mapserver support: /opt/mapserver/mapserver-6.4.1/build/libmapserver.dll.a
-- Found GDAL: /usr/local/lib/libgdal.dll.a
-- Found GEOS: /usr/local/lib/libgeos_c.dll.a
-- * Seeder Configuration Options:
-- * GEOS: /usr/local/lib/libgeos_c.dll.a
-- * OGR: /usr/local/lib/libgdal.dll.a
-- Found FCGI: /usr/lib/libfcgi.dll.a
-- * CGI Configuration Options:
-- * FastCGI: /usr/lib/libfcgi.dll.a
-- * Apache Module support status: DISABLED
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/mapcache/mapcache-rel-1-2-1/build
and after make I get:
Gery@gery /opt/mapcache/mapcache-rel-1-2-1/build
$ make
Scanning dependencies of target mapcache
[ 2%] Building C object CMakeFiles/mapcache.dir/lib/axisorder.c.o
[ 5%] Building C object CMakeFiles/mapcache.dir/lib/buffer.c.o
[ 7%] Building C object CMakeFiles/mapcache.dir/lib/cache_bdb.c.o
[ 10%] Building C object CMakeFiles/mapcache.dir/lib/cache_disk.c.o
[ 12%] Building C object CMakeFiles/mapcache.dir/lib/cache_memcache.c.o
[ 15%] Building C object CMakeFiles/mapcache.dir/lib/cache_sqlite.c.o
[ 17%] Building C object CMakeFiles/mapcache.dir/lib/cache_tiff.c.o
[ 20%] Building C object CMakeFiles/mapcache.dir/lib/cache_tokyocabinet.c.o
[ 22%] Building C object CMakeFiles/mapcache.dir/lib/configuration.c.o
[ 25%] Building C object CMakeFiles/mapcache.dir/lib/configuration_xml.c.o
[ 27%] Building C object CMakeFiles/mapcache.dir/lib/core.c.o
/opt/mapcache/mapcache-rel-1-2-1/lib/core.c: In function ‘mapcache_prefetch_tiles’:
/opt/mapcache/mapcache-rel-1-2-1/lib/core.c:81:3: error: unknown type name ‘apr_thread_t’
apr_thread_t **threads;
^
/opt/mapcache/mapcache-rel-1-2-1/lib/core.c:82:3: error: unknown type name ‘apr_threadattr_t’
apr_threadattr_t *thread_attrs;
^
/opt/mapcache/mapcache-rel-1-2-1/lib/core.c:83:7: warning: unused variable ‘nthreads’ [-Wunused-variable]
int nthreads;
^
/opt/mapcache/mapcache-rel-1-2-1/lib/core.c:82:21: warning: unused variable ‘thread_attrs’ [-Wunused-variable]
apr_threadattr_t *thread_attrs;
^
/opt/mapcache/mapcache-rel-1-2-1/lib/core.c:81:18: warning: unused variable ‘threads’ [-Wunused-variable]
apr_thread_t **threads;
^
CMakeFiles/mapcache.dir/build.make:287: recipe for target 'CMakeFiles/mapcache.dir/lib/core.c.o' failed
make[2]: *** [CMakeFiles/mapcache.dir/lib/core.c.o] Error 1
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/mapcache.dir/all' failed
make[1]: *** [CMakeFiles/mapcache.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
How could I know if my apr packages are causing the problem? is there a way to test that without installing a newer apache version?
Gery
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/compiling-error-core-c-in-mapcache-with-cygwin-tp5179881p5180356.html">Re: compiling error core.c in mapcache with cygwin</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html">Mapserver - User mailing list archive</a> at Nabble.com.<br/>