Operating System - HP-UX
1752587 Members
3689 Online
108788 Solutions
New Discussion юеВ

Is "ndbm" library already comes with HP-UX 11i?

 
Andrew Lee_5
Occasional Advisor

Is "ndbm" library already comes with HP-UX 11i?

I am writing a c++ program that will be ported to HP-UX 11i. It had used the "ndbm" library. I want to know whether the ndbm is a standard library or need to install seperately.
It will be compiled with gcc compiler.
Thanks!

Andrew Lee
6 REPLIES 6
Michael Tully
Honored Contributor

Re: Is "ndbm" library already comes with HP-UX 11i?

The include file comes as part of this subset.

HPUXBase64 --> ProgSupport --> Runtime --> C-INC

From my server I found it this way.

# swlist -l file | grep -i ndbm >/tmp/wrk
# more /tmp/wrk
OS-Core.CORE-SHLIBS: /usr/lib/libndbm.2
OS-Core.CORE-SHLIBS: /usr/lib/libndbm.sl
PHCO_23251.PAUX-ENG-A-MAN: /usr/share/man/man3.Z/ndbm.3x
Perl5.PERL-RUN: /opt/perl/html/lib/NDBM_File.html
Perl5.PERL-RUN: /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/NDBM_File.pm

Perl5.PERL-RUN: /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/auto/NDBM_File

Perl5.PERL-RUN: /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/auto/NDBM_File/NDB
M_File.bs
Perl5.PERL-RUN: /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/auto/NDBM_File/NDB
M_File.sl
Perl5.PERL-RUN: /opt/perl/man/man3/NDBM_File.3
ProgSupport.C-INC: /usr/include/ndbm.h
ProgSupport.PAUX-ENG-A-MAN: /usr/share/man/man3.Z/ndbm.3x
ProgSupport.PAUX-JPN-E-MAN: /usr/share/man/ja_JP.eucJP/man3.Z/ndbm.3x

ProgSupport.PAUX-JPN-S-MAN: /usr/share/man/ja_JP.SJIS/man3.Z/ndbm.3x

ProgSupport.PROG-AUX: /usr/lib/libndbm.a

Try and re-install this portion, it should be on your Core OS CD.

HTH
Michael
Anyone for a Mutiny ?
Sridhar Bhaskarla
Honored Contributor

Re: Is "ndbm" library already comes with HP-UX 11i?

Hi Andrew,

Hashed key database library, ndbm does come with HP-UX. The library is part of OS core shared libraries.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
H.Merijn Brand (procura
Honored Contributor

Re: Is "ndbm" library already comes with HP-UX 11i?

Although it is shipped with HP-UX, you could consider a hop to the free available Berkeley-DB (DB), GDBM, SDBM, or ODBM

Not that NDBM is bad, but some applications run much better on Berkeley-DB (which offers four different indexing methods) or GDBM. It all depends on how your data is accessed. Many reads, many writes, many traversals, many `shared' operation, and such.

I've used all above, and for huge processes it payed off to switch. Wheneven in doubt: benchmark.

Berkeley DB http://www.sleepycat.com/download.html

GDBM ftp://download.xs4all.nl/pub/mirror/gnu/gdbm/


Facts from "Perl Cookbook", chapter 14: Database Access, 14.0 Introduction :

SDBM, GDBM, and DB are open source. NDBM is not, so if there is a bug in NDBM, you will have to wait till the vendor issues an update

All packages are also available for WIndoze, making porting easier

SDBM is very small in code size and has low disk usage, but is slow. On avarage the speed comparison is (slow to fast) SDBM, GDBM & NDBM, DB

NDBM has a 4k block size limit, SDBM 1k, and GDBM and DB have no limits

DB is byte-order independant, and supports user defined sort order and partial key lookups. The other three are byte order dependant (no HP-UX to Windoze interaction) and offer no extra features.

HTH
Enjoy, Have FUN! H.Merijn
Andrew Lee_5
Occasional Advisor

Re: Is "ndbm" library already comes with HP-UX 11i?

Thanks guys!
It's not a short story...
You may seen from my previous posts, I just switched from gdbm to ndbm. As I could not compile my cpp in HP-UX even it could be compiled in Linux. I thought it was the problem on the gdbm library. I'd tried to install the gdbm for many times, but still fail. So I switched to ndbm. Because I knew the ndbm comes with HP-UX, I thought it is less risky. Unluckily... still fail.

I want to ask whether SDBM and DB comes with HP-UX 11i or not?
And any known issues need to consider on HP-UX?

Thanks a lot!

Andrew Lee
H.Merijn Brand (procura
Honored Contributor

Re: Is "ndbm" library already comes with HP-UX 11i?

Berkeley_DB (DB) for sure is not a standard ship. I don't know about SDBM, which never has been a serious choice for me.

Be sure to build Berkeley_DB as a shared library. I can make my port available on https://www.beepz.com/personal/merijn if you want (10.20 or 11.00 only. I have no 11i)
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: Is "ndbm" library already comes with HP-UX 11i?

If you want: just uploaded https://www.beepz.com/personal/merijn/db-pa2.0.tbz which contains:

Berkeley_DB 4.0.14
GDBM 1.8.0

All build on HP-UX 11.00 with HP C-ANSI-C

bin/db_archive: PA-RISC2.0 shared executable dynamically linked
bin/db_checkpoint: PA-RISC2.0 shared executable dynamically linked
bin/db_deadlock: PA-RISC2.0 shared executable dynamically linked
bin/db_dump: PA-RISC2.0 shared executable dynamically linked
bin/db_load: PA-RISC2.0 shared executable dynamically linked
bin/db_printlog: PA-RISC2.0 shared executable dynamically linked
bin/db_recover: PA-RISC2.0 shared executable dynamically linked
bin/db_stat: PA-RISC2.0 shared executable dynamically linked
bin/db_upgrade: PA-RISC2.0 shared executable dynamically linked
bin/db_verify: PA-RISC2.0 shared executable dynamically linked
include/db.h: c program text
include/db_cxx.h: c program text
include/db_int.h: c program text
include/gdbm.h: c program text
info/gdbm.info: c program text
lib/libdb-3.3.11.sl: PA-RISC2.0 shared library -not stripped
lib/libdb-3.3.sl: PA-RISC2.0 shared library -not stripped
lib/libdb-4.0.14.sl: PA-RISC2.0 shared library -not stripped
lib/libdb-4.0.sl: PA-RISC2.0 shared library -not stripped
lib/libdb-4.sl: PA-RISC2.0 shared library -not stripped
lib/libdb.sl: PA-RISC2.0 shared library -not stripped
lib/libgdbm-1.8.0.sl: PA-RISC2.0 shared library -not stripped
lib/libgdbm.sl: PA-RISC2.0 shared library -not stripped

docs to be fetched yourself from sleepycat
Enjoy, Have FUN! H.Merijn