[gdal-dev] Building gdal master with proj master

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Building gdal master with proj master

Nyall Dawson
Hi list,

Trying to build gdal master using proj master today I'm unable to
resolve a bunch of "undefined reference to
`proj_create_conversion_oblique_stereographic'" style errors. I think
my issues come from trying to keep the custom proj build isolated from
my system version, but I'm stumped in how to fix this....

My build process is:

Proj:

./configure --prefix=/home/nyall/dev/build-proj
make
make install

GDAL:

./configure --prefix=/home/nyall/dev/build-gdal/
--with-proj=/home/nyall/dev/build-proj
make

Results in:

/bin/sh /home/nyall/dev/gdal/gdal/libtool --mode=compile --silent
--tag=CXX g++ -I/home/nyall/dev/gdal/gdal/port
-I/home/nyall/dev/gdal/gdal/gcore -I/home/nyall/dev/gdal/gdal/alg
-I/home/nyall/dev/gdal/gdal/ogr
-I/home/nyall/dev/gdal/gdal/ogr/ogrsf_frmts
-I/home/nyall/dev/gdal/gdal/gnm -I/home/nyall/dev/gdal/gdal/apps
-DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME
-DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self
-Wunused-parameter -Wformat -Werror=format-security
-Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time
-Wnull-dereference -Wduplicated-cond -Wextra-semi -Wfloat-conversion
-Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual
-fno-operator-names -Wzero-as-null-pointer-constant -Wsuggest-override
-Wimplicit-fallthrough  -I/home/nyall/dev/gdal/gdal/frmts/vrt
-DGNM_ENABLED -I/home/nyall/dev/gdal/gdal/port
-I/usr/include/openjpeg-2.3   -DGDAL_COMPILATION
-I/home/nyall/dev/gdal/gdal/ogr/ogrsf_frmts/geojson/libjson
-I/home/nyall/dev/gdal/gdal/ogr/ogrsf_frmts/geojson
-I/home/nyall/dev/gdal/gdal/ogr/ogrsf_frmts/generic
-I/home/nyall/dev/gdal/gdal/gnm -DHAVE_GEOS=1 -I/usr/include -c -o
gdaladdo.lo gdaladdo.cpp
/usr/bin/ld: /home/nyall/dev/gdal/gdal/.libs/libgdal.so: undefined
reference to `proj_create_conversion_oblique_stereographic'
...
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:82: gdalinfo] Error 1

Any clues what I'm missing here?

Thanks,
Nyall
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building gdal master with proj master

Andrew C Aitchison-2


On Mon, 29 Apr 2019, Nyall Dawson wrote:

> Hi list,
>
> Trying to build gdal master using proj master today I'm unable to
> resolve a bunch of "undefined reference to
> `proj_create_conversion_oblique_stereographic'" style errors. I think
> my issues come from trying to keep the custom proj build isolated from
> my system version, but I'm stumped in how to fix this....
>
> My build process is:
>
> Proj:
>
> ./configure --prefix=/home/nyall/dev/build-proj
> make
> make install
>
> GDAL:
>
> ./configure --prefix=/home/nyall/dev/build-gdal/
> --with-proj=/home/nyall/dev/build-proj
> make
>
> Results in:
>
> /bin/sh /home/nyall/dev/gdal/gdal/libtool --mode=compile --silent
> --tag=CXX g++ -I/home/nyall/dev/gdal/gdal/port
> -I/home/nyall/dev/gdal/gdal/gcore -I/home/nyall/dev/gdal/gdal/alg
> -I/home/nyall/dev/gdal/gdal/ogr
> -I/home/nyall/dev/gdal/gdal/ogr/ogrsf_frmts
> -I/home/nyall/dev/gdal/gdal/gnm -I/home/nyall/dev/gdal/gdal/apps
> -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME
> -DHAVE_SSE_AT_COMPILE_TIME -g -O2  -Wall -Wextra -Winit-self
> -Wunused-parameter -Wformat -Werror=format-security
> -Wno-format-nonliteral -Wlogical-op -Wshadow -Werror=vla -Wdate-time
> -Wnull-dereference -Wduplicated-cond -Wextra-semi -Wfloat-conversion
> -Wmissing-declarations -Wnon-virtual-dtor -Woverloaded-virtual
> -fno-operator-names -Wzero-as-null-pointer-constant -Wsuggest-override
> -Wimplicit-fallthrough  -I/home/nyall/dev/gdal/gdal/frmts/vrt
> -DGNM_ENABLED -I/home/nyall/dev/gdal/gdal/port
> -I/usr/include/openjpeg-2.3   -DGDAL_COMPILATION
> -I/home/nyall/dev/gdal/gdal/ogr/ogrsf_frmts/geojson/libjson
> -I/home/nyall/dev/gdal/gdal/ogr/ogrsf_frmts/geojson
> -I/home/nyall/dev/gdal/gdal/ogr/ogrsf_frmts/generic
> -I/home/nyall/dev/gdal/gdal/gnm -DHAVE_GEOS=1 -I/usr/include -c -o
> gdaladdo.lo gdaladdo.cpp
> /usr/bin/ld: /home/nyall/dev/gdal/gdal/.libs/libgdal.so: undefined
> reference to `proj_create_conversion_oblique_stereographic'
> ...
> collect2: error: ld returned 1 exit status
> make[1]: *** [GNUmakefile:82: gdalinfo] Error 1
>
> Any clues what I'm missing here?

