Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libspatialite] Build error -- x64-linux-dynamic #25876

Closed
cbrl opened this issue Jul 19, 2022 · 6 comments
Closed

[libspatialite] Build error -- x64-linux-dynamic #25876

cbrl opened this issue Jul 19, 2022 · 6 comments
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.

Comments

@cbrl
Copy link
Contributor

cbrl commented Jul 19, 2022

Host Environment

  • OS: Ubuntu 20.04 x86_64
  • Compiler: GCC 9.4.0

To Reproduce
Steps to reproduce the behavior:
./vcpkg install libspatialite:x64-linux-dynamic

Failure logs

-- Configuring x64-linux-dynamic-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message):
    Command failed: /usr/bin/bash -c "V=1 ./../src/atialite-5-a609e8e653.clean/configure  \"--enable-freexl\" \"--disable-gcp\" \"--enable-geocallbacks\" \"--disable-rttopo\" \"--disable-examples\" \"--disable-minizip\" \"--disable-silent-rules\" \"--verbose\" \"--enable-shared\" \"--disable-static\" \"LIBS=-L/home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/pkgconfig/../../lib -lgeos_c -lxml2 -lproj -lsqlite3 -lz -lfreexl -lm $LIBS\" \"--prefix=/home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug\" \"--bindir=\\${prefix}/../tools/libspatialite/debug/bin\" \"--sbindir=\\${prefix}/../tools/libspatialite/debug/sbin\" \"--libdir=\\${prefix}/lib\" \"--includedir=\\${prefix}/../include\" \"--datarootdir=\\${prefix}/share/libspatialite\""
    Working Directory: /home/msi_laptop_5/vcpkg/buildtrees/libspatialite/x64-linux-dynamic-dbg
    Error code: 1
    See logs for more information:
      /home/msi_laptop_5/vcpkg/buildtrees/libspatialite/config-x64-linux-dynamic-dbg-config.log
      /home/msi_laptop_5/vcpkg/buildtrees/libspatialite/config-x64-linux-dynamic-dbg-out.log
      /home/msi_laptop_5/vcpkg/buildtrees/libspatialite/config-x64-linux-dynamic-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:707 (vcpkg_execute_required_process)
  ports/libspatialite/portfile.cmake:178 (vcpkg_configure_make)
  scripts/ports.cmake:147 (include)

config-x64-linux-dynamic-dbg-err.log
config-x64-linux-dynamic-dbg-out.log
config-x64-linux-dynamic-dbg-config.log
config.log

Additional context
Related to #25668

According to config.log, libtiffd.so and libcurl-d.so (required by libproj.so) are not found, though they exist in installed/x64-linux-dynamic/debug/lib/ where you'd expect to find them.

