Configuration phase of tdesdk fails to detect Berkeley DB as installed under FreeBSD 13.2 #226

Open
opened 2 years ago by Lannig · 8 comments
Lannig commented 2 years ago
Collaborator

Basic information

  • TDE version: R14.1.0
  • Distribution: FreeBSD 13.2-RELEASE amd64
  • Hardware: amd64

Description

Fresh install of FreeBSD 13.2 on a old but 64-bit capable machine (HP/Compaq 8510p)
Tried to build/install Trinity 14.1 as per newly updated instructions at https://wiki.trinitydesktop.org/FreeBSD_Trinity_Installation_Instructions#Spread_ports_from_GIT_folder_to_.2Fusr.2Fports

It fails during the configuration phase of tdesdk-trinity-14.1.0 because Berkeley DB is not detected as installed although it actually is.
Trying to diagnose this further now, but the configuration process is a bit too hairy for me to find my way.

Steps to reproduce

  1. Install FreeBSD 13.2-RELEASE amd64

  2. Follow https://wiki.trinitydesktop.org/FreeBSD_Trinity_Installation_Instructions#Spread_ports_from_GIT_folder_to_.2Fusr.2Fports including all prerequisites (ports update, pkg manager configuration, packages to install)

  3. Wait until the error comes up

Screenshots

===>   tdesdk-trinity-14.1.0 depends on file: /usr/local/lib/libiberty.a - found
===>   Returning to build of tdesdk-trinity-14.1.0
===>   tdesdk-trinity-14.1.0 depends on executable: ninja - found
===>   tdesdk-trinity-14.1.0 depends on shared library: libtqt.so - found (/usr/local/lib/libtqt.so)
===>   tdesdk-trinity-14.1.0 depends on shared library: libapr-1.so - found (/usr/local/lib/libapr-1.so)
===>   tdesdk-trinity-14.1.0 depends on shared library: libsvn_client-1.so - found (/usr/local/lib/libsvn_client-1.so)
===>  Configuring for tdesdk-trinity-14.1.0
...
-- The C compiler identification is Clang 14.0.5
-- The CXX compiler identification is Clang 14.0.5
-- Detecting C compiler ABI info
...
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Found Perl: /usr/local/bin/perl (found version "5.32.1")
-- Found intltool: /usr/local/share/cmake/Modules/tde_l10n_merge.pl
-- Performing Test HAVE_BERKELEY_DB
-- Performing Test HAVE_BERKELEY_DB - Failed
CMake Error at /usr/local/share/cmake/Modules/TDEMacros.cmake:74 (message):
  #################################################

   berkeley db is required, but was not found on your system

  #################################################
Call Stack (most recent call first):
  kbabel/kbabeldict/modules/dbsearchengine/ConfigureChecks.cmake:25 (tde_message_fatal)
  kbabel/kbabeldict/modules/dbsearchengine/CMakeLists.txt:12 (include)


-- Configuring incomplete, errors occurred!
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/tdesdk-trinity
*** Error code 1

Stop.
make: stopped in /usr/ports/x11/tde-meta

Berkeley DB is installed:

> sudo pkg info db18
db18-18.1.40
Name           : db18
Version        : 18.1.40
Installed on   : Wed May  3 11:17:59 2023 CEST
Origin         : databases/db18
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : java databases
Licenses       : UPL10 and BSD3CLAUSE and AGPLv3
Maintainer     : yasu@FreeBSD.org
WWW            : https://www.oracle.com/database/berkeley-db/
Comment        : Oracle Berkeley DB, Release 18.1
Options        :
        CRYPTO         : on
        DEBUG          : off
        DOCS           : on
        JAVA           : off
        L10N           : off
        TCL            : off
Shared Libs provided:
        libdb_stl-18.1.so
        libdb_cxx-18.1.so
        libdb-18.1.so
Annotations    :
        FreeBSD_version: 1301000
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 88.6MiB
Description    :
Oracle Berkeley DB is a family of open source embeddable databases
that allows developers to incorporate within their applications a
fast, scalable, transactional database engine with industrial grade
reliability and availability. As a result, customers and end-users
will experience an application that simply works, reliably manages
data, can scale under extreme load, but requires no ongoing database
administration. As a developer, you can focus on your application and
be confident that Oracle Berkeley DB will manage your persistence
needs.

WWW: https://www.oracle.com/database/berkeley-db/
> sudo pkg install db18
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
<!-- This is a comment. Please fill in the required fields below. The comments provide instructions on how to do so. Note: You do not need to remove comments. --> ## Basic information - TDE version: R14.1.0 - Distribution: FreeBSD 13.2-RELEASE amd64 - Hardware: amd64 <!-- Use SL/* labels to set the severity level. Please do not set a milestone. --> ## Description Fresh install of FreeBSD 13.2 on a old but 64-bit capable machine (HP/Compaq 8510p) Tried to build/install Trinity 14.1 as per newly updated instructions at https://wiki.trinitydesktop.org/FreeBSD_Trinity_Installation_Instructions#Spread_ports_from_GIT_folder_to_.2Fusr.2Fports It fails during the configuration phase of tdesdk-trinity-14.1.0 because Berkeley DB is not detected as installed although it actually is. Trying to diagnose this further now, but the configuration process is a bit too hairy for me to find my way. ## Steps to reproduce 1. Install FreeBSD 13.2-RELEASE amd64 2. Follow https://wiki.trinitydesktop.org/FreeBSD_Trinity_Installation_Instructions#Spread_ports_from_GIT_folder_to_.2Fusr.2Fports including all prerequisites (ports update, pkg manager configuration, packages to install) 3. Wait until the error comes up ## Screenshots <!-- If it seems useful, please provide provide one or more screenshots. --> ``` ===> tdesdk-trinity-14.1.0 depends on file: /usr/local/lib/libiberty.a - found ===> Returning to build of tdesdk-trinity-14.1.0 ===> tdesdk-trinity-14.1.0 depends on executable: ninja - found ===> tdesdk-trinity-14.1.0 depends on shared library: libtqt.so - found (/usr/local/lib/libtqt.so) ===> tdesdk-trinity-14.1.0 depends on shared library: libapr-1.so - found (/usr/local/lib/libapr-1.so) ===> tdesdk-trinity-14.1.0 depends on shared library: libsvn_client-1.so - found (/usr/local/lib/libsvn_client-1.so) ===> Configuring for tdesdk-trinity-14.1.0 ... -- The C compiler identification is Clang 14.0.5 -- The CXX compiler identification is Clang 14.0.5 -- Detecting C compiler ABI info ... -- Looking for dlopen in dl -- Looking for dlopen in dl - found -- Found Perl: /usr/local/bin/perl (found version "5.32.1") -- Found intltool: /usr/local/share/cmake/Modules/tde_l10n_merge.pl -- Performing Test HAVE_BERKELEY_DB -- Performing Test HAVE_BERKELEY_DB - Failed CMake Error at /usr/local/share/cmake/Modules/TDEMacros.cmake:74 (message): ################################################# berkeley db is required, but was not found on your system ################################################# Call Stack (most recent call first): kbabel/kbabeldict/modules/dbsearchengine/ConfigureChecks.cmake:25 (tde_message_fatal) kbabel/kbabeldict/modules/dbsearchengine/CMakeLists.txt:12 (include) -- Configuring incomplete, errors occurred! *** Error code 1 Stop. make[1]: stopped in /usr/ports/devel/tdesdk-trinity *** Error code 1 Stop. make: stopped in /usr/ports/x11/tde-meta ``` Berkeley DB is installed: ``` > sudo pkg info db18 db18-18.1.40 Name : db18 Version : 18.1.40 Installed on : Wed May 3 11:17:59 2023 CEST Origin : databases/db18 Architecture : FreeBSD:13:amd64 Prefix : /usr/local Categories : java databases Licenses : UPL10 and BSD3CLAUSE and AGPLv3 Maintainer : yasu@FreeBSD.org WWW : https://www.oracle.com/database/berkeley-db/ Comment : Oracle Berkeley DB, Release 18.1 Options : CRYPTO : on DEBUG : off DOCS : on JAVA : off L10N : off TCL : off Shared Libs provided: libdb_stl-18.1.so libdb_cxx-18.1.so libdb-18.1.so Annotations : FreeBSD_version: 1301000 repo_type : binary repository : FreeBSD Flat size : 88.6MiB Description : Oracle Berkeley DB is a family of open source embeddable databases that allows developers to incorporate within their applications a fast, scalable, transactional database engine with industrial grade reliability and availability. As a result, customers and end-users will experience an application that simply works, reliably manages data, can scale under extreme load, but requires no ongoing database administration. As a developer, you can focus on your application and be confident that Oracle Berkeley DB will manage your persistence needs. WWW: https://www.oracle.com/database/berkeley-db/ > sudo pkg install db18 Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Updating database digests format: 100% Checking integrity... done (0 conflicting) The most recent versions of packages are already installed ```
Lannig commented 2 years ago
Poster
Collaborator

