qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

Build failure when building tests with 3.22.8 (`ld.lld: error: unable to find library -lprovider_postgres_a`) #49059

Closed thesamesam closed 10 months ago

thesamesam commented 2 years ago

What is the bug or the crash?

Building 3.22.8 with tests fails with the following error:

FAILED: output/bin/test_provider_postgresexpressioncompiler
: && /var/tmp/portage/sci-geosciences/qgis-3.22.8/temp/x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -D_GLIBCXX_ASSERTIONS -ggdb3 -Werror=format-s
ecurity -Wformat -fuse-ld=lld -Wl,--as-needed -Wl,-z,relro,-z,now -Wl,--no-undefined tests/src/providers/CMakeFiles/test_provider_postgresexpressioncompiler.dir/test_provider_postgresexpressioncomp
iler_autogen/mocs_compilation.cpp.o tests/src/providers/CMakeFiles/test_provider_postgresexpressioncompiler.dir/testqgspostgresexpressioncompiler.cpp.o -o output/bin/test_provider_postgresexpressio
ncompiler -L/var/tmp/portage/sci-geosciences/qgis-3.22.8/work/qgis-3.22.8_build/src/core   -L/var/tmp/portage/sci-geosciences/qgis-3.22.8/work/qgis-3.22.8_build/src/gui -Wl,-rpath,/var/tmp/portage/
sci-geosciences/qgis-3.22.8/work/qgis-3.22.8_build/src/core:/var/tmp/portage/sci-geosciences/qgis-3.22.8/work/qgis-3.22.8_build/src/gui:/var/tmp/portage/sci-geosciences/qgis-3.22.8/work/qgis-3.22.8
_build/output/lib64  -lprovider_postgres_a  output/lib64/libqgis_core.so.3.22.8  /usr/lib64/libQt5Test.so.5.15.4  /usr/lib64/libQt5Xml.so.5.15.4  /usr/lib64/libQt5Svg.so.5.15.4  /usr/lib64/libQt5Ne
twork.so.5.15.4  /usr/lib64/libQt5Sql.so.5.15.4  /usr/lib64/libQt5Concurrent.so.5.15.4  /usr/lib64/libqca-qt5.so  /usr/lib64/libqt5keychain.so  /usr/lib64/libproj.so  /usr/lib64/libgeos_c.so  /usr/
lib64/libgdal.so  /usr/lib64/libspatialindex.so  /lib64/libexpat.so  /lib64/libsqlite3.so  /usr/lib64/libzip.so  /usr/lib64/libprotobuf-lite.so  /usr/lib64/libz.so  /usr/lib64/libexiv2.so  /usr/lib
64/libQt5PrintSupport.so.5.15.4  /usr/lib64/libQt5Widgets.so.5.15.4  /usr/lib64/libQt5Gui.so.5.15.4  /usr/lib64/libspatialite.so  /usr/lib64/libzstd.so  /usr/lib64/libQt5Positioning.so.5.15.4  /usr
/lib64/libQt5Core.so.5.15.4 && :
ld.lld: error: unable to find library -lprovider_postgres_a
collect2: error: ld returned 1 exit status

Full build log: build.log.gz.

Let me know if I can provide any other informaiton.

Steps to reproduce the issue

  1. Attempt to build QGIS 3.22.8.
  2. Use the following CMake options:
    cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DQGIS_MANUAL_SUBDIR=share/man/ -DQGIS_LIB_SUBDIR=lib64 -DQGIS_PLUGIN_SUBDIR=lib64/qgis -DQWT_INCLUDE_DIR=/usr/include/qwt6 -DQWT_LIBRARY=/usr/lib64/libqwt6-qt5.so -DQGIS_QML_SUBDIR=/usr/lib64/qt5/qml -DPEDANTIC=OFF -DUSE_CCACHE=OFF -DWITH_ANALYSIS=ON -DWITH_APIDOC=OFF -DWITH_GUI=ON -DWITH_INTERNAL_MDAL=ON -DWITH_QSPATIALITE=ON -DENABLE_TESTS=yes -DWITH_3D=no -DWITH_GSL=no -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON -DWITH_SERVER=no -DCMAKE_DISABLE_FIND_PACKAGE_NetCDF=ON -DUSE_OPENCL=no -DWITH_ORACLE=no -DWITH_QWTPOLAR=no -DWITH_PDAL=no -DWITH_POSTGRESQL=no -DWITH_BINDINGS=no -DWITH_CUSTOM_WIDGETS=no -DWITH_QUICK=yes -DWITH_QT5SERIALPORT=no -DWITH_QTWEBKIT=OFF -DWITH_GRASS7=OFF -DWITH_GRASS8=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo
  3. Run ninja and build fails.

Versions

3.22.8

Supported QGIS version

New profile

Additional context

I currently help to maintain the QGIS package for Gentoo. This issue has been reported by one of our testers (https://bugs.gentoo.org/844754) for 3.22.7 upwards.

alexbruy commented 1 year ago

Is this still an issue with the latest versions?

github-actions[bot] commented 11 months ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.

github-actions[bot] commented 10 months ago

While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. Or, if you have any further questions, there are also further support channels that can help you.