Commit ee440ec3 authored by Cédric Traizet's avatar Cédric Traizet

Merge branch 'fix_debian' into 'develop'

Fix debian build

See merge request !677
parents 5e7f1e68 2e0cc4e0
Pipeline #3657 passed with stages
in 76 minutes and 18 seconds
ProjRef: GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AXIS["Latitude",NORTH],
AXIS["Longitude",EAST],
AUTHORITY["EPSG","4326"]]
Origin: [1943.5, 2364.5]
Spacing: [1, 1]
......@@ -57,10 +57,8 @@ private:
* Calls \c OGRRegisterAll().
*/
Drivers();
/** Destructor.
* Calls \c OGRCleanupAll().
*/
~Drivers();
/** Destructor. */
~Drivers() = default;
//@}
};
}
......
......@@ -33,8 +33,3 @@ otb::ogr::Drivers::Drivers()
{
OGRRegisterAll();
}
otb::ogr::Drivers::~Drivers()
{
OGRCleanupAll();
}
......@@ -49,10 +49,9 @@ GDALDriverManagerWrapper::GDALDriverManagerWrapper()
GDALDriverManagerWrapper::~GDALDriverManagerWrapper()
{
// calling GDALDestroyDriverManager() (or GDALDestroy) from the destructor of a
// static C++ object is unsafe.
// GDALDestroyDriverManager();
// Since gdal 2.4 we need to explicitely call GDALDestroy
// GDALDestroyDriverManager is called inside
GDALDestroy(); // gdaldllmain.cpp line 74
}
// Open the file for reading and returns a smart dataset pointer
......
diff -burN gdal-3.0.2_orig/ogr/ogr_proj_p.cpp gdal-3.0.2/ogr/ogr_proj_p.cpp
--- gdal-3.0.2_orig/ogr/ogr_proj_p.cpp 2020-01-31 16:40:41.908287799 +0100
+++ gdal-3.0.2/ogr/ogr_proj_p.cpp 2020-01-31 16:42:52.020291025 +0100
@@ -99,7 +99,7 @@
context = nullptr;
}
-#ifdef WIN32
+#if defined(WIN32) || defined(__APPLE__)
// Currently thread_local and C++ objects don't work well with DLL on Windows
static void FreeProjTLSContextHolder( void* pData )
{
--- gdal-2.4.1_orig/ogr/ogrsf_frmts/generic/ogrsfdriverregistrar.cpp
+++ gdal-2.4.1/ogr/ogrsf_frmts/generic/ogrsfdriverregistrar.cpp
@@ -83,7 +83,7 @@ int OGRwillNeverBeTrue = FALSE;
void OGRCleanupAll()
{
- GDALDestroyDriverManager();
+ GDALDestroy();
#if defined(WIN32) && defined(_MSC_VER)
// Horrible hack: for some reason MSVC doesn't export those classes&symbols
// if they are not referenced from the DLL itself
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment