Control: tags -1 patch On 2/21/21 1:21 PM, Bas Couwenberg wrote: > Your package FTBFS with PROJ 8.0.0: > > /usr/include/proj.h:123:4: error: #error "The proj_api.h header has been > removed from PROJ with version 8.0.0" > 123 | #error "The proj_api.h header has been removed from PROJ with > version 8.0.0" > | ^~~~~ > /usr/include/proj.h:345:23: error: conflicting declaration 'typedef struct > pj_ctx PJ_CONTEXT' > 345 | typedef struct pj_ctx PJ_CONTEXT; > | ^~~~~~~~~~ > In file included from /build/magics++-4.5.3/src/common/ProjP.cc:19: > /build/magics++-4.5.3/src/common/ProjP.h:18:26: note: previous declaration > as 'typedef struct projCtx_t PJ_CONTEXT' > 18 | typedef struct projCtx_t PJ_CONTEXT; > | ^~~~~~~~~~ > make[3]: *** [src/CMakeFiles/MagPlus.dir/build.make:4418: > src/CMakeFiles/MagPlus.dir/common/ProjP.cc.o] Error 1
The problem is twofold. ACCEPT_USE_OF_DEPRECATED_PROJ_API_H is still defined in d/rules, which triggers the first error. Since upstream uses proj.h, there is no need for this any more. Apply the changes in magics++_4.5.3-1.1.debdiff to fix this. The second error is fixed by disabling the typedefs for the conflicting declarations when PROJ_VERSION_MAJOR is >= 8. This is done by proj8.patch. Kind Regards, Bas -- GPG Key ID: 4096R/6750F10AE88D4AF1 Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
--- magics++-4.5.3/debian/rules 2021-01-21 13:39:40.000000000 +0100 +++ magics++-4.5.3/debian/rules 2021-02-21 13:05:37.000000000 +0100 @@ -7,8 +7,8 @@ # To enable all, uncomment following line # DEB_BUILD_MAINT_OPTIONS:= hardening=+all,-pie -CXXFLAGS:= -fPIC $(shell dpkg-buildflags --get CXXFLAGS) -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H # -std=c++14 -CFLAGS:= -fPIC $(shell dpkg-buildflags --get CFLAGS) -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 +CXXFLAGS:= -fPIC $(shell dpkg-buildflags --get CXXFLAGS) # -std=c++14 +CFLAGS:= -fPIC $(shell dpkg-buildflags --get CFLAGS) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) # Set for build reproducibility
--- a/src/common/ProjP.h +++ b/src/common/ProjP.h @@ -14,8 +14,10 @@ #include "magics.h" +#if PROJ_VERSION_MAJOR < 8 typedef struct PJconsts PJ; typedef struct projCtx_t PJ_CONTEXT; +#endif namespace magics { --- a/src/common/ProjP.cc +++ b/src/common/ProjP.cc @@ -16,8 +16,8 @@ Apr 06: update for GCC 4.0 (Stephan) */ -#include <ProjP.h> #include <proj.h> +#include <ProjP.h> using namespace magics;