[gdal-dev] Unable to compile Gdal under Cygwin
Even Rouault
even.rouault at spatialys.com
Sun Nov 1 07:37:42 PST 2015
Le samedi 31 octobre 2015 18:44:43, Dr Rainer Woitok a écrit :
> Even,
>
> it took me a while to get back to my Gdal project ...
>
> On Sunday, 2015-10-11 16:57:05 +0200, you wrote:
> > ...
> > Ah, yes I guess it comes from latest proj version where the soname was
> > bumped. Well you can safely rename/copy cygproj-10.dll as cygproj-0.dll
> > to please what is currently hardcoded in ogr/ogrct.cpp
>
> Going on with testing I found another file using the wrong library name,
> causing me to locally apply the following patch:
>
> diff --git a/autotest/osr/osr_proj4.py b/autotest/osr/osr_proj4.py
> --- a/autotest/osr/osr_proj4.py
> +++ b/autotest/osr/osr_proj4.py
> @@ -58,13 +58,13 @@
> return have_proj480_flag
>
> handle = None
> - for name in ["libproj.so", "proj.dll", "libproj-0.dll",
> "libproj.dylib"]: + for name in ["cygproj-10.dll", "libproj.so",
> "proj.dll", "libproj-0.dll", "libproj.dylib"]: try:
> handle = ctypes.cdll.LoadLibrary(name)
> except:
> pass
> if handle is None:
> - print('cannot load libproj.so, proj.dll, libproj-0.dll or
> libproj.dylib') + print('cannot load cygproj-10.dll, libproj.so,
> proj.dll, libproj-0.dll or libproj.dylib') have_proj480_flag = False
> return have_proj480_flag
I've intergrated the above
>
> diff --git a/ogr/ogrct.cpp b/ogr/ogrct.cpp
> --- a/ogr/ogrct.cpp
> +++ b/ogr/ogrct.cpp
> @@ -95,7 +95,7 @@
> // components were buit in the same way.
> # define LIBNAME "libproj-0.dll"
> #elif defined(__CYGWIN__)
> -# define LIBNAME "cygproj-0.dll"
> +# define LIBNAME "cygproj-10.dll"
> #elif defined(__APPLE__)
> # define LIBNAME "libproj.dylib"
> #else
>
> Mind that this is NOT a suggestion as to how this should be patched up-
> stream! This should probably be dealt with somewhere in "configure".
As I said before, I'd rather suggest you use --with-static-proj4 instead,
which contrary to what its name suggest, does classic library linking (dynamic
or static depending on what is available)
The LIBNAME might depend on the proj version. cygproj-10.dll must be for proj
4.9.1 (or 4.9.2). Older should be cygproj-0.dll. You can also define the PROJSO
environment variable to point to the actual filename.
>
> Next problem: file "autotest/GNUmakefile" suggests "Run 'make -j test'".
> Generally speaking I would never use "make -j" without "-O". But apart
> from that the Gdal test suite started with "make -C autotest -j test"
> (with or without "-O") almost drove me crazy :-) yielding irreproduc-
> ible results as in:
Yes parallel make in autotest is unreliable. Was mostly an experiment but some
tests have interferences.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list