On Thu, Mar 27, 2008 at 03:16:54PM +0200, Ross Cameron wrote: > Hi there all,... > > I used to maintain a small semi-embedded GNU/Linux system at my > previous employer and I really enjoyed that. > But now I'd like to try my had at building a dedicated OSPF/BGP > route/firewall appliance based on OpenBSD. > > I have a particular liking for the pkgutils package manager written by > Per Linden and would like to build my own OpenBSD using this package > manager (yeah I'm bored). > 'Cept I'm having an issue compiling it,... > > I've installed OpenBSD 4.2-release with no updates as yet (I'm behind > an ISA proxy :( and they block just about the whole planet lol) > > On top of that I've installed: > gmake-3.80p1.tgz > libiconv-1.9.2p3.tgz > gettext-0.14.6p0.tgz > And installed libarchive-2.4.14 from source (couldn't find a binary package) > > When I try compile the package (pkgutils-5.32.0) I get the following output: > > # gmake > g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.32.0\" > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -MM main.cc pkgutil.cc > pkgadd.cc pkgrm.cc pkginfo.cc > .depend > g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.32.0\" > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o main.o main.cc > g++ -DNDEBUG -O2 -Wall -pedantic -D_GNU_SOURCE -DVERSION=\"5.32.0\" > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c -o pkgutil.o > pkgutil.cc > pkgutil.cc: In member function `void pkgutil::db_open(const std::string&)': > pkgutil.cc:75: error: no matching function for call to ` > __gnu_cxx::stdio_filebuf<char, std::char_traits<char> > >::stdio_filebuf(int&, > const std::_Ios_Openmode&, int)' > [...]
You basically omitted all useful details, especially where to get those pkgutils and what the code around line 75 looks like. Also don't post private mails to this list please. The code looks like this (useless bits deleted): int fd = open(filename.c_str(), O_RDONLY); stdio_filebuf<char> filebuf(fd, ios::in, getpagesize()); stdio_filebuf is GNU extension (god kills a kitten for every GNU extension, please don't write extensions, think of the kittens!) to libstdc++ which is part of GCC. The constructor declaration from gcc 3.3.5 look like this: stdio_filebuf(int __fd, std::ios_base::openmode __mode, bool __del, size_t __size); Looking at the same thing in a very recent gcc version (4.3), it looks like this: stdio_filebuf(int __fd, std::ios_base::openmode __mode, size_t __size = static_cast<size_t>(BUFSIZ)); __del means close the file and is now always true. stdio_filebuf<char> filebuf(fd, ios::in, true, getpagesize()); should do the trick (untested) Of course all of this has nothing to do with OpenBSDs libc, but with people who change APIs without thinking...