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

Error unless ACCEPT_USE_OF_DEPRECATED_PROJ_API_H is #define'd #836

Closed
kbevers opened this issue Mar 5, 2018 · 8 comments
Closed

Error unless ACCEPT_USE_OF_DEPRECATED_PROJ_API_H is #define'd #836

kbevers opened this issue Mar 5, 2018 · 8 comments
Milestone

Comments

@kbevers
Copy link
Member

kbevers commented Mar 5, 2018

From version 6.0.0 proj_api.h will be deprecated. proj_api.h will not be included as a public header file from PROJ 7.0.0 and onwards. We want to make that clear from version 6.0.0 by requiring that users that want to use proj_api.h #define a macro like ACCEPT_USE_OF_DEPRECATED_PROJ_API_H. If the macro is not defined a compile-time error should be raised declaring that the user is including a deprecated API.

@kbevers kbevers added this to the 6.0.0 milestone Mar 5, 2018
kbevers added a commit to kbevers/PROJ that referenced this issue Sep 18, 2018
We want to flag that proj_api_h is now deprecated. With this commit
it is now mandatory to #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
before proj_api.h can be included.

proj_api.h is used internally a bunch of places. Therefore
ACCEPT_USE_OF_DEPRECATED_PROJ_API_H has been defined in projects.h
and a few other necessary files to ensure that PROJ compiles.

Closes OSGeo#836
kbevers added a commit to kbevers/PROJ that referenced this issue Sep 18, 2018
We want to flag that proj_api_h is now deprecated. With this commit
it is now mandatory to #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
before proj_api.h can be included.

proj_api.h is used internally a bunch of places. Therefore
ACCEPT_USE_OF_DEPRECATED_PROJ_API_H has been defined in projects.h
and a few other necessary files to ensure that PROJ compiles.

Closes OSGeo#836
kbevers added a commit to kbevers/PROJ that referenced this issue Sep 18, 2018
We want to flag that proj_api_h is now deprecated. With this commit
it is now mandatory to #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
before proj_api.h can be included.

proj_api.h is used internally a bunch of places. Therefore
ACCEPT_USE_OF_DEPRECATED_PROJ_API_H has been defined in projects.h
and a few other necessary files to ensure that PROJ compiles.

Closes OSGeo#836
@Komzpa
Copy link

Komzpa commented Dec 17, 2018

Hello,
I can't get Proj master working with PostGIS trunk. Please advise.
https://github.com/postgis/postgis/pull/354/files

@kbevers
Copy link
Member Author

kbevers commented Dec 17, 2018

Does the problem go away if you what's suggested in this comment: https://github.com/postgis/postgis/pull/354/files#r242068366

@Komzpa
Copy link

Komzpa commented Dec 17, 2018

Thank you. It's now working.

@wdma
Copy link

wdma commented Jul 24, 2019

Is there a way to define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H on the command line?

For example:
pip3 install -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H Cartopy

@snowman2
Copy link
Contributor

Maybe with:

ACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 pip3 install cartopy

@wdma
Copy link

wdma commented Jul 24, 2019

Thank you for the suggestion, but it did not work (same error).

In file included from lib/cartopy/_trace.h:27,
                 from lib/cartopy/trace.cpp:613:
/usr/include/proj_api.h:37:2: error: #error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
 #error 'To use the proj_api.h you must define the macro ACCEPT_USE_OF_DEPRECATED_PROJ_API_H'
  ^~~~~
error: command 'gcc' failed with exit status 1
----------------------------------------

@snowman2
Copy link
Contributor

This should work: SciTools/cartopy#1289 (comment)

@wdma
Copy link

wdma commented Jul 24, 2019 via email

clrpackages pushed a commit to clearlinux-pkgs/libspatialite that referenced this issue Aug 6, 2019
append DACCEPT_USE_OF_DEPRECATED_PROJ_API_H to CFLAGS to allow
the use of proj/api.h and reautospec the package to fix build
failure.

OSGeo/PROJ#836
naotaka-chikasada added a commit to naotaka-chikasada/jagurs that referenced this issue Dec 25, 2019
…EPRECATED_PROJ_API_H should be #define'd in mapproject.c.

NOTE: proj_api.h will not be included as a public header file from PROJ 7.0.0.
see more detail in OSGeo/PROJ#836
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

4 participants