Tried this patch to /usr/ports/devel/tdesdk-trinity/work/tdesdk-trinity_14.1.0/kbabel/kbabeldict/modules/dbsearchengine/ConfigureChecks.cmake, no luck.
Same error.

*** ConfigureChecks.cmake.org   Sat Jan 14 15:44:29 2023
--- ConfigureChecks.cmake       Thu May  4 11:14:12 2023
***************
*** 18,24 ****
    HAVE_BERKELEY_DB )

  if( HAVE_BERKELEY_DB )
!   find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 )
  endif( )

  if( NOT BDB_LIBRARY )
--- 18,24 ----
    HAVE_BERKELEY_DB )

  if( HAVE_BERKELEY_DB )
!   find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 db18 )
  endif( )

  if( NOT BDB_LIBRARY )
Tried this patch to /usr/ports/devel/tdesdk-trinity/work/tdesdk-trinity_14.1.0/kbabel/kbabeldict/modules/dbsearchengine/ConfigureChecks.cmake, no luck. Same error. ``` *** ConfigureChecks.cmake.org Sat Jan 14 15:44:29 2023 --- ConfigureChecks.cmake Thu May 4 11:14:12 2023 *************** *** 18,24 **** HAVE_BERKELEY_DB ) if( HAVE_BERKELEY_DB ) ! find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 ) endif( ) if( NOT BDB_LIBRARY ) --- 18,24 ---- HAVE_BERKELEY_DB ) if( HAVE_BERKELEY_DB ) ! find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 db18 ) endif( ) if( NOT BDB_LIBRARY ) ```
Lannig commented 2 years ago
Poster
Collaborator

That one did the trick:

*** ConfigureChecks.cmake.org   Sat Jan 14 15:44:29 2023
--- ConfigureChecks.cmake       Thu May  4 11:25:26 2023
***************
*** 9,15 ****
  #
  #################################################

! find_file( USE_DB_H_PATH NAMES "db5/db.h" "db4/db.h" "db.h" )

  check_c_source_compiles("
      #include <${USE_DB_H_PATH}>
--- 9,15 ----
  #
  #################################################

! find_file( USE_DB_H_PATH NAMES "db5/db.h" "db4/db.h" "db18/db.h" "db.h" )

  check_c_source_compiles("
      #include <${USE_DB_H_PATH}>
***************
*** 18,24 ****
    HAVE_BERKELEY_DB )

  if( HAVE_BERKELEY_DB )
!   find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 )
  endif( )

  if( NOT BDB_LIBRARY )
--- 18,24 ----
    HAVE_BERKELEY_DB )

  if( HAVE_BERKELEY_DB )
!   find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 db18)
  endif( )

  if( NOT BDB_LIBRARY )
That one did the trick: ``` *** ConfigureChecks.cmake.org Sat Jan 14 15:44:29 2023 --- ConfigureChecks.cmake Thu May 4 11:25:26 2023 *************** *** 9,15 **** # ################################################# ! find_file( USE_DB_H_PATH NAMES "db5/db.h" "db4/db.h" "db.h" ) check_c_source_compiles(" #include <${USE_DB_H_PATH}> --- 9,15 ---- # ################################################# ! find_file( USE_DB_H_PATH NAMES "db5/db.h" "db4/db.h" "db18/db.h" "db.h" ) check_c_source_compiles(" #include <${USE_DB_H_PATH}> *************** *** 18,24 **** HAVE_BERKELEY_DB ) if( HAVE_BERKELEY_DB ) ! find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 ) endif( ) if( NOT BDB_LIBRARY ) --- 18,24 ---- HAVE_BERKELEY_DB ) if( HAVE_BERKELEY_DB ) ! find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 db18) endif( ) if( NOT BDB_LIBRARY ) ```
Lannig commented 2 years ago
Poster
Collaborator

Same issue in tdevelop-trinity, same patch for /usr/ports/misc/tdevelop-trinity/work/tdevelop-trinity_14.1.0/ConfigureChecks.cmake

*** ConfigureChecks.cmake.org   Mon Jan 16 21:04:18 2023
--- ConfigureChecks.cmake       Thu May  4 11:38:09 2023
***************
*** 38,44 ****
  # we need at least bdb 4.1, but I do not check for version
  # because this is really old and trinity will not
  # working anyway on such old systems
! find_file( USE_DB_H_PATH NAMES "db5/db.h" "db4/db.h" "db.h" )

  check_c_source_compiles("
      #include <${USE_DB_H_PATH}>
--- 38,44 ----
  # we need at least bdb 4.1, but I do not check for version
  # because this is really old and trinity will not
  # working anyway on such old systems
! find_file( USE_DB_H_PATH NAMES "db5/db.h" "db4/db.h" "db18/db.h" "db.h" )

  check_c_source_compiles("
      #include <${USE_DB_H_PATH}>
***************
*** 47,53 ****
    HAVE_BERKELEY_DB )

  if( HAVE_BERKELEY_DB )
!   find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 )
  endif( )

  if( NOT BDB_LIBRARY )
--- 47,53 ----
    HAVE_BERKELEY_DB )

  if( HAVE_BERKELEY_DB )
!   find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 db18 )
  endif( )

  if( NOT BDB_LIBRARY )
Same issue in tdevelop-trinity, same patch for /usr/ports/misc/tdevelop-trinity/work/tdevelop-trinity_14.1.0/ConfigureChecks.cmake ``` *** ConfigureChecks.cmake.org Mon Jan 16 21:04:18 2023 --- ConfigureChecks.cmake Thu May 4 11:38:09 2023 *************** *** 38,44 **** # we need at least bdb 4.1, but I do not check for version # because this is really old and trinity will not # working anyway on such old systems ! find_file( USE_DB_H_PATH NAMES "db5/db.h" "db4/db.h" "db.h" ) check_c_source_compiles(" #include <${USE_DB_H_PATH}> --- 38,44 ---- # we need at least bdb 4.1, but I do not check for version # because this is really old and trinity will not # working anyway on such old systems ! find_file( USE_DB_H_PATH NAMES "db5/db.h" "db4/db.h" "db18/db.h" "db.h" ) check_c_source_compiles(" #include <${USE_DB_H_PATH}> *************** *** 47,53 **** HAVE_BERKELEY_DB ) if( HAVE_BERKELEY_DB ) ! find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 ) endif( ) if( NOT BDB_LIBRARY ) --- 47,53 ---- HAVE_BERKELEY_DB ) if( HAVE_BERKELEY_DB ) ! find_library( BDB_LIBRARY db PATH_SUFFIXES db5 db4 db18 ) endif( ) if( NOT BDB_LIBRARY ) ```
Owner

On my test machine with FreeBSD I have installed DB5. This explains why it works as expected. Thank you for your research and testing.

On my test machine with FreeBSD I have installed DB5. This explains why it works as expected. Thank you for your research and testing.
obache commented 2 years ago
Collaborator

If multiple BDB versions are installed, an unwanted variant may be picked up.

I'm using USE_DB_H_PATH and BDB_LIBRARY CMake variables for packaging,
and force to pick up wanted BDB version for package builder.

For example, BDB major version is selected with BDB_VER=18, and tell it to CMake with
-DUSE_DB_H_PATH:FILEPATH=db${BDB_VER}/db.h and -DBDB_LIBRARY:FILEPATH=db-${DBD_VER}

If multiple BDB versions are installed, an unwanted variant may be picked up. I'm using `USE_DB_H_PATH` and `BDB_LIBRARY` CMake variables for packaging, and force to pick up wanted BDB version for package builder. For example, BDB major version is selected with `BDB_VER=18`, and tell it to CMake with `-DUSE_DB_H_PATH:FILEPATH=db${BDB_VER}/db.h` and `-DBDB_LIBRARY:FILEPATH=db-${DBD_VER}`
Lannig commented 2 years ago
Poster
Collaborator

On my test machine with FreeBSD I have installed DB5. This explains why it works as expected. Thank you for your research and testing.

Well, DB18 seems to come as default under FreeBSD 13.2. I haven't been given any choice when installing the package.

> On my test machine with FreeBSD I have installed DB5. This explains why it works as expected. Thank you for your research and testing. Well, DB18 seems to come as default under FreeBSD 13.2. I haven't been given any choice when installing the package.
Owner

I assumed to adjust the detection so that it was from the latest version to the older – db18 db5 db4. I think it should be an acceptable way. What is your opinion?

I assumed to adjust the detection so that it was from the latest version to the older – `db18 db5 db4`. I think it should be an acceptable way. What is your opinion?

I assumed to adjust the detection so that it was from the latest version to the older – db18 db5 db4. I think it should be an acceptable way. What is your opinion?

That would probably be the right course of action. In the meantime the problem can be circumvented by manually do a pkg install db5

> I assumed to adjust the detection so that it was from the latest version to the older – `db18 db5 db4`. I think it should be an acceptable way. What is your opinion? That would probably be the right course of action. In the meantime the problem can be circumvented by manually do a ```pkg install db5```
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tde-packaging#226
Loading…
There is no content yet.