configure:13871: checking for library containing proj_normalize_for_visualization
configure:13902: gcc -o conftest -fPIC -g  -L/home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib  conftest.c -lsqlite3 -lsqlite3 -lz -lsqlite3 -L/home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/pkgconfig/../../lib -lgeos_c -lxml2 -lproj -lsqlite3 -lz -lfreexl -lm  >&5
/usr/bin/ld: warning: libtiffd.so.5, needed by /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcurl-d.so, needed by /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `curl_easy_perform'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `curl_easy_getinfo'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFSetTagExtender@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `curl_easy_init'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFClientOpen@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFStripSize64@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFCurrentDirOffset@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `curl_easy_cleanup'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFMergeFieldInfo@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFSetSubDirectory@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFIsCODECConfigured@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFReadEncodedTile@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFClose@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `curl_easy_setopt'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFTileSize64@LIBTIFF_4.0'
/usr/bin/ld: /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so: undefined reference to `TIFFGetField@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
@LilyWangLL LilyWangLL added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Jul 20, 2022
@Osyotr
Copy link
Contributor

Osyotr commented Jul 20, 2022

Similar issue: #25332
Maybe you installed tiff, curl and others before x64-linux-dynamic PR was merged (i.e. they don't have proper rpath)?

@cbrl
Copy link
Contributor Author

cbrl commented Jul 21, 2022

This one? #23035

I did this with a recent copy of vcpkg, but it may have been just before that PR was merged. However, I've gone back and tried it with the absolute latest commit (as of about 30 minutes ago), and still observe the same behavior.

@Osyotr
Copy link
Contributor

Osyotr commented Jul 21, 2022

Would you kindly provide the output from
readelf -d /home/msi_laptop_5/vcpkg/installed/x64-linux-dynamic/debug/lib/libproj.so
(may need sudo apt install readelf or similar)

@cbrl
Copy link
Contributor Author

cbrl commented Jul 21, 2022

Here is the output:

Dynamic section at offset 0x73a1e8 contains 33 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libsqlite3.so]
 0x0000000000000001 (NEEDED)             Shared library: [libtiffd.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libcurl-d.so]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libproj.so.25]
 0x000000000000000c (INIT)               0x1ed000
 0x000000000000000d (FINI)               0x5b1fc4
 0x0000000000000019 (INIT_ARRAY)         0x724548
 0x000000000000001b (INIT_ARRAYSZ)       112 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x7245b8
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x2f0
 0x0000000000000005 (STRTAB)             0x62168
 0x0000000000000006 (SYMTAB)             0x18368
 0x000000000000000a (STRSZ)              1185081 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x73c000
 0x0000000000000002 (PLTRELSZ)           200712 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1bb6a8
 0x0000000000000007 (RELA)               0x189ae8
 0x0000000000000008 (RELASZ)             203712 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x189928
 0x000000006fffffff (VERNEEDNUM)         7
 0x000000006ffffff0 (VERSYM)             0x1836a2
 0x000000006ffffff9 (RELACOUNT)          5814
 0x0000000000000000 (NULL)               0x0

@Osyotr
Copy link
Contributor

Osyotr commented Jul 21, 2022

Hmm looks like it's RUNPATH is not changed. Could you please run vcpkg install proj --triplet=x64-linux-dynamic and upload console output here?
Maybe you need to manually clean installed folder, since vcpkg won't rebuild libraries in classic mode.

@cbrl
Copy link
Contributor Author

cbrl commented Jul 21, 2022

Oh, wow my mistake. I had made an edit to a file in the repository, so git pull didn't actually merge the upstream changes. The PR from a couple days ago does actually fix it. I was initially using a copy of vcpkg from just before it was merged. For reference, here's the dynamic section of libproj with the new changes.

Dynamic section at offset 0x2966000 contains 34 entries:
  Tag        Type                         Name/Value
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libsqlite3.so]
 0x0000000000000001 (NEEDED)             Shared library: [libtiffd.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libcurl-d.so]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libproj.so.25]
 0x000000000000000c (INIT)               0x1ed000
 0x000000000000000d (FINI)               0x5b1fc4
 0x0000000000000019 (INIT_ARRAY)         0x724548
 0x000000000000001b (INIT_ARRAYSZ)       112 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x7245b8
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x8727b8
 0x0000000000000005 (STRTAB)             0x751270
 0x0000000000000006 (SYMTAB)             0x18368
 0x000000000000000a (STRSZ)              1185089 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x73c000
 0x0000000000000002 (PLTRELSZ)           200712 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1bb6a8
 0x0000000000000007 (RELA)               0x189ae8
 0x0000000000000008 (RELASZ)             203712 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x189928
 0x000000006fffffff (VERNEEDNUM)         7
 0x000000006ffffff0 (VERSYM)             0x1836a2
 0x000000006ffffff9 (RELACOUNT)          5814
 0x0000000000000000 (NULL)               0x0

I'll go ahead and close this issue.

@cbrl cbrl closed this as completed Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.
Projects
None yet
Development

No branches or pull requests

3 participants