Opened 3 years ago

Closed 7 months ago

#6676 closed defect (wontfix)

cpl_multiproc.h is part of the public interface depends on DEBUG

Reported by: karney Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: 2.1.1
Severity: normal Keywords: configuration
Cc:

Description

The gdal build depends on a private macro DEBUG. This is used in a public interface file port/pl_multiproc.h, amongst other things, to govern the meaning of CPLMutex.

A client of gdal will get linker errors unless it defines DEBUG similarly. The is problematic since the need to do this is undocumented and GDAL should not usurp such an obvious name.

As a workaround, I used

ifndef NDEBUG
// Needed by cpl_multiproc.h
#define DEBUG 1
#endif
#include "cpl_multiproc.h"
...

when compiling libLAS. But really GDAL should be fixed.

Change History (2)

comment:1 Changed 3 years ago by Even Rouault

Milestone: 2.1.2

Unmilestoning. DEBUG builds of GDAL aren't really meant at being installed.

Another way of addressing this would be to make sure our ABI doesn't change with DEBUG

comment:2 Changed 7 months ago by Even Rouault

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub?. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.