Skip to content

Please provide pkg-config file and install files #4

@0-wiz-0

Description

@0-wiz-0

I'm trying to package trifecta.

When building sqllitewrite with meson, nothing is installed.
I manually installed sqlitewrite.hh and libsqlwrite.so but then trifecta still complained because it didn't find sqlitewrite using pkg-config - not surprisingly. However, I didn't even find a pkg-config file in the meson output directories.

When trying to build with cmake, the build fails because of missing postgres headers. The cmake build doesn't even check for them:

In file included from /scratch/wip/sqlitewrite/work/sqlitewrite-05b95d9540047078cc591367792d4a78f03b930c/minipsql.cc:1:
/scratch/wip/sqlitewrite/work/sqlitewrite-05b95d9540047078cc591367792d4a78f03b930c/minipsql.hh:1:10: fatal error: postgresql/libpq-fe.h: No such file or directory
    1 | #include <postgresql/libpq-fe.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

The cmake build doesn't install any files either, and it should use ${CMAKE_DL_LIBS} instead of dl since e.g. *BSD provide dlopen() and friends in libc, i.e.:

--- CMakeLists.txt.orig 2024-05-18 20:37:40.580561805 +0000
+++ CMakeLists.txt
@@ -14,14 +14,14 @@ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
 find_package(Threads REQUIRED)

 add_executable(demo demo.cc sqlwriter.cc)
-target_link_libraries(demo  sqlite3  pthread  dl  )
+target_link_libraries(demo  sqlite3  pthread  ${CMAKE_DL_LIBS}  )

 add_executable(pqdemo pqdemo.cc psqlwriter.cc minipsql.cc)
-target_link_libraries(pqdemo pthread  dl pq )
+#target_link_libraries(pqdemo pthread  ${CMAKE_DL_LIBS} pq )


 add_executable(testrunner testrunner.cc sqlwriter.cc jsontests.cc jsonhelper.cc)
-target_link_libraries(testrunner sqlite3 pthread dl)
+target_link_libraries(testrunner sqlite3 pthread ${CMAKE_DL_LIBS})

 enable_testing()
 add_test(testname testrunner)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions