[Kwiver-users] Can't build fletch with python support - GDAL link error

David Stoup david.stoup at kitware.com
Wed Aug 7 10:30:25 EDT 2019


Hi John,

It's hard to know what's going on for sure but I suspect GDAL is getting
confused about where to pick up it's deps. It happens quite a lot with
GDAL. It has a nasty habit of picking up libraries installed in one path,
say /usr/lib even when it's instructed to look elsewhere, e.g.
/home/jfm/anaconda3/lib/. I suspect /usr/lib/ has a libcurl.so that does
use openssl. It certainly happens a lot when building against a robust
conda environment. In cases like this one, I think the simplest thing to
try is just to create a very basic conda env for the purposes of building
fletch/kwiver. It should really only need numpy and scipy, I think. You
could try editing the file ... fletch_src/CMake/External_GDAL.cmake on
around line 158, where the ExternalProject_Add call inserts the
CONFIGURE_COMMAND. If you added --with-crypto=no to that line, it should
tell GDAL to avoid openssl, but if it's really getting confused and mixing
its libcurl.so, you might still get link errors. It's worth a try though.

The trouble with a build like fletch as it currently stands is, there
really isn't a clean way to provide all of these special cases in the
configure for each package without causing a mess in the configuration. I
had considered allowing a custom CMake file that would let users apply
custom config options to packages. We've done that elsewhere but I haven't
fully dug in to see what that would look like here.

Hope that helps! Let me know what you try though and whether is works. I am
always looking for useful bits of information so I know what sorts of
things are going wrong and what's fixing them.

-Dave



On Wed, Jul 31, 2019 at 2:34 PM John McKendry <john.mckendry at gmail.com>
wrote:

> fletch GDAL link problem with curl_openssl
> Ubuntu 18.04.2 64-bit, gcc 7.4.0
> I have previously built fletch and kwiver uneventfully with
> -Dfletch_ENABLE_ALL_PACKAGES.
> i tried to rebuild fletch adding -Dfletch_BUILD_WITH_PYTHON and I get
> errors trying to build GDAL. The whole log file is 48 pages, so I
> won't paste it here. This is the error section:
> [ 71%] Built target openjpeg
> [ 73%] Performing build step for 'GDAL'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_easy_getinfo at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_perform at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_cleanup at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_info_read at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_easy_perform at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_slist_free_all at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_easy_setopt at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_easy_init at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_fdset at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_slist_append at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_add_handle at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_version at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_remove_handle at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_setopt at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_easy_cleanup at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_init at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_version_info at CURL_OPENSSL_4'
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so: undefined
> reference to `curl_multi_wait at CURL_OPENSSL_4'
> collect2: error: ld returned 1 exit status
> # in build/build/src/GDAL/apps/
> GNUmakefile:82: recipe for target 'gdalinfo' failed
> make[4]: *** [gdalinfo] Error 1
> # in build/build/src/GDAL/
> GNUmakefile:105: recipe for target 'apps-target' failed
> make[3]: *** [apps-target] Error 2
> CMakeFiles/GDAL.dir/build.make:120: recipe for target
> 'build/src/GDAL-stamp/GDAL-build' failed
> make[2]: *** [build/src/GDAL-stamp/GDAL-build] Error 2
> CMakeFiles/Makefile2:1627: recipe for target 'CMakeFiles/GDAL.dir/all'
> failed
> make[1]: *** [CMakeFiles/GDAL.dir/all] Error 2
> Makefile:129: recipe for target 'all' failed
> make: *** [all] Error 2
>
> nm /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so |grep curl
>                  U curl_easy_cleanup@@CURL_OPENSSL_4
>                  U curl_easy_getinfo@@CURL_OPENSSL_4
>                  U curl_easy_init@@CURL_OPENSSL_4
>                  U curl_easy_perform@@CURL_OPENSSL_4
>                  U curl_easy_setopt@@CURL_OPENSSL_4
>                  U curl_multi_add_handle@@CURL_OPENSSL_4
>                  U curl_multi_cleanup@@CURL_OPENSSL_4
>                  U curl_multi_fdset@@CURL_OPENSSL_4
>                  U curl_multi_info_read@@CURL_OPENSSL_4
>                  U curl_multi_init@@CURL_OPENSSL_4
>                  U curl_multi_perform@@CURL_OPENSSL_4
>                  U curl_multi_remove_handle@@CURL_OPENSSL_4
>                  U curl_multi_setopt@@CURL_OPENSSL_4
>                  U curl_multi_wait@@CURL_OPENSSL_4
>                  U curl_slist_append@@CURL_OPENSSL_4
>                  U curl_slist_free_all@@CURL_OPENSSL_4
>                  U curl_version@@CURL_OPENSSL_4
>                  U curl_version_info@@CURL_OPENSSL_4
>
> ldd /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so |grep curl
> /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so:
> /home/jfm/anaconda3/lib/libcurl.so.4: no version information available
> (required by /home/jfm/fletch/build/build/src/GDAL/.libs/libgdal.so)
> libcurl.so.4 => /home/jfm/anaconda3/lib/libcurl.so.4 (0x00007f9abd587000)
>
>  nm -D /home/jfm/anaconda3/lib/libcurl.so.4  |grep multi
> 0000000000033b00 T curl_multi_add_handle
> 00000000000364b0 T curl_multi_assign
> 00000000000340d0 T curl_multi_cleanup
> 0000000000033270 T curl_multi_fdset
> 0000000000033420 T curl_multi_info_read
> 0000000000033230 T curl_multi_init
> 0000000000035b00 T curl_multi_perform
> 0000000000036270 T curl_multi_remove_handle
> 0000000000033570 T curl_multi_setopt
> 0000000000036090 T curl_multi_socket
> 00000000000360e0 T curl_multi_socket_action
> 0000000000036130 T curl_multi_socket_all
> 00000000000385b0 T curl_multi_strerror
> 0000000000033860 T curl_multi_timeout
> 00000000000333e0 T curl_multi_wait
>
> So as I read it, the libgdal that I built in build/src/GDAL/.libs is
> trying to resolve curl references that use openssl, and the libcurl.so
> that it's expecting to resolve those references doesn't use openssl.
> So can I configure fletch to use GDAL without openssl? Or should I
> build a new libcurl.so with openssl, and if so, how do I tell fletch
> to use that libcurl?
> _______________________________________________
> Kwiver-users mailing list
> Kwiver-users at public.kitware.com
> https://public.kitware.com/mailman/listinfo/kwiver-users
>


-- 
David Stoup
Principal Engineer

Kitware, Inc.

1712 Route 9, Suite 300
Clifton Park, NY 12065-3104
518-881-4949 (W)
518-312-3946 (M)
518-371-4573 (F)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/kwiver-users/attachments/20190807/5c196d28/attachment.html>


More information about the Kwiver-users mailing list