Bug 25502 - bad patch in gdal spec for libproj
Summary: bad patch in gdal spec for libproj
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2019-09-30 09:38 CEST by eric gerbier
Modified: 2019-10-06 18:33 CEST (History)
5 users (show)

See Also:
Source RPM: gdal-2.4.1-2.mga7.src.rpm
CVE:
Status comment:


Attachments

Description eric gerbier 2019-09-30 09:38:58 CEST
Description of problem:
I'am trying to install the sf module for R (https://cran.r-project.org/web/packages/sf/), and the configure returns a gdal error

here is the source code from the configure :

cat > gdal_proj.cpp <<_EOCONF
#include <gdal.h>
#include <ogr_srs_api.h>
#include <ogr_spatialref.h>
int main(int argc, char *argv[]) {
        OGRSpatialReference *dest = new OGRSpatialReference;
        OGRSpatialReference *src = new OGRSpatialReference;
    src->importFromEPSG(4326);
    dest->importFromEPSG(3857);
        OGRCoordinateTransformation *ct = OGRCreateCoordinateTransformation(src, dest);
        return(ct == NULL); // signals PROJ is not available through gdal
}
_EOCONF

g++ -I/usr/include/gdal -o gdal_proj gdal_proj.cpp -lgdal

prompt> ./gdal_proj
ERROR 6: Unable to load PROJ.4 library (libproj.so.13), creation of OGRCoordinateTransformation failed.

looking into gdal-2.4.1-2.mga7.src.rpm, the problem seems to come frome gdal-2.3.1-libname.patch patch

    --- gdal-2.3.1/ogr/ogrct.cpp~        2018-06-23 17:09:11.000000000 +0200
    +++ gdal-2.3.1/ogr/ogrct.cpp        2018-07-30 15:55:10.059763422 +0200
    @@ -124,7 +124,7 @@
     #elif defined(__APPLE__)
     #  define LIBNAME "libproj.dylib"
     #else
    -#  define LIBNAME "libproj.so"
    +#  define LIBNAME "libproj.so.13"
     #endif
 
     #endif // PROJ_VERSION == 4

on mageia 7, I have libproj.so.15 (linked to libproj.so)

$ ls /usr/lib64/libproj.so*
/usr/lib64/libproj.so@     /usr/lib64/libproj.so.15.1.0*
/usr/lib64/libproj.so.15@


If gdal rpm packlage is built without the gdal-2.3.1-libname.patch, the sf configure code does not return any more error


Version-Release number of selected component (if applicable):
gdal-2.4.1-2.mga7.src.rpm

How reproducible:
every time

Steps to Reproduce:
1. compile test code : g++ -I/usr/include/gdal -o gdal_proj gdal_proj.cpp -lgdal
2. execute test binary : ./gdal_proj
3.
Comment 1 Lewis Smith 2019-09-30 10:58:55 CEST
Thank you for this report.
Assigning to all packagers as 'gdal' has no registered maintainer.

Assignee: bugsquad => pkg-bugs

Comment 2 Jani Välimaa 2019-10-05 16:59:39 CEST
I have pushed gdal-2.4.1-2.1.mga7 with updated libname patch to core/updates_testing. Please test it.

I'd say dropping the patch is wrong as then the devel pkg of libproj must be installed as it provides the .so file. I don't know if it's the case anyway, though.

CC: (none) => jani.valimaa

Jani Välimaa 2019-10-05 21:09:36 CEST

Assignee: pkg-bugs => qa-bugs

Comment 3 Herman Viaene 2019-10-06 11:43:23 CEST
MGA7-64 Plasma on Lenovo B50
Installing gdal package draws in lib64gdal20
But after creating the gdal_proj.cpp file I get:
$ g++ -I/usr/include/gdal -o gdal_proj gdal_proj.cpp -lgdal
gdal_proj.cpp:1:10: fatale fout: gdal.h: Bestand of map bestaat niet
 #include <gdal.h>
          ^~~~~~~~
compilatie is beëindigd.
in English:fatal error, file or folder does not exist, compilation ended
Something missing ???
Checked urmpf, indicated devel package.
installed that and then:
$ g++ -I/usr/include/gdal -o gdal_proj gdal_proj.cpp -lgdal
$ ./gdal_proj
No further feedback, no error thus.
If this is conclusive, this can be OK'ed.

CC: (none) => herman.viaene

Comment 4 Len Lawrence 2019-10-06 12:44:47 CEST
@Herman, comment 3.
Courage mon ami.  You should add the OK.

CC: (none) => tarazed25

Comment 5 Herman Viaene 2019-10-06 14:11:45 CEST
Your wish is my command.

Whiteboard: (none) => MGA7-64-OK

Thomas Backlund 2019-10-06 17:41:02 CEST

Keywords: (none) => advisory, validated_update
CC: (none) => tmb, sysadmin-bugs

Comment 6 Mageia Robot 2019-10-06 18:33:46 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2019-0151.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.