I am able to emerge htdig, but even running as root and with correct permissions htdig complains about not being able to create/open the database file. aja@gentoo.org has replicated it and will provide an strace. Reproducible: Always Steps to Reproduce: 1. emerge htdig 2. If you wish, edit your /usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/htdig.conf so that "start_url" and "database_dir" are set to your preferences. It won't make any difference. 3. Run htdig as root. Actual Results: After a short delay, you receive the message: thehtdig: Unable to open/create document database '/usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/db/db.docdb' And you can check that the file has indeed been created and is of zero length. Note: the short delay does not occur when running without proper permissions (non-root). Expected Results: It should have begun indexing the site instead of complaining about not being able to open the database file. Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.3, glibc-2.3.5-r0, 2.6.12-gentoo-r6 x86_64) ================================================================= System uname: 2.6.12-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 2800+ Gentoo Base System version 1.6.12 ccache version 2.3 [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-pipe -march=athlon64 -O3 -ffast-math -momit-leaf-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -march=athlon64 -O3 -ffast-math -momit-leaf-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks nostrip sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X alsa audiofile avi berkdb bitmap-fonts browserplugin cdparanoia cdr crypt cups curl dbus debug doc dvd eds emboss encode esd fam ffmpeg foomaticdb gif gpm hal i8x0 imagemagick imlib java jce joystick jpeg kde kdeenablefinal lm_sensors logitech-mouse lzw lzw-tiff mad mozilla mp3 mpeg mysql ncurses nls nvidia ogg opengl oss pam pdflib perl png python qt quicktime readline real sdl spell sqlite ssl tcltk tcpd tiff truetype-fonts type1-fonts usb userlocales vcd vorbis xine xml2 xpm xscreensaver xv xvmc zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Also see http://sourceforge.net/mailarchive/message.php?msg_id=9545104
strace results: oberon / # strace htdig execve("/usr/bin/htdig", ["htdig"], [/* 56 vars */]) = 0 uname({sys="Linux", node="oberon", ...}) = 0 brk(0) = 0x59f000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac0000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=19867, ...}) = 0 mmap(NULL, 19867, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aaaaaac1000 close(3) = 0 open("/lib/libz.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\32\0"..., 640) = 640 fstat(3, {st_mode=S_IFREG|0755, st_size=82080, ...}) = 0 mmap(NULL, 1127688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaabc1000 mprotect(0x2aaaaabd4000, 1049864, PROT_NONE) = 0 mmap(0x2aaaaacd4000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x2aaaaacd4000 close(3) = 0 open("/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/libstdc++.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\316"..., 640) = 640 fstat(3, {st_mode=S_IFREG|0755, st_size=1174126, ...}) = 0 mmap(NULL, 2029360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaacd5000 mprotect(0x2aaaaadab000, 1152816, PROT_NONE) = 0 mmap(0x2aaaaaeaa000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd5000) = 0x2aaaaaeaa000 mmap(0x2aaaaaeb2000, 75568, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaeb2000 close(3) = 0 open("/lib/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240>\0\0"..., 640) = 640 lseek(3, 624, SEEK_SET) = 624 read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\4\0\0\0"..., 32) = 32 fstat(3, {st_mode=S_IFREG|0755, st_size=569744, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaec5000 mmap(NULL, 1593832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaaaec6000 mprotect(0x2aaaaaf4b000, 1049064, PROT_NONE) = 0 mmap(0x2aaaab04a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x84000) = 0x2aaaab04a000 close(3) = 0 open("/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/libgcc_s.so.1", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \35\0\0"..., 640) = 640 fstat(3, {st_mode=S_IFREG|0644, st_size=200666, ...}) = 0 mmap(NULL, 1091456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaab04c000 mprotect(0x2aaaab057000, 1046400, PROT_NONE) = 0 mmap(0x2aaaab156000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x2aaaab156000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\315"..., 640) = 640 lseek(3, 624, SEEK_SET) = 624 read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\4\0\0\0"..., 32) = 32 fstat(3, {st_mode=S_IFREG|0755, st_size=1253024, ...}) = 0 mmap(NULL, 2250120, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2aaaab157000 mprotect(0x2aaaab273000, 1086856, PROT_NONE) = 0 mmap(0x2aaaab372000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11b000) = 0x2aaaab372000 mmap(0x2aaaab378000, 17800, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2aaaab378000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaab37d000 mprotect(0x2aaaab372000, 12288, PROT_READ) = 0 mprotect(0x2aaaaabbf000, 4096, PROT_READ) = 0 munmap(0x2aaaaaac1000, 19867) = 0 open("/dev/urandom", O_RDONLY) = 3 read(3, "\377\275\337\357s\10\346\373", 8) = 8 close(3) = 0 brk(0) = 0x59f000 brk(0x5c0000) = 0x5c0000 access("/usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/htdig.conf", R_OK) = 0 open("/usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/htdig.conf", O_RDONLY) = 3 read(3, "#\n# Example config file for ht:/"..., 8191) = 8191 read(3, " alt=\"10\">\'\n\n# local variables:\n"..., 8191) = 270 read(3, "", 8191) = 0 close(3) = 0 brk(0x5e1000) = 0x5e1000 stat("/var/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 access("//usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/db/db.docdb", F_OK) = 0 open("//usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/db/db.docdb", O_RDWR) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 read(3, "", 512) = 0 close(3) = 0 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout) open("//usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/db/db.docdb", O_RDWR) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 read(3, "", 512) = 0 close(3) = 0 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout) open("//usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/db/db.docdb", O_RDWR) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 read(3, "", 512) = 0 close(3) = 0 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout) open("//usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/db/db.docdb", O_RDWR) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 read(3, "", 512) = 0 close(3) = 0 stat("/var/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0 getpid() = 27967 open("/var/tmp/027967", O_RDWR|O_CREAT|O_EXCL, 0600) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 lseek(3, 0, SEEK_END) = 0 lseek(3, 24576, SEEK_CUR) = 24576 write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096 mmap(NULL, 28672, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x2aaaaaac1000 getpid() = 27967 fcntl(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0 fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=1}) = 0 close(3) = 0 unlink("/var/tmp/027967") = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaaac8000 write(1, "htdig: Unable to open/create doc"..., 112htdig: Unable to open/create document database '//usr/share/webapps/htdig/3.1.6-r7/hostroot/htdig/db/db.docdb' ) = 112 munmap(0x2aaaaaac8000, 4096) = 0 exit_group(1) = ?
Note: 3.2.0_beta6 is unaffected
do you have a non-amd64 box by chance to verify it's a amd64-related problem?
I try to install www-misc/htdig-3.1.6-r7 on two Pentium 4 system and two Amd64 systems. Result is stable: Amd64: htdig: Unable to open/create document database '//usr/share/webapps/ htdig/3.1.6-r7/hostroot/htdig/db/db.docdb' Pentium4: OK (no messages)
thanks, in that case it's not arch-specific
May be I make some errors in my previous post... When I try to prepare documentation in KDevelop on my job box I receive error. Then I go here and found that it is known bug. And You ask to verify it on x86 machines. I have access to some number of Gentoo boxes (installed by me). I use 2 with Pentium4 (CHOST=i686-pc-linux-gnu, CFLAGS="-march=pentium4 -O2 -pipe -fomit- frame-pointer") processor and 2 with AMD Athlon 64 3000+ (CHOST=x86_64-pc-linux- gnu, CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"). To all machines I preinstall www-misc/htdig-3.1.6-r7... Results: - on BOTH X86 (Pentium4) machines htdig works PROPERLY. - on BOTH X86_64 (AMD64) machines htdig FAILS (error message were posted early). I think that is arch-specific bug!
amd64 - can you help verify / reproduce?
amd64 - ping
(In reply to comment #8) > amd64 - can you help verify / reproduce? > If it question for me too, I can.
Same problem here:htdig-3.1.6-r7 works fine on the X86 systems here, it won't work on x86_64 (amd64). The included db-code in htdig-3.1.6-r7 is too old to handle 64-bit access correctly (no more investigations done when i came over this issue). htdig-3.2.0_beta6 makes it for my amd64 box
If 3.1.6-r8 doesn't work either, please test and stable 3.2.0_beta6-r1
3.1.6-r8 does not work. 3.2.0_beta6-r1 does, so I had to mark the beta stable on amd64.