LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-19-2007, 05:27 AM   #1
MaxKhalilov
LQ Newbie
 
Registered: Jun 2007
Posts: 1

Rep: Reputation: 0
Berkeley DB linking


I'm trying to install a program using Berkeley DB. it is simply inclyded to the .h file like that:

#include <db_cxx.h>

g++ version 4.1.1

However, compiling it on my Fedora 6 system (I've also tried to do it on Ununtu 6 system), I get the following error:

LanguageModelSAMT.o: In function `CDatabaseSAMTLM::CDatabaseSAMTLM(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
LanguageModelSAMT.cc.text+0x212): undefined reference to `Db:b(DbEnv*, unsigned int)'
LanguageModelSAMT.o: In function `CDatabaseSAMTLM::CDatabaseSAMTLM(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
LanguageModelSAMT.cc.text+0x372): undefined reference to `Db:b(DbEnv*, unsigned int)'
collect2: ld returned 1 exit status
make: *** [FastTranslateChart] Error 1


the corresponding makefile part is:

CXX = g++
CXXFLAGS = -D_REENTRANT -DNDEBUG -O2 -I./src/Share -I./src/LM -I./src/BleuSearch
-I./src/Lattice -I./src/SRI -I./src/FORTFY22 -I/usr/local/programs/BDB-4.5.20.N
C//include/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_ST
DLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_
H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE
_STACK=1 -DHAVE_STRING=1 -DHAVE_LIST=1 -DHAVE_VECTOR=1 -DHAVE_MAP=1 -DHAVE_EXT_H
ASH_MAP=1 -DHAVE_EXT_HASH_SET=1 -DHAVE_ZOPEN -DINSTANTIATE_TEMPLATES
LD_FLAGS = -L/usr/local/programs/BDB-4.5.20.NC//lib/ -ldb_cxx

Looks like a mismatch between the Berkeley DB 4.5.20.NC that I'd like to use and pre-installed older Berkeley DB included to the Linux distribution.

I tried to include the path to the correct libraries to LD_LIBRARY_PATH and compile the module with -D_REENTRANT flag. no changes

probably, someone faced with similiar problem?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get Berkeley DB Sailesh Linux - Software 1 08-01-2006 04:20 AM
Problem in using both load time linking and runtime linking durgaprasad_j Linux - General 0 08-01-2006 03:49 AM
Berkeley DB problem jocast Linux - Software 2 03-10-2006 05:54 PM
Berkeley db upgrade Dankles Slackware 1 09-26-2005 03:05 PM
Berkeley DB aesthete Linux - Software 1 02-12-2005 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration