From owner-freebsd-database Tue Oct 3 8: 7:15 2000 Delivered-To: freebsd-database@freebsd.org Received: from osiris.ipform.ru (osiris.ipform.ru [212.158.165.98]) by hub.freebsd.org (Postfix) with ESMTP id AB7ED37B503; Tue, 3 Oct 2000 08:07:02 -0700 (PDT) Received: from wp2 (wp2 [192.168.0.12]) by osiris.ipform.ru (8.11.0/8.11.0) with SMTP id e93F6H805884; Tue, 3 Oct 2000 19:06:19 +0400 (MSD) (envelope-from matrix@ipform.ru) Message-ID: <00c301c02d4b$7d445040$0c00a8c0@ipform.ru> From: "Artem Koutchine" To: "xuyifeng" , "Dan Nelson" Cc: , References: <037201c02a10$e72e7a00$0c00a8c0@ipform.ru> <20000929095555.A14858@dan.emsphone.com> <00dd01c02ac4$8280a740$0c00a8c0@ipform.ru> <20000930142736.A13227@dan.emsphone.com> <006201c02d3a$ddd12c00$1801a8c0@xyf> Subject: Re: Where is Berkley DB libdb? Date: Tue, 3 Oct 2000 19:06:16 +0400 Organization: IP Form MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-database@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG So, lets get to it onces again. Given: db file created with 2.7.0 os Linux Slackware FreeBSD 4.1.1-stable with 1.85 included in libc (damn it, get it out of there!) perl 5.005_03 on FreeBSD host DB_File which comes with perl Need to accomplish: read that db file on FreeBSD host Problems: cannot read that db file on FreeBSD host Solution: install db 2.7.7 from ports install DB_File 1.73 from CPAN (supposed to support db up to 3.x) try to build DB_File linked agains the 2.7.7 version of DB: 1) perl Makefile.PL complains: Note (probably harmless): No library found for -ldb 2) try a little hack and make a link from db2 to db still 'Note (probably harmless): No library found for -ldb' 3) hell with it, open generate Makefile, add -ldb2 to LDFLAGS make make test make install try to open the - no luck , which means db lib is still taken from libc I do not understand how to make DB_File use db 2.7.7 instead of 1.85 built in in libc. Result: somebody needs to do something about it Artem ----- Original Message ----- From: "xuyifeng" To: "Dan Nelson" ; "Artem Koutchine" Cc: ; Sent: Tuesday, October 03, 2000 4:54 PM Subject: Re: Where is Berkley DB libdb? > Anyway, Berkeley DB shouldn't be included in libc, it is a stupid design, > it causes problem, sucks. but I suspect it is difficult to simply split dblib > from libc, this may breaks many FreeBSD things. > > XuYifeng > > ----- Original Message ----- > From: Dan Nelson > To: Artem Koutchine > Cc: ; > Sent: Sunday, October 01, 2000 3:27 AM > Subject: Re: Where is Berkley DB libdb? > > > > In the last episode (Sep 30), Artem Koutchine said: > > > From: "Dan Nelson" > > > > In the last episode (Sep 29), Artem Koutchine said: > > > > > 3) How can i avoid all this mess and make every single executable > > > > > use the version i have installed (2.7.7). > > > > > > > > If you really want to use a single version of DB across the board, use > > > > DB 3.1.17 (it's in ports). > > > > > > >From questions (1) and (2) the conclusion is that i cannot make my system > > > use any other version but the one compiled in libc (somebody compiled > > > libdb into libc statically, sux). > > > > Sure you can. Berkeley DB versions 1, 2, and 3 all use completely > > different function calls. V1 uses dbopen(), V2 uses db_open(), v3 uses > > db_create(). They don't interfere with each other. libc provides DB > > 1.85. If you want db2 or db3, you'll need to manually link in that > > library and make sure you use either db_open() or db_create() to access > > your datbase files. > > > > > > > All this is causing me a lot of trouble, because DB_File cannot > > > > > access db files created on Linux (Mandrake 7.1 and some version of > > > > > Slackware, i think it is latest). I have multi-os development office, > > > > > so, no os wars. > > > > > > > > I'd say the answer is "don't do that" :) Rebuild your DB file from the > > > > source file on each machine you use it on, or switch to a client-server > > > > databse like mysql. > > > > > > Mysql is used here and it's ok. DB is used for low level tasks. Could > > > please explain why i shouldn't do that? > > > > I said that thinking that maybe DB files created on Linux might not > > work on FreeBSD. After looking at the docs for DB3.1, it looks like > > the database files should be portable across all systems DB3.1 > > supports. > > > > -- > > Dan Nelson > > dnelson@emsphone.com > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-database" in the body of the message