[R-sig-Geo] Errors at installing rgdal on Debian Buster
Roger Bivand
Roger.Bivand at nhh.no
Wed Sep 13 14:11:28 CEST 2017
On Wed, 13 Sep 2017, Agustin Lobo wrote:
> The problem seems to be related to the compiler. I had:
> gcc version 5.3.1 20160101 (Debian 5.3.1-5)
>
> I have now:
> gcc version 7.2.0 (Debian 7.2.0-4)
>
> All weird previus errors are gone but I still have:
> configure: PROJ.4 version: 4.8.0
> ./configure: line 3725: 8390 Segmentation fault ./proj_conf_test
> checking PROJ.4: epsg found and readable... yes
> ./configure: line 3800: 8399 Segmentation fault ./proj_conf_test
>
> and finally
>
> ** testing if installed package can be loaded
> Fatal error: glibc detected an invalid stdio handle
> Aborted
> ERROR: loading failed
> * removing ‘/home/alobo/R/i686-pc-linux-gnu-library/3.3/rgdal’
>
> Surprisingly, I do have 4.9 installed, not 4.8:
>
> $ dpkg -s proj-bin
> Package: proj-bin
> Status: install ok installed
> Priority: optional
> Section: science
> Installed-Size: 125
> Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
> Architecture: i386
> Source: proj
> Version: 4.9.3-2
>
> and
> $ proj
> Rel. 4.9.3, 15 August 2016
> usage: proj [ -bCeEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]
>
> and I cannot find proj_conf_test anywhere:
> $ sudo find / -name 'proj_conf_test'
> gives no result
>
> How is the test ./proj_conf_test done so that I can investigate why it
> results into PROJ 4.8 instead of 4.9?
It is defined in rgdal/configure.ac (line 273 ff.):
if test ${proj_version} -ge 480; then
[cat > proj_conf_test.c <<_EOCONF
#include <stdio.h>
#include <proj_api.h>
#if PJ_VERSION == 480
FILE *pj_open_lib(projCtx, const char *, const char *);
#endif
int main() {
#if PJ_VERSION <= 480
FILE *fp;
#else
PAFile fp;
#endif
projCtx ctx;
ctx = pj_get_default_ctx();
fp = pj_open_lib(ctx, "epsg", "rb");
if (fp == NULL) exit(1);
#if PJ_VERSION <= 480
fclose(fp);
#else
pj_ctx_fclose(ctx, fp);
#endif
exit(0);
}
_EOCONF]
else
[cat > proj_conf_test.c <<_EOCONF
#include <stdio.h>
#include <proj_api.h>
FILE *pj_open_lib(const char *, const char *);
int main() {
FILE *fp;
fp = pj_open_lib("epsg", "rb");
if (fp == NULL) exit(1);
fclose(fp);
exit(0);
}
_EOCONF]
fi
and checks that the crucial epsg file is present. It does seem to run,
though, which is puzzling - if you read configure.ac, you'll see that I
didn't guard against the previous (different) ./proj_conf_test already
existing - I'll revise the test names to avoid such false positives in the
future.
Roger
>
> Thanks
>
> Agus
>
>
>
> On Tue, Sep 12, 2017 at 1:49 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
>> $ g++ -v
>> ...
>> gcc version 7.1.1 20170622 (Red Hat 7.1.1-3) (GCC)
>>
>> in my case on Fedora 26.
>>
>> Recent versions should be OK, but < 5 may be problematic. If you have
>> upgraded in place but not upgraded the compile trains, installing r-base
>> will not force that.
>>
>>
>>
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
Editor-in-Chief of The R Journal, https://journal.r-project.org/index.html
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
More information about the R-sig-Geo
mailing list