I think that configure assumes that libtool will add
/home/nyall/dev/build-proj/lib/libinternalproj.so

I see that my equivalent of
  /home/nyall/dev/build-proj/lib/pkgconfig/proj.pc
has
  Libs: -L${libdir} -lproj
but no mention of
  -linternalproj

--
Andrew C. Aitchison Cambridge, UK
  [hidden email]
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building gdal master with proj master

Richard Duivenvoorde
In reply to this post by Nyall Dawson
On 29/04/2019 03.26, Nyall Dawson wrote:
> Hi list,
>
> Trying to build gdal master using proj master today I'm unable to
> resolve a bunch of "undefined reference to
> `proj_create_conversion_oblique_stereographic'" style errors. I think
> my issues come from trying to keep the custom proj build isolated from
> my system version, but I'm stumped in how to fix this....

Hi Nyall,

I build both gdal master and proj 6 last week (25th), using instructions
here:
https://trac.osgeo.org/gdal/wiki/BuildingOnUnixGDAL25dev

If on a machine having another (distro) proj around you have to go
through this renaming piece if I'm correct (well, Even told me :-) )

I used:

export LD_LIBRARY_PATH=/home/richard/bin/proj/lib:$LD_LIBRARY_PATH

./configure --prefix=/home/richard/bin/gdal
--with-proj=/home/richard/bin/proj --without-libtool --with-python
--without-ogdi

Be sure (below is Even's text...) to see:

# when configuring gdal
checking for PROJ >= 6 library... checking for proj_create_from_wkt in
-lproj... no  <== this is funny, tough, because I have 6.0 ....
checking for proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -linternalproj... yes  <== !!!

# check if libgdal.so is gelinked is with that libinternalproj:
cd /home/richard/bin/gdal/lib
export LD_LIBRARY_PATH=/home/richard/bin/proj/lib:$LD_LIBRARY_PATH
# make sure there is no /home/richard/bin/proj/lib/libproj.* files .
Only libinternalproj.so*
ldd libgdal.so | grep proj
       libinternalproj.so =>
/home/richard/bin/proj/lib/libinternalproj.so (0x00007f672346d000)

Hope this helps.

Regards,

Richard Duivenvoorde

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Building gdal master with proj master

Nyall Dawson
On Mon, 29 Apr 2019 at 16:10, Richard Duivenvoorde <[hidden email]> wrote:

>
> On 29/04/2019 03.26, Nyall Dawson wrote:
> > Hi list,
> >
> > Trying to build gdal master using proj master today I'm unable to
> > resolve a bunch of "undefined reference to
> > `proj_create_conversion_oblique_stereographic'" style errors. I think
> > my issues come from trying to keep the custom proj build isolated from
> > my system version, but I'm stumped in how to fix this....
>
> Hi Nyall,
>
> I build both gdal master and proj 6 last week (25th), using instructions
> here:
> https://trac.osgeo.org/gdal/wiki/BuildingOnUnixGDAL25dev
>
> If on a machine having another (distro) proj around you have to go
> through this renaming piece if I'm correct (well, Even told me :-) )
>
> I used:
>
> export LD_LIBRARY_PATH=/home/richard/bin/proj/lib:$LD_LIBRARY_PATH
>
> ./configure --prefix=/home/richard/bin/gdal
> --with-proj=/home/richard/bin/proj --without-libtool --with-python
> --without-ogdi
>
> Be sure (below is Even's text...) to see:
>
> # when configuring gdal
> checking for PROJ >= 6 library... checking for proj_create_from_wkt in
> -lproj... no  <== this is funny, tough, because I have 6.0 ....
> checking for proj_create_from_wkt in -lproj... no
> checking for internal_proj_create_from_wkt in -lproj... no
> checking for internal_proj_create_from_wkt in -lproj... no
> checking for internal_proj_create_from_wkt in -linternalproj... yes  <== !!!
>
> # check if libgdal.so is gelinked is with that libinternalproj:
> cd /home/richard/bin/gdal/lib
> export LD_LIBRARY_PATH=/home/richard/bin/proj/lib:$LD_LIBRARY_PATH
> # make sure there is no /home/richard/bin/proj/lib/libproj.* files .
> Only libinternalproj.so*
> ldd libgdal.so | grep proj
>        libinternalproj.so =>
> /home/richard/bin/proj/lib/libinternalproj.so (0x00007f672346d000)

Thanks, this is very helpful!

I think my issue stems from ONLY having libproj.* in my proj build
folder -- I don't see any libinternalproj objects. I'll try the
instructions from the wiki page and see if rebuilding proj with those
flags helps.

Thank you!
Nyall
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev