Opened 7 years ago

Closed 7 months ago

#56429 closed defect (fixed)

mapnik @3.0.19_1+gdal+libxml2+postgis+sqlite: Missing proj4 supports

Reported by: dmarteau (David Marteau) Owned by: macports@…
Priority: Normal Milestone:
Component: ports Version: 2.4.3
Keywords: Cc: stromnov (Andrey Stromnov), cooljeanius (Eric Gallager)
Port: mapnik

Description

Trying to run mapnik-python against macport installed mapnik library leads to the following error

RuntimeError: Cannot initialize proj_transform for given projections without proj4 support
(-DMAPNIK_USE_PROJ4): '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 
+units=m +nadgrids=@null +no_defs'->'+proj=lcc +ellps=GRS80 +lat_0=49 +lon_0=-95 +lat+1=49 +lat_2=77 
+datum=NAD83 +units=m +no_defs'

mapnik-config --cflags --cxxflags return the following

-I/opt/local/include -I/opt/local/include/mapnik/agg -I/opt/local/include/mapnik -I/opt/local/include 
-I/opt/local/include/freetype2 -I/opt/local/include/libxml2 -I/opt/local/include/postgresql10 
-DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DHAVE_PNG 
-DHAVE_WEBP -DHAVE_TIFF -DDARWIN -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 
-DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DGRID_RENDERER 
-DHAVE_LIBXML2 -std=c++11 -stdlib=libc++ -Os -stdlib=libc++ -fvisibility=hidden 
-fvisibility-inlines-hidden -Wall -ftemplate-depth-300 -Wsign-compare -Wshadow -O3
-std=c++11 -stdlib=libc++ -Os -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden -Wall
 -ftemplate-depth-300 -Wsign-compare -Wshadow -O3

In appears that mapnik is not compiled wint proj4 supports and there is no variants for enabling this.

Please could you add MAPNIK_USE_PROJ4 supports as variant ?

Thanks.

Change History (5)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Cc: stromnov added; macports@… stromnov@… removed
Owner: set to macports@…
Status: newassigned
Type: enhancementdefect

proj4 is in the dependancies but it is not apparently getting used.

$ port info --depends mapnik
depends_test: 
depends_build: pkgconfig
depends_patch: 
depends_run: 
depends_fetch: 
depends_lib: boost, harfbuzz, icu, libpng, jpeg, tiff, webp, zlib, freetype, proj4
depends_extract: 

comment:2 Changed 7 years ago by dmarteau (David Marteau)

It appears the PROJ option is enabled by default in mapnik build configuration but the proj library is not able to find it:

...
Checking for C library proj... no
...

comment:3 Changed 7 years ago by dmarteau (David Marteau)

I have found that the Portfile define the wrong path for PROJ_INCLUDES and PROJ_LIBS since proj4 and proj (proj5) are in their respecctive install directory.

see https://github.com/macports/macports-ports/blob/master/gis/mapnik/Portfile#L111

comment:4 Changed 2 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:5 Changed 7 months ago by nilason (Nicklas Larsson)

Resolution: fixed
Status: assignedclosed

In 9f9bfb5055434c29c3276586d801701b18920787/macports-ports (master):

mapnik: enable on ARM; update to proj7, postgresql15 dependencies

Closes #56429

Note: See TracTickets for help on using tickets.