BerkeleyDB for compiling with system libs

Hello,

  • OpenMandriva Lx version:
    4.1 Rock Zen

  • Desktop environment (KDE, LXQT…):
    KDE

  • Description of the issue (screenshots if relevant):

I’m attempting to compile a program using system libs. I get an error message that BerkeleyDB is not found. I’m unsure what libraries should be installed, if there are any available. This is the code:

# -*- cmake -*-

# - Find BerkeleyDB
# Find the BerkeleyDB includes and library
# This module defines
#  DB_INCLUDE_DIR, where to find db.h, etc.
#  DB_LIBRARIES, the libraries needed to use BerkeleyDB.
#  DB_FOUND, If false, do not try to use BerkeleyDB.
# also defined, but not for general use are
#  DB_LIBRARY, where to find the BerkeleyDB library.

FIND_PATH(DB_INCLUDE_DIR db.h
/usr/local/include/db4
/usr/local/include
/usr/include/db4
/usr/include
)

SET(DB_NAMES ${DB_NAMES} db)
FIND_LIBRARY(DB_LIBRARY
  NAMES ${DB_NAMES}
  PATHS /usr/lib /usr/local/lib
  )

IF (DB_LIBRARY AND DB_INCLUDE_DIR)
    SET(DB_LIBRARIES ${DB_LIBRARY})
    SET(DB_FOUND "YES")
ELSE (DB_LIBRARY AND DB_INCLUDE_DIR)
  SET(DB_FOUND "NO")
ENDIF (DB_LIBRARY AND DB_INCLUDE_DIR)


IF (DB_FOUND)
   IF (NOT DB_FIND_QUIETLY)
      MESSAGE(STATUS "Found BerkeleyDB: ${DB_LIBRARIES}")
   ENDIF (NOT DB_FIND_QUIETLY)
ELSE (DB_FOUND)
   IF (DB_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find BerkeleyDB library")
   ENDIF (DB_FIND_REQUIRED)
ENDIF (DB_FOUND)

# Deprecated declarations.
SET (NATIVE_DB_INCLUDE_PATH ${DB_INCLUDE_DIR} )
GET_FILENAME_COMPONENT (NATIVE_DB_LIB_PATH ${DB_LIBRARY} PATH)

MARK_AS_ADVANCED(
  DB_LIBRARY
  DB_INCLUDE_DIR
  )

And here is a snippet of the terminal:

-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/gcc-9.2.1
-- Check for working C compiler: /usr/bin/gcc-9.2.1 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++-9.2.1
-- Check for working CXX compiler: /usr/bin/g++-9.2.1 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- GCC version (dots removed): 921
-- ========================================
-- Version of viewer is 1.28.0.9
-- ========================================
CMake Error at cmake/FindBerkeleyDB.cmake:39 (MESSAGE):
  Could not find BerkeleyDB library
Call Stack (most recent call first):
  cmake/BerkeleyDB.cmake:16 (include)
  cmake/APR.cmake:7 (include)
  cmake/LLCommon.cmake:7 (include)
  llappearance/CMakeLists.txt:6 (include)


-- Configuring incomplete, errors occurred!

Any ideas?

1 Like

Ask developers on #openmandriva-cooker @ Freenode IRC.

There is a user channel as well #openmandriva @ Freenode IRC. If you are more comfortable asking here someone will eventually see and respond to your post.

Post-edit: My guess is that you are dealing with incorrect path to lib64db18. In Rock the current installed by default package is:

lib64db18.1-18.1.32-1

The package name would be:

lib64db18

Post-edit-2: Post-edit is shorthand for I got a little smarter after I wrote my initial answer. However you should still ask developers exactly what you need to accomplish your task. And one can not count on developers responding to posts in this forum.

1 Like

@ben79, thank you. dnfdragora displayed a lot of results for BerkeleyDB. The package that you mentioned turned out to be the one I needed.

1 Like