Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scons: CUSTOM_LDFLAGS placed in incorrect order on linux #1799

Closed
springmeyer opened this issue Apr 4, 2013 · 8 comments
Closed

scons: CUSTOM_LDFLAGS placed in incorrect order on linux #1799

springmeyer opened this issue Apr 4, 2013 · 8 comments
Labels

Comments

@springmeyer
Copy link
Member

This seems like a linux specific scons bug. The result is that ldflags are placed way to early in the compile lines to work correctly - e.g. they are placed before any -L items.

This required a workaround in 84706d2#plugins/input/python and is the cause of this report: https://groups.google.com/group/mapnik/msg/eb319e7700e781e2?

@tsingi
Copy link

tsingi commented Feb 5, 2014

Couldn't add the boost locations by the prescribed method. A hard edit of the SConstruct file in the FindBoost function for BOOST variables, that were named differently from the CL instructions, got me a compile.

$ uname -a
Linux euclid.ott.aatm.local 3.11.10-100.fc18.x86_64 #1 SMP Mon Dec 2 20:28:38 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

./configure (SCons) tells me how to add the boost lib and include locations and then proceeds to ignore them.

See below.

Line 1: run configure with boost directories
On lines 16 & 17 dump shows they are not being used
Line 56: Tells me to do what I just did to fix the problem, which it ignores.

here is my cl output...

