Closed jamra closed 10 years ago
perhaps try adding --ldflags --dep-libs
to this line https://github.com/fawick/go-mapnik/blob/master/mapnik/configure.bash#L9
Thank you. That seemed to do the trick for building with Clang.
I am getting This issue:
jacobs-imac:mapnik j$ ./configure.bash
# github.com/fawick/go-mapnik/mapnik
In file included from ./mapnik_c_api.cpp:5:
In file included from /usr/local/include/mapnik/agg_renderer.hpp:28:
In file included from /usr/local/include/mapnik/feature_style_processor.hpp:27:
In file included from /usr/local/include/mapnik/datasource.hpp:28:
In file included from /usr/local/include/mapnik/params.hpp:28:
/usr/local/include/mapnik/value_types.hpp:27:10: fatal error: 'unicode/unistr.h' file not found
I am going to close this issue since my current problem is in a relation to not having the icu header unicode/unistr.h
I will open another issue.
That error indicates that the icu
headers are not being found, which should be available via mapnik-config --cflags
This is a little weird
jacobs-imac:mapnik j$ mapnik-config --cflags | grep icu
-I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/Cellar/libtiff/4.0.3/include -I/usr/local/Cellar/libpng/1.5.17/include -I/usr/local/Cellar/proj/4.8.0/include -I/usr/local/Cellar/jpeg/8d/include -I/usr/local/Cellar/freetype/2.5.2/include/freetype2 -I/usr/local/Cellar/icu4c/52.1/include -I/usr/local/Cellar/boost/1.55.0/include -I/opt/local/include/libxml2 -I/usr/include -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_TIFF -DBIGINT -DDARWIN -DMAPNIK_THREADSAFE -DNDEBUG -DHAVE_LIBXML2 -ansi -Wall -ftemplate-depth-300 -O3 -fno-strict-aliasing -finline-functions -Wno-inline -Wno-parentheses -Wno-char-subscripts
It shows icu4c is there, but unicode/unistr.h file is not there.
I installed icu from source and it built successfully. I'm wondering what to do with this file. I ambitiously tried to copy it to the local directory, which caused a whole flood of errors.
I am not familiar with the MacOS toolchain and build system, so this is a wild guess: Do you need to explicitely install icu4c like described in the following link? http://darraghenright.tumblr.com/post/22027208929/installing-intl-package-on-osx-lion
I managed to fix the problem. I did need to install icu4c from homebrew, however, I also needed to add
/usr/local/Cellar/icu4c/52.1/include
to my path. This fixed that problem.
It didn't make much sense that I had to explicitly add this to my path since it was visible from using the command
mapnik-config --cflags
Unfortunately, I am now getting the error
[j:mapnik]$ ./configure.bash
# github.com/fawick/go-mapnik/mapnik
clang: error: argument unused during compilation: '-fno-eliminate-unused-debug-types'
mapnik-config --all-flags does not have that argument. I don't know where to remove it from.
It didn't make much sense that I had to explicitly add this to my path since it was visible from using the command
Right, that is odd. I'm here as a mapnik developer (and know nothing about go): I presume something is wrong with the go build script such that the --cflags
are not being respected.
Btw, how did you install Mapnik? When brew install mapnik
mapnik-config --all-flags does not have that argument. I don't know where to remove it from.
Also, odd. Maybe @fawick knows....
If it makes any difference, go build fails with the same message. It may just be a clang issue since clang is forced on you on OSX even if you use gcc. If I can find out where this argument is in the hierarchy, I can remove it and it should work on OSX.
Okay, I identified the problem. Clang is just not supported in cgo. I will have to try to install gcc explicitly, but I remember having a gcc/clang issue in the past where in the latest build of OSX (Mavericks) gcc automatically links to clang.
I can try getting a homebrew gcc version, but I think I'm just going to give up on this attempt and try to use something like docker to run this project. There is nothing wrong with the author's implementation in terms of golang, so I am closing this ticket.
On OSX, I ran
I assumed that this is the equivalent to
It failed straight away with clang