LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-14-2005, 11:41 PM   #1
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Rep: Reputation: 30
Lightbulb Install the original Berkeley DB and the like


Hello,everyone!

I am now installing and testing Postfix with many features like with MySQL,SASL,TLS & Cyrus IMAPD. However, I encountered error when I installed Postfix with Cyrus IMAPD.I need to install the original Berkeley DB from Slackware CD.How can I do it?Do you guys have any hints?Please don't hesitate and feel free to drop me a line if you have any suggestions.

Sorry,I'm a on Slackware.I used RedHat with RPM before.

P.S. It's such a pain to install from source because the successful installation chance is 40%.Maybe I don't know the tricks.
 
Old 01-15-2005, 12:09 AM   #2
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Depends on which one you need. Use "installpkg" to install it/them.

Code:
PACKAGE NAME:  db3-3.3.11-i486-4.tgz
PACKAGE LOCATION:  ./slackware/l
PACKAGE SIZE (compressed):  631 K
PACKAGE SIZE (uncompressed):  1660 K
PACKAGE DESCRIPTION:
db3: db3 (Berkeley database library version 3)
db3:
db3: The Berkeley Database (Berkeley DB) library provides embedded database
db3: support for both traditional and client/server applications.
db3:
db3: This package should be installed if compatibility is needed with
db3: databases created with the Berkeley DB version 3.
db3:

PACKAGE NAME:  db31-3.1.17-i486-1.tgz
PACKAGE LOCATION:  ./slackware/l
PACKAGE SIZE (compressed):  495 K
PACKAGE SIZE (uncompressed):  1290 K
PACKAGE DESCRIPTION:
db31: db31 (Berkeley database library version 3.1)
db31:
db31: The Berkeley Database (Berkeley DB) library provides embedded database
db31: support for both traditional and client/server applications.
db31:
db31: This package should be installed if compatibility is needed with
db31: databases created with the Berkeley DB version 3.1.x.
db31:

PACKAGE NAME:  db4-4.2.52-i486-2.tgz
PACKAGE LOCATION:  ./slackware/l
PACKAGE SIZE (compressed):  881 K
PACKAGE SIZE (uncompressed):  2290 K
PACKAGE DESCRIPTION:
db4: db4 (Berkeley database library version 4)
db4:
db4: The Berkeley Database (Berkeley DB) library provides embedded database
db4: support for both traditional and client/server applications.
db4:
db4: This package should be installed if compatibility is needed with
db4: databases created with the Berkeley DB version 4.
 
Old 01-15-2005, 12:24 AM   #3
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
DaHammer, Thanks for your swift answer. I appreciated.

By the way,why there are 2 Berkeley DB?Maybe they will conflict with each other if installed....

And last question,how can I find the installation path of the software?Thanks.
 
Old 01-15-2005, 01:05 AM   #4
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
There are 3 different versions above, I suspect because there are different programs that need different versions of the libraries. I'd think that any conflicts would have been worked out in the packages already since Slackware offers them all, but I'm not certain.

You can unpack the package to find out what all it contains and where it puts it. Just make a directory, put the package in it, and untar it. Or use explodepkg.
 
Old 01-15-2005, 04:36 AM   #5
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
they do not conflict. I think slack 10 comes with db-4.x and db-3.x but you could also use 1.85 (but it would be better if you need 1.85 to use db-3.x with 1.85 compatibility).
 
Old 01-15-2005, 05:32 AM   #6
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Berkeley DB & Postfix

Thanks all the reply from you guys.This time I have another question regarding Berkeley DB with Postfix.

My question is that when I compiled Postfix with Cyrus-IMAPD and Berkeley DB,the compilation cannot be completed because the error message said No db.h found.However,the db.h sits in the berkeley db's include folder (usr/local/bdb/include).I have done a lot of research on this one but with no luck.

Do you guys have any suggestions??Answer seems hard to find.
 
Old 01-15-2005, 05:38 AM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
well you have a couple options.

1) symlink that header ( and others if it needs them) to /usr/local/include

2) set your CFLAGS like this (choose one):

export CFLAGS="-I/usr/local/bdb/include"

OR

CFLAGS="-I/usr/local/bdb/include" ./configure .............

OR

make CFLAGS="-I/usr/local/bdb/include"

the reason its telling you it can't find it is because you installed it into /usr/local/bdb but the sytem doesn't search there for headers by default
 
Old 01-15-2005, 06:09 AM   #8
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Thanks a lot,_J.

By the way, I have seen some successful examples which modified the makedeps file.By modifying the line starting with Linux #2,appending ...