1 [rick@euclid mapnik]$ ./configure BOOST_INCLUDES=/usr/lib/boost/ BOOST_LIBS=/usr/lib/boost/stage/lib/
2 scons: Reading SConscript files ...
3
4 Welcome to Mapnik...
5
6 Configuring build environment...
7 Configuring on Linux in release mode...
8 Checking for freetype-config... yes
9 Checking for xml2-config... yes
10 Checking if compiler (g++) supports -std=c++11 flag... (cached) yes
11 Checking for C library z... yes
12 Checking for C++ library icuuc... yes
13 Checking for C++ library harfbuzz... yes
14 Checking for ICU version >= 4.2... found: icu 49.1
15 (cached) Searching for boost libs and headers... (cached)
16 Using default boost lib dir: /usr/lib
17 Using default boost include dir: /usr/include
18 Checking for C++ header file boost/version.hpp... no
19 Checking if boost_regex was built with ICU unicode support... (cached) no
20 Checking for C library jpeg... yes
21 Checking for C librarpython scons/scons.py y proj... no
22 Could not find optional header or shared library for proj
23 Checking for C library png... yes
24 Checking for C library webp... no
25 Could not find optional header or shared library for webp
26 Checking for C library tiff... no
27 Could not find optional header or shared library for tiff
28 Checking for pkg-config... yes
29 Checking for requested plugins dependencies...
30 Checking for C library sqlite3... yes
31 Checking if SQLite supports RTREE... (cached) yes
32 Checking if gdal is ogr enabled... no
33 Checking for pg_config... error: no result
34 no
35 Checking for gdal-config --libs... error: no result
36 no
37 Checking for cairo... yes
38 Checking for cairo lib and include paths... yes
39 Checking for cairo freetype font support ... yes
40
41 Exiting... the following required dependencies were not found:
42 - boost development headers (more info see: https://github.com/mapnik/mapnik/wiki/Mapnik-Installation & http://www.boost.org)
43
44 See '/home/rick/Desktop/dev/osm/mapnik/config.log' for details on possible problems.
45
46 Also, these OPTIONAL dependencies were not found:
47 - boost_regex_icu (libboost_regex built with optional ICU unicode support is needed for unicode regex support in mapnik.)
48 - proj (Proj.4 C Projections library | configure with PROJ_LIBS & PROJ_INCLUDES | more info: http://trac.osgeo.org/proj/)
49 - webp (WEBP C library | configure with WEBP_LIBS & WEBP_INCLUDES)
50 - tiff (TIFF C library | configure with TIFF_LIBS & TIFF_INCLUDES)
51 - ogr (OGR-enabled GDAL C++ Library | configured using gdal-config program | try setting GDAL_CONFIG SCons option | more info: https://github.com/mapnik/mapnik/wiki/OGR)
52 - pg_config (pg_config program | try setting PG_CONFIG SCons option)
53 - gdal-config (gdal-config program | try setting GDAL_CONFIG SCons option)
54
55 Set custom paths to these libraries and header files on the command-line or in a file called 'config.py'
56 ie. $ python scons/scons.py BOOST_INCLUDES=/usr/local/include BOOST_LIBS=/usr/local/lib
57
58 Once all required dependencies are found a local 'config.py' will be saved and then install:
59 $ sudo python scons/scons.py install
60
61 To view available path variables:
62 $ python scons/scons.py --help or -h
63
64 To view overall SCons help options:
65 $ python scons/scons.py --help-options or -H
66
67 More info: https://github.com/mapnik/mapnik/wiki/Mapnik-Installation

@springmeyer
Copy link
Member Author

@tsingi - yes, you are hitting a limitation in the boost detection. It can be worked around by passing your boost libs/includes directory in CUSTOM_CXXFLAGS and CUSTOM_LDFLAGS as discussed at #2124 (comment).

@springmeyer
Copy link
Member Author

@tsingi can you try building the latest 2.3.x branch to see if this fixes things for you: #2141

@tsingi
Copy link

tsingi commented Feb 7, 2014

Hi Dane.

Not sure what route this is taking, hope it gets to you.

At the moment the SVG you generate is extremely verbose. I'm going to
fix it for my purposes.

Would it be worthwhile if I were to make an effort improve the SVG
output filter for Mapnik in general? I can do that.

On 2/5/14, Dane Springmeyer notifications@github.com wrote:

Closed #1799.


Reply to this email directly or view it on GitHub:
#1799

@springmeyer
Copy link
Member Author

@tsingi - SVG output is, by default, through Cairo's SVG backend, so its not actionable to change this in mapnik. If you want to contribute development help them you should consider helping develop the native SVG renderer found in src/svg/output. It is not enabled by default however and does not handle text yet.

@tsingi
Copy link

tsingi commented Feb 7, 2014

I can do that. Is it a simple software switch to use svg/output/...?

Can you point me at helpful resources?
On 7 Feb 2014 15:28, "Dane Springmeyer" notifications@github.com wrote:

@tsingi https://github.com/tsingi - SVG output is, by default, through
Cairo's SVG backend, so its not actionable to change this in mapnik. If you
want to contribute development help them you should consider helping
develop the native SVG renderer found in src/svg/output. It is not
enabled by default however and does not handle text yet.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1799#issuecomment-34498731
.

@springmeyer
Copy link
Member Author

It is fairly undocumented meaning you'll need to look in the code a bit but to enable to ./configure SVG_RENDERER=true. Then see the https://github.com/mapnik/mapnik/blob/2.3.x/utils/svg2png/svg2png.cpp for how to hook into it in C++.

@tsingi
Copy link

tsingi commented Feb 11, 2014

Hi Dane.

Thanks for the help.

The lack of documentation makes this a bit difficult. I have an
output of my map, I'm writing a python script to manipulate it because
of time constraints. Still interested in doing the output filter
though.

I have a quite a bit to learn before I can attempt that.

The rest is an Idea I'm entertaining...

Is there an app to help you create the 'style.xml' file? It's a bit
ambitious, but if not I'd like to play with speccing that out. I'd have
to document to do it. I'm thinking of an SVG/websocket app that
interfaces with PostGIS. Currently I'm using shp files. The
interface would be a browser and it would be possible to host the
app on a server or run it locally.

I have written SVG mapping apps for air traffic control. I have already
discussed getting paid to do some of it if I can find the time at work
and I have some code of my own (not the companies) that would help
out a lot. It would be useful tool for us to have at work and it would be
a good platform to test out some of my SVG code.

If I haven't said so already, I'm one of the SVG spec authors and I've
worked on rendering code. I know my SVG.

This would be a bit of a commitment, your project is way cool but
difficult to use.

Any feedback, positive or negative would be appreciated.

We should prolly take this discussion offline.

                graham dot rick at gmail dot com

On 2/10/14, Dane Springmeyer notifications@github.com wrote:

It is fairly undocumented meaning you'll need to look in the code a bit but
to enable to ./configure SVG_RENDERER=true. Then see the
https://github.com/mapnik/mapnik/blob/2.3.x/utils/svg2png/svg2png.cpp for
how to hook into it in C++.


Reply to this email directly or view it on GitHub:
#1799 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants