Hi all,
I'm trying to compile PostgreSQL with the support for dtrace, and since it is not clear to me how to do this through the ports I've compiled from source with the --enable-dtrace option. I've followed the steps reported here to enable dtrace userland, and the compiling went fine. But when I launch initdb I got the error:
Of course the program is there. I've tried to recompile the postgresql without dtrace and then the initdb and other tools just work, so it must be a problem with dtrace userland.
The following is the output of truss:
Am I doing something wrong with my installation?
Thanks
I'm trying to compile PostgreSQL with the support for dtrace, and since it is not clear to me how to do this through the ports I've compiled from source with the --enable-dtrace option. I've followed the steps reported here to enable dtrace userland, and the compiling went fine. But when I launch initdb I got the error:
Code:
fgets failure: No such file or directory
The program "postgres" is needed by initdb but was not found in the
same directory as "/usr/local/pgsql/bin/initdb".
Check your installation
Of course the program is there. I've tried to recompile the postgresql without dtrace and then the initdb and other tools just work, so it must be a problem with dtrace userland.
The following is the output of truss:
Code:
__sysctl(0xbfbfe754,0x2,0xbfbfe75c,0xbfbfe760,0x0,0x0) = 0 (0x0)
mmap(0x0,336,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 671678464 (0x28090000)
munmap(0x28090000,336) = 0 (0x0)
__sysctl(0xbfbfe7b8,0x2,0x28086e3c,0xbfbfe7c0,0x0,0x0) = 0 (0x0)
mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 671678464 (0x28090000)
issetugid(0x2807fa47,0xbfbfe880,0x104,0x0,0x0,0x0) = 0 (0x0)
open("/etc/libmap.conf",O_RDONLY,0666) ERR#2 'No such file or directory'
access("/usr/local/pgsql/lib/libc.so.7",0) ERR#2 'No such file or directory'
open("/var/run/ld-elf.so.hints",O_RDONLY,00) = 2 (0x2)
read(2,"Ehnt\^A\0\0\0\M^@\0\0\0-\0\0\0\0"...,128) = 128 (0x80)
lseek(2,0x80,SEEK_SET) = 128 (0x80)
read(2,"/lib:/usr/lib:/usr/lib/compat:/u"...,45) = 45 (0x2d)
close(2) = 0 (0x0)
access("/lib/libc.so.7",0) = 0 (0x0)
open("/lib/libc.so.7",O_RDONLY,00) = 2 (0x2)
fstat(2,{ mode=-r--r--r-- ,inode=1813528,size=1346561,blksize=16384 }) = 0 (0x0)
pread(0x2,0x28085d80,0x1000,0x0,0x0,0x0) = 4096 (0x1000)
mmap(0x0,1155072,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 671711232 (0x28098000)
mmap(0x28098000,1036288,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE,2,0x0) = 671711232 (0x28098000)
mmap(0x28195000,24576,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED,2,0xfd000) = 672747520 (0x28195000)
mprotect(0x2819b000,94208,PROT_READ|PROT_WRITE) = 0 (0x0)
close(2) = 0 (0x0)
sysarch(0xa,0xbfbfe820,0x2805639b,0x280852f8,0x28068f09,0x280852f8) = 0 (0x0)
mmap(0x0,712,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 672866304 (0x281b2000)
munmap(0x281b2000,712) = 0 (0x0)
mmap(0x0,21904,PROT_READ|PROT_WRITE,MAP_ANON,-1,0x0) = 672866304 (0x281b2000)
munmap(0x281b2000,21904) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|
SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
__sysctl(0xbfbfe7d4,0x2,0x2819c740,0xbfbfe7dc,0x0,0x0) = 0 (0x0)
sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|
SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0)
sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0)
__sysctl(0xbfbfdab0,0x2,0x281a1400,0xbfbfdabc,0x0,0x0) = 0 (0x0)
__sysctl(0xbfbfd9e4,0x2,0xbfbfd97c,0xbfbfd9ec,0x2818d5b4,0xc) = 0 (0x0)
__sysctl(0xbfbfd97c,0x2,0x281a14f8,0xbfbfda28,0x0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0xbfbfdac3,1024) ERR#2 'No such file or directory'
issetugid(0x2818c2d1,0xbfbfdac3,0x400,0xbfbfdabc,0x0,0x0) = 0 (0x0)
break(0x8100000) = 0 (0x0)
__sysctl(0xbfbfdd44,0x2,0xbfbfdd4c,0xbfbfdd50,0x0,0x0) = 0 (0x0)
mmap(0x0,1048576,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 672866304 (0x281b2000)
mmap(0x282b2000,319488,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 673914880 (0x282b2000)
munmap(0x281b2000,319488) = 0 (0x0)
__getcwd("/usr/local/pgsql/bin",1024) = 0 (0x0)
stat("/usr/local/pgsql/bin/initdb",{ mode=-rwxr-xr-x ,inode=1250720,size=61669,blksize=16384 }) = 0 (0x0)
access("/usr/local/pgsql/bin/initdb",4) = 0 (0x0)
access("/usr/local/pgsql/bin/initdb",1) = 0 (0x0)
__getcwd("/usr/local/pgsql/bin",1024) = 0 (0x0)
chdir("/usr/local/pgsql/bin") = 0 (0x0)
lstat("initdb",{ mode=-rwxr-xr-x ,inode=1250720,size=61669,blksize=16384 }) = 0 (0x0)
__getcwd("/usr/local/pgsql/bin",1024) = 0 (0x0)
chdir("/usr/local/pgsql/bin") = 0 (0x0)
__getcwd("/usr/local/pgsql/bin",1024) = 0 (0x0)
stat("/usr/local/pgsql/bin/initdb",{ mode=-rwxr-xr-x ,inode=1250720,size=61669,blksize=16384 }) = 0 (0x0)
access("/usr/local/pgsql/bin/initdb",4) = 0 (0x0)
access("/usr/local/pgsql/bin/initdb",1) = 0 (0x0)
__getcwd("/usr/local/pgsql/bin",1024) = 0 (0x0)
chdir("/usr/local/pgsql/bin") = 0 (0x0)
lstat("initdb",{ mode=-rwxr-xr-x ,inode=1250720,size=61669,blksize=16384 }) = 0 (0x0)
__getcwd("/usr/local/pgsql/bin",1024) = 0 (0x0)
chdir("/usr/local/pgsql/bin") = 0 (0x0)
stat("/usr/local/pgsql/bin/postgres",{ mode=-rwxr-xr-x ,inode=1250110,size=4715827,blksize=16384 }) = 0 (0x0)
access("/usr/local/pgsql/bin/postgres",4) = 0 (0x0)
access("/usr/local/pgsql/bin/postgres",1) = 0 (0x0)
pipe(0xbfbfdae4) = 0 (0x0)
vfork(0x2b,0x0,0x28184a31,0x0,0x2820c090,0x0) = 13972 (0x3694)
fcntl(2,F_GETFL,) = 2 (0x2)
close(3) = 0 (0x0)
fstat(2,{ mode=p--------- ,inode=0,size=0,blksize=4096 }) = 0 (0x0)
read(2,0x28211000,4096) = 0 (0x0)
stat("/usr/share/nls/C/libc.cat",0xbfbfcdb4) ERR#2 'No such file or directory'
stat("/usr/share/nls/libc/C",0xbfbfcdb4) ERR#2 'No such file or directory'
stat("/usr/local/share/nls/C/libc.cat",0xbfbfcdb4) ERR#2 'No such file or directory'
stat("/usr/local/share/nls/libc/C",0xbfbfcdb4) ERR#2 'No such file or directory'
writev(0x2,0xbfbfd2c8,0x4,0x4d91bc87,0x0,0xbfbfd2c8) ERR#32 'Broken pipe'
SIGNAL 13 (SIGPIPE)
process exit, rval = 0
Am I doing something wrong with my installation?
Thanks