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

Build fails with WITH_POSTGRESQL=OFF #50075

Closed
1 of 2 tasks
kannes opened this issue Sep 3, 2022 · 4 comments
Closed
1 of 2 tasks

Build fails with WITH_POSTGRESQL=OFF #50075

kannes opened this issue Sep 3, 2022 · 4 comments
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS

Comments

@kannes
Copy link
Contributor

kannes commented Sep 3, 2022

What is the bug or the crash?

Building QGIS fails for me if I disable WITH_POSTGRESQL because libpq-fe.h is not being found:

[ 88%] Building CXX object tests/src/providers/CMakeFiles/test_provider_postgresprovider.dir/test_provider_postgresprovider_autogen/mocs_compilation.cpp.o
[ 88%] Building CXX object tests/src/providers/CMakeFiles/test_provider_postgresprovider.dir/testqgspostgresprovider.cpp.o
In file included from /home/user/QGIS/src/providers/postgres/qgspostgresexpressioncompiler.h:21,
                 from /home/user/QGIS/tests/src/providers/testqgspostgresexpressioncompiler.cpp:19:
/home/user/QGIS/src/providers/postgres/qgspostgresconn.h:35:10: fatal error: libpq-fe.h: Datei oder Verzeichnis nicht gefunden
   35 | #include <libpq-fe.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [tests/src/providers/CMakeFiles/test_provider_postgresexpressioncompiler.dir/build.make:90: tests/src/providers/CMakeFiles/test_provider_postgresexpressioncompiler.dir/testqgspostgresexpressioncompiler.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:26273: tests/src/providers/CMakeFiles/test_provider_postgresexpressioncompiler.dir/all] Fehler 2
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
[ 88%] Building CXX object src/gui/CMakeFiles/qgis_gui.dir/processing/models/qgsmodelinputreorderwidget.cpp.o
[ 88%] Building CXX object src/gui/CMakeFiles/qgis_gui.dir/processing/models/qgsmodelsnapper.cpp.o
[ 88%] Building CXX object src/gui/CMakeFiles/qgis_gui.dir/processing/models/qgsmodelundocommand.cpp.o
In file included from /home/user/QGIS/src/providers/postgres/qgspostgresprovider.h:23,
                 from /home/user/QGIS/tests/src/providers/testqgspostgresprovider.cpp:20:
/home/user/QGIS/src/providers/postgres/qgspostgresconn.h:35:10: fatal error: libpq-fe.h: Datei oder Verzeichnis nicht gefunden
   35 | #include <libpq-fe.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [tests/src/providers/CMakeFiles/test_provider_postgresprovider.dir/build.make:90: tests/src/providers/CMakeFiles/test_provider_postgresprovider.dir/testqgspostgresprovider.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:26301: tests/src/providers/CMakeFiles/test_provider_postgresprovider.dir/all] Fehler 2

Steps to reproduce the issue

  1. Set WITH_POSTGRESQL=OFF
  2. make
  3. See the build fail

Versions

Recent master, a87893b

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

Ubuntu 22.04.1 LTS

@kannes kannes added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 3, 2022
@kannes kannes changed the title Build fails with Build fails with WITH_POSTGRESQL=OFF Sep 3, 2022
@agiudiceandrea agiudiceandrea added the Build/Install Related to compiling or installing QGIS label Sep 3, 2022
@kannes
Copy link
Contributor Author

kannes commented Sep 6, 2022

I can NOT reproduce it on Archlinux with ninja with today's master:

...
  cmake -G "Ninja" ../ \
    -DCMAKE_INSTALL_PREFIX=/opt/$pkgname \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DQGIS_MANUAL_SUBDIR=share/man \
    -DENABLE_TESTS=FALSE \
    -DWITH_3D=TRUE \
    -DWITH_PDAL=TRUE \
    -DWITH_POSTGRESQL=FALSE

  ninja
...

@troopa81
Copy link
Contributor

I can NOT reproduce it on Archlinux with ninja with today's master

Do you still have the issue on Ubuntu with current master?

@troopa81 troopa81 added the Feedback Waiting on the submitter for answers label Oct 12, 2022
@kannes
Copy link
Contributor Author

kannes commented Oct 24, 2022

Yes, just tested with current master.

@troopa81 troopa81 self-assigned this Nov 5, 2022
@troopa81 troopa81 removed the Feedback Waiting on the submitter for answers label Nov 5, 2022
troopa81 added a commit to troopa81/QGIS that referenced this issue Nov 5, 2022
troopa81 added a commit to troopa81/QGIS that referenced this issue Nov 5, 2022
@kannes
Copy link
Contributor Author

kannes commented Nov 15, 2022

Thanks! I can confirm that it builds now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

No branches or pull requests

3 participants