[Tile-serving] [mod_tile] Compile errors on FreeBSD 10.1-RELEASE (#114)
lungdart
notifications at github.com
Thu Oct 22 17:36:16 UTC 2015
mod_tile fails to compile out of the box on FreeBSD 10.1-RELEASE
1) The Makefile doesn't add /usr/local/include when compiling src/store_ro_http_proxy.c which causes curl/curl.h not to be found on the system. I'm not sure of the proper way to fix this, I just added it to AM_CPPFLAGS variable in Makefile.am before running autogen.sh and configure.
2) src/gen_tile_test.cpp needs to include sys/wait.h which contains some macros that are normally defined in stdlib.h on linux systems
3) src/gen_tile_test.cpp uses syscall(SYS_gettid); as a seed generator in function addition_thread (Around line 100). SYS_gettid is not suppored in FreeBSD, and the temporary solution I had was to include pthread.h and use (unsigned long long int)pthread_self(); instead. I don't believe this is ideal either. A good seed source should be found.
4) src/mod_tile.c uses ip.s6_addr32 which is not compatible with FreeBSD and OSX. This was noted before and patched to use the BSD friendly versions, but then changed back in https://github.com/openstreetmap/mod_tile/commit/8307d19ab7040691b1fd243052b6668a14f4df1f by reverting the hastag variable to it's previous iteration fixes this compiling error.
With these four changes I was able to get mod_tile to compile and install. There might be some consideration required to check if the system is FreeBSD and apply these changes? Sorry, not very familiar with the OSS scene, and git reporting.
Thanks!
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/114
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20151022/fac2f685/attachment.html>
More information about the Tile-serving
mailing list