[PROJ] PROJ 9.4.1RC1 & PROJ-data 1.18RC1

Greg Troxel gdt at lexort.com
Mon May 27 16:36:41 PDT 2024


I tried to build 9.4.1RC1 under pkgsrc.   This is my first time building
9.x; pkgsrc is at 8.2.1 (the last version with autotools).

I flipped the build config from GNU_CONFIGURE to cmake, and it's mostly
ok.  After a bunch of output that looks ok I come to:

  -- found nlohmann/json version 3.11.2
  -- nlohmann/json: external
  -- Found SQLite3: /usr/pkg/include (found version "3.46.0")
  -- Found TIFF: /usr/pkg/lib/libtiff.so (found version "4.6.0")
  -- Found CURL: /usr/pkg/lib/libcurl.so (found version "8.8.0")
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - found
  -- Found Threads: TRUE
  -- Configuring proj library:
  -- ENABLE_IPO                     = OFF
  -- PROJ_CORE_TARGET_OUTPUT_NAME   = proj
  -- BUILD_SHARED_LIBS              = ON
  -- PROJ_LIBRARIES                 = proj
  -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) (Required is at least version "1.8.1")
  -- Fetching GTest
  -- PROJ: Configured 'dist' target
  -- Configuring done (1.8s)
  CMake Error at test/unit/CMakeLists.txt:84 (target_link_libraries):
    Target "proj_errno_string_test" links to:

      GTest::gtest

Looking at
  https://proj.org/en/9.4/install.html

I see

  Build requirements¶
      - C99 compiler
      - C++11 compiler
      - CMake >= 3.16
      - SQLite3 >= 3.11: headers and library for target architecture, and sqlite3 executable for build architecture.
      - libtiff >= 4.0 (optional but recommended)
      - curl >= 7.29.0 (optional but recommended)

and 1) I've provided all that and 2) the cmake log shows they are found,
more or less.

So:

  - proj seems wrong to error out without GTest, given the install docs.

  - it's a bug to try to use the network at build time.  I'm not sure
    what "Fetching GTest" is but it looks like that's what's happening.
    pkgsrc arranges for proxy variables to prevent this from working.

  - it doesn't make sense to printing out that GTest was not found
    (which is fine if optional) and then try to use it.

  - even if the docs are wrong, it should be specified as a test
    dependency, not a regular build dependency.  Packaging systems are
    careful to minimize dependencies

  - not really related, but it found nlohmann-json which was not
    documented as a dependency.   In pkgsrc, as I would expect in every
    other system (unless they *only* build in chroot) to need, for each
    possible dependency, to either provide it or to configure it off
    


More information about the PROJ mailing list