Quote:
elif [ -f /usr/local/BerkeleyDB.4.1/include/db.h ]
then
CCARGS="$CCARGS -I/usr/local/BerkeleyDB.4.1/include"
However,it wouldn't work for me..So, I will try your suggestion and tell you the result.

P.S. Do you mind telling me the meaning of CFLAGS??Thanks!
 
Old 01-15-2005, 06:23 AM   #9
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
CFLAGS is what you pass to the compiler as options more or less. so lets say you want to include a directory of includes do like above. or if you want to optimize a build you could:

export CFLAGS=" -O3 -mcpu=athlon-xp -march=athlon-xp -funroll-loops -pipe" and so on

for libraries you *could* use LDFLAGS (i say could because it is better to use /etc/ld.so.conf and ldconfig
but sometimes if you want to build things non-standard you have to work around some things):

export LDFLAGS="-L/home/joe/lib" would cause the linker to search /home/joe/lib

keep in mind if you export the variables like above, they only last for the session you are in (until you logout or close the xterm/console).

Also keep in mind if you use LDFLAGS to force the linker to find libraries in a non-standard location but they are not in you libpath (as defined in /etc/ld.so.conf) the program will link find but will be unable to find the libraries at run time. To get around this:

export LD_LIBRARY_PATH=/home/joe/lib:$LD_LIBRARY_PATH

sets /home/joe/lib as the first directory searched by the dynamic linker at runtime and:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/joe/lib

sets /home/joe/lib as the last directory searched.

p.s. - I should probably add one more thing:
I you do set CFLAGS for optimization like above, don't get too carried away and add everything under the sun. You might get less than stellar results (abnormal program behavior, crashes, etc...).

Last edited by __J; 01-15-2005 at 06:35 AM.
 
Old 01-15-2005, 10:28 PM   #10
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
Hello!

_J, I have done what you said with the argument as follows:

Quote:
make makefiles 'CCARGS=-DHAS_MYSQL \
-I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH \
-I/usr/local/include/sasl -I/usr/local/bdb/include' 'AUXLIBS=-L/usr/local/mysql/lib/mysql \
-lmysqlclient -lz -lm -L/usr/local/lib -lsasl2 -L/usr/local/bdb/lib'
However,the error continues show up on my screen.Do you have such problems when you compiled your Postfix with Cyrus+MySQL?Please advise.

Thanks.
 
Old 01-15-2005, 10:51 PM   #11
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
2 things:

first, did you install the slack packages for db?

second, notice in my examples above the quotes for CFLAGS and LDFLAGS begin after the = sign. So try this and see if it helps:

CCARGS="options....."
and when including a directory of libraries for linking:

LDFLAGS="directories...."

if that doesn't work try the symlinks and see if that works:

ln -s /usr/local/bdb/include/db.h /usr/local/include/db.h

which would put the header directly in the include path (If it is truly looking for db.h then there is no reason why this should fail).

Hope this helps.
 
Old 01-15-2005, 11:02 PM   #12
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Original Poster
Rep: Reputation: 30
It works,half way

__J,thanks a billion for your help.

I can makefiles.However,when I issued make command,the following error occured...

Quote:
dict_db.c:449: error: `db' undeclared (first use in this function)
dict_db.c:569: error: parse error before ')' token
dict_db.c: In function `dict_hash_open':
dict_db.c:606: error: `HASHINFO' undeclared (first use in this function)
dict_db.c:606: error: parse error before "tweak"
dict_db.c:608: error: `tweak' undeclared (first use in this function)
dict_db.c:624: error: `DB_HASH' undeclared (first use in this function)
dict_db.c: In function `dict_btree_open':
dict_db.c:633: error: `BTREEINFO' undeclared (first use in this function)
dict_db.c:633: error: parse error before "tweak"
dict_db.c:635: error: `tweak' undeclared (first use in this function)
dict_db.c:650: error: `DB_BTREE' undeclared (first use in this function)
make: *** [dict_db.o] Error 1
make: *** [update] Error 1
It's just a portion of error message.Sorry for my stupid question because I don't have much experience on compiling.

Thanks.
 
  


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
Berkeley DB aesthete Linux - Software 1 02-12-2005 09:07 AM
Perl and Berkeley db zolley Linux - Newbie 0 06-07-2004 05:43 AM
Can I upgrade to 10.0 without deleting the original 9.0 install? BigCliff1951 Mandriva 1 05-09-2004 01:44 AM
Unreal Tournament (original, GOTY) won't run after install infidel Linux - Software 3 03-30-2004 03:24 PM
cannot install berkeley db3 / db3_load on redhat mr_r Linux - Software 4 11-11-2003 09:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:28 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