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

Install problem with 'mapnik::proj_transform' #250

Open
JBacc1 opened this issue Dec 15, 2021 · 4 comments
Open

Install problem with 'mapnik::proj_transform' #250

JBacc1 opened this issue Dec 15, 2021 · 4 comments

Comments

@JBacc1
Copy link

JBacc1 commented Dec 15, 2021

Install of python-mapnik failed with errors citing 'mapnik::proj_transform' at: sudo python3 setup.py install

I'm no linux specialist, but last command run was:
clang++ -DNDEBUG -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c src/mapnik_proj_transform.cpp -o build/temp.linux-x86_64-3.7/src/mapnik_proj_transform.o -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/include/mapnik/deps -I/home/jb/OSM/mapnik/mason_packages/.link/include -I/home/jb/OSM/mapnik/mason_packages/.link/include/freetype2 -I/home/jb/OSM/mapnik/mason_packages/.link/include/libpng16 -I/home/jb/OSM/mapnik/mason_packages/linux-x86_64/libgdal/2.2.3/include -I/home/jb/OSM/mapnik/mason_packages/.link/include/cairo -I/home/jb/OSM/mapnik/mason_packages/.link/include/pixman-1 -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ -DMAPNIK_PROJ_VERSION=70201 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -DSVG_RENDERER -std=c++14 -DU_USING_ICU_NAMESPACE=0 -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility-inlines-hidden -pthread -ftemplate-depth-300 -O3

with error message:

src/mapnik_proj_transform.cpp:51:44: error: no member named 'source' in 'mapnik::proj_transform'
        return boost::python::make_tuple(p.source(),p.dest());
                                         ~ ^
src/mapnik_proj_transform.cpp:51:55: error: no member named 'dest' in 'mapnik::proj_transform'                                      
        return boost::python::make_tuple(p.source(),p.dest());
                                                    ~ ^
src/mapnik_proj_transform.cpp:65:27: error: no member named 'source' in 'mapnik::proj_transform'                                    
          << "from " << t.source().params() << " to: " << t.dest().params();
                        ~ ^
src/mapnik_proj_transform.cpp:65:61: error: no member named 'dest' in 'mapnik::proj_transform'                                      
          << "from " << t.source().params() << " to: " << t.dest().params();
                                                          ~ ^
src/mapnik_proj_transform.cpp:79:28: error: no member named 'dest' in 'mapnik::proj_transform'                                      
          << "from " <<  t.dest().params() << " to: " << t.source().params();
                         ~ ^
src/mapnik_proj_transform.cpp:79:60: error: no member named 'source' in 'mapnik::proj_transform'                                    
          << "from " <<  t.dest().params() << " to: " << t.source().params();
                                                         ~ ^
src/mapnik_proj_transform.cpp:91:27: error: no member named 'source' in 'mapnik::proj_transform'                                    
          << "from " << t.source().params() << " to: " << t.dest().params();
                        ~ ^
src/mapnik_proj_transform.cpp:91:61: error: no member named 'dest' in 'mapnik::proj_transform'                                      
          << "from " << t.source().params() << " to: " << t.dest().params();
                                                          ~ ^
src/mapnik_proj_transform.cpp:103:28: error: no member named 'dest' in 'mapnik::proj_transform'                                     
          << "from " <<  t.dest().params() << " to: " << t.source().params();
                         ~ ^
src/mapnik_proj_transform.cpp:103:60: error: no member named 'source' in 'mapnik::proj_transform'                                   
          << "from " <<  t.dest().params() << " to: " << t.source().params();
                                                         ~ ^
src/mapnik_proj_transform.cpp:115:27: error: no member named 'source' in 'mapnik::proj_transform'                                   
          << "from " << t.source().params() << " to: " << t.dest().params();
                        ~ ^
src/mapnik_proj_transform.cpp:115:61: error: no member named 'dest' in 'mapnik::proj_transform'                                     
          << "from " << t.source().params() << " to: " << t.dest().params();
                                                          ~ ^
src/mapnik_proj_transform.cpp:127:28: error: no member named 'dest' in 'mapnik::proj_transform'                                     
          << "from " <<  t.dest().params() << " to: " << t.source().params();
                         ~ ^
src/mapnik_proj_transform.cpp:127:60: error: no member named 'source' in 'mapnik::proj_transform'                                   
          << "from " <<  t.dest().params() << " to: " << t.source().params();
                                                         ~ ^
14 errors generated.                                                                                                                
error: command 'clang++' failed with exit status 1

Don't know if more info is needed, but I'm in a dead end.

@mathisloge
Copy link
Collaborator

looks like you are using mapnik@master to build python-mapnik.

mapnik@master have been updated to support proj >7.2.0 and therefore had some breaking changes.

You would need to change all occurences of << "from " << t.dest().params() << " to: " << t.source().params() to << proj_transform_->definition()

Or pull the proj6 branch in.

@JBacc1
Copy link
Author

JBacc1 commented Dec 16, 2021

Hello,
Thanks for your answer. I changed the mapnik_proj_transform.cpp as you adviced, but the errors are still there. Are there other files to check as well?
Or I'll have to dig deeper and find how to get the proj6 be used. Or wait for the mapnik and python-mapnik to be compatible.
Thanks,
JB.
For completion, the command clang++ -DNDEBUG -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c src/mapnik_proj_transform.cpp -o build/temp.linux-x86_64-3.7/src/mapnik_proj_transform.o -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/include/mapnik/deps -I/home/jb/OSM/mapnik/mason_packages/.link/include -I/home/jb/OSM/mapnik/mason_packages/.link/include/freetype2 -I/home/jb/OSM/mapnik/mason_packages/.link/include/libpng16 -I/home/jb/OSM/mapnik/mason_packages/linux-x86_64/libgdal/2.2.3/include -I/home/jb/OSM/mapnik/mason_packages/.link/include/cairo -I/home/jb/OSM/mapnik/mason_packages/.link/include/pixman-1 -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ -DMAPNIK_PROJ_VERSION=70201 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -DSVG_RENDERER -std=c++14 -DU_USING_ICU_NAMESPACE=0 -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility-inlines-hidden -pthread -ftemplate-depth-300 -O3

will get:

src/mapnik_proj_transform.cpp:51:44: error: no member named 'source' in 'mapnik::proj_transform'
        return boost::python::make_tuple(p.source(),p.dest());
                                         ~ ^
src/mapnik_proj_transform.cpp:51:55: error: no member named 'dest' in 'mapnik::proj_transform'                                      
        return boost::python::make_tuple(p.source(),p.dest());
                                                    ~ ^
src/mapnik_proj_transform.cpp:65:14: error: 'proj_transform' does not refer to a value                                              
          << proj_transform->definition();
             ^
/usr/local/include/mapnik/proj_transform.hpp:38:19: note: declared here                                                             
class MAPNIK_DECL proj_transform : private util::noncopyable
                  ^
src/mapnik_proj_transform.cpp:80:4: error: 'proj_transform' does not refer to a value                                               
<< proj_transform->definition();
   ^
/usr/local/include/mapnik/proj_transform.hpp:38:19: note: declared here                                                             
class MAPNIK_DECL proj_transform : private util::noncopyable
                  ^
src/mapnik_proj_transform.cpp:93:4: error: 'proj_transform' does not refer to a value                                               
<< proj_transform->definition();
   ^
/usr/local/include/mapnik/proj_transform.hpp:38:19: note: declared here                                                             
class MAPNIK_DECL proj_transform : private util::noncopyable
                  ^
src/mapnik_proj_transform.cpp:106:4: error: 'proj_transform' does not refer to a value                                              
<< proj_transform->definition();
   ^
/usr/local/include/mapnik/proj_transform.hpp:38:19: note: declared here                                                             
class MAPNIK_DECL proj_transform : private util::noncopyable
                  ^
src/mapnik_proj_transform.cpp:119:4: error: 'proj_transform' does not refer to a value                                              
<< proj_transform->definition();
   ^
/usr/local/include/mapnik/proj_transform.hpp:38:19: note: declared here                                                             
class MAPNIK_DECL proj_transform : private util::noncopyable
                  ^
src/mapnik_proj_transform.cpp:132:4: error: 'proj_transform' does not refer to a value                                              
<< proj_transform->definition();
   ^
/usr/local/include/mapnik/proj_transform.hpp:38:19: note: declared here                                                             
class MAPNIK_DECL proj_transform : private util::noncopyable
                  ^
8 errors generated.                                                                                                                 
error: command 'clang++' failed with exit status 1

@mathisloge
Copy link
Collaborator

you need to use the correct variables. ca66af6 and feec9af are looking like the necessary changes you would need to apply. But you can also just merge proj6 branch into your local master branch.

@braandl
Copy link

braandl commented Dec 11, 2023

looks like you are using mapnik@master to build python-mapnik.

mapnik@master have been updated to support proj >7.2.0 and therefore had some breaking changes.

You would need to change all occurences of << "from " << t.dest().params() << " to: " << t.source().params() to << proj_transform_->definition()

Or pull the proj6 branch in.

I do get the same error with proj@9.2.1 and any other version I tried. Any ideas?

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

No branches or pull requests

3 participants