You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I tried to simulate what Re-configure by running "python scons/scons.py configure". has done by running that command manually. As I said, when I used ./configure prior to building, all dependencies were found or paths were found and automatically added (conveniently). But when running python scons/scons.py configure manually, it suddenly says that the path to ICU_DATA can not be found. Well, maybe this is due to a difference between calling ./configure and calling the local scons.py. Or due to somethings that were changed during the first part of the build.
I tried configuring it to run with the c++17 standard, but at this point I failed, probably because I wrote CXX_STD = '17' into the config.py file. Maybe i should prefix it with the c++.
Please help me:
Is the error actually being caused by using too old c++ standard for the code? Or is it something else?
Thanks!
Update 1
Somehow i missed a lot of dependencies, which previously went unreconized by ./configure, but when i ran it again, it pointed out al lot of missing packages. Convieniently, they are all listed on the Ubuntu Install Wiki. For some packages there were no installation candidates but suggested replacements, so installed those replacements.
Anyway, this does not fix the problem, the error persists, the only thing that is different is that it is now using the default compiler c++ instead of clang++ and therefore error message varies a little bit.
I found the way to pass the std=c++17 flag: Running
./configure CXX_STD="17"
seems to work! The compiler operates with the -std=c++17 flag. The error does not reappear! Yay.
So we are making it through compilation, but next problems show up.
c++ -o demo/c++/rundemo demo/c++/rundemo.o -Ldeps/agg -Lsrc -Lsrc/json -Lsrc/wkt -Lfreetype -L/usr/lib -L/usr/lib/x86_64-linux-gnu -lmapnik -lagg -lboost_regex -lcairo -lpng -lproj -lsqlite3 -ltiff -lwebp -licui18n -lharfbuzz -ljpeg -licuuc -lfreetype -lz -ldl -lsqlite3 -lpthread
/usr/bin/ld: demo/c++/rundemo.o: in function `main':
rundemo.cpp:(.text.startup+0x26a2): undefined reference to `mapnik::feature_style_processor<mapnik::agg_renderer<mapnik::image<mapnik::rgba8_t>, mapnik::label_collision_detector4> >::apply(double)'
/usr/bin/ld: rundemo.cpp:(.text.startup+0x2ac3): undefined reference to `mapnik::feature_style_processor<mapnik::cairo_renderer<std::shared_ptr<_cairo> > >::apply(double)'
collect2: error: ld returned 1 exit status
scons: *** [demo/c++/rundemo] Error 1
scons: building terminated because of errors.
make: *** [Makefile:48: mapnik] Fehler 2
At this point, I might give up.
Update 3
Wait no, there is hope: Issue #4243 could be the solution, even though open since 2021. This involves changing out 3 files, e.g. patching some holes. With the Fixes in that Issue it managed to build completely! But let's test it.
Unfortunately, the next misery awaits:
upon make test, many tests fail
The text was updated successfully, but these errors were encountered:
luk-brue
changed the title
Build error
Build error(s): Use C++17 instead of C++14 for compilation
Sep 16, 2023
Also see my SO Post.
When I want to build current master from source on my Linux Mint 21.2 machine, there is an error coming up.
This is what I tried:
So,
./configure
says I have all dependencies. So i go ahead andmake
.First part of the build goes well, although there were 26 warnings mostly about unary functions being deprecated.
Then we come to the output below:
Somehow,
scons
is rerunning configuration for some reasons I don't know. Well ok.Then you see
clang++
being called with the-std=c++14
flag.Then you see the error at the end of the output:
std::filesystem
is not recognized as a namespace name.What could be the cause of this?
Someone on SO suggested that the filesystem library is implemented only since c++17.
Here is what I tried
First of all, I tried to simulate what
Re-configure by running "python scons/scons.py configure".
has done by running that command manually. As I said, when I used./configure
prior to building, all dependencies were found or paths were found and automatically added (conveniently). But when runningpython scons/scons.py configure
manually, it suddenly says that the path toICU_DATA
can not be found. Well, maybe this is due to a difference between calling./configure
and calling the localscons.py
. Or due to somethings that were changed during the first part of the build.I tried configuring it to run with the
c++17
standard, but at this point I failed, probably because I wroteCXX_STD = '17'
into theconfig.py
file. Maybe i should prefix it with thec++
.Please help me:
Is the error actually being caused by using too old c++ standard for the code? Or is it something else?
Thanks!
Update 1
Somehow i missed a lot of dependencies, which previously went unreconized by
./configure
, but when i ran it again, it pointed out al lot of missing packages. Convieniently, they are all listed on the Ubuntu Install Wiki. For some packages there were no installation candidates but suggested replacements, so installed those replacements.Anyway, this does not fix the problem, the error persists, the only thing that is different is that it is now using the default compiler
c++
instead ofclang++
and therefore error message varies a little bit.Update 2
I found the way to pass the
std=c++17
flag: Runningseems to work! The compiler operates with the
-std=c++17
flag. The error does not reappear! Yay.So we are making it through compilation, but next problems show up.
At this point, I might give up.
Update 3
Wait no, there is hope: Issue #4243 could be the solution, even though open since 2021. This involves changing out 3 files, e.g. patching some holes. With the Fixes in that Issue it managed to build completely! But let's test it.
Unfortunately, the next misery awaits:
upon
make test
, many tests failThe text was updated successfully, but these errors were encountered: