Subject: Perl Build Failure in libpthread with 2.0rc4 i386 system
To: None <tech-pkg@netbsd.org>
From: Glendon Gross <gross@xinetd.com>
List: tech-pkg
Date: 11/19/2004 20:26:09
Which of these apply, if any? [netbsd]
Operating system name? [netbsd]
Operating system version? [2.0_rc4]
Build Perl for SOCKS? [n]
Use the PerlIO abstraction layer? [y]
Build a threading Perl? [n]
Build Perl for multiplicity? [n]
Use which C compiler? [gcc]
Checking for GNU cc in disguise and/or its version number...
Now, how can we feed standard input to your C preprocessor...
Directories to use for library searches? [/usr/pkg/lib /usr/lib]
What is the file extension used for shared libraries? [so]
Try to use long doubles if available? [n]
Checking for optional libraries...
What libraries to use? [-lm -lcrypt -lpthread]
What optimizer/debugger flag should be used? [-O2 -O]
Any additional cc flags? [-fno-strict-aliasing -I/usr/pkg/include]
Let me guess what the preprocessor flags are...
Any additional ld flags (NOT including libraries)?
[-Wl,-R/usr/pkg/lib  -L/usr/pkg/lib]
Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

        gcc -o try -O2 -O -fno-strict-aliasing -I/usr/pkg/include 
-Wl,-R/usr/pkg
/lib -L/usr/pkg/lib try.c -lm -lcrypt -lpthread
         ./try

and I got the following output:

/usr/lib/libpthread.so: undefined reference to `_ksem_getvalue'
/usr/lib/libpthread.so: undefined reference to `_sys_read'
/usr/lib/libpthread.so: undefined reference to `_ksem_wait'
/usr/lib/libpthread.so: undefined reference to `_sys_msgrcv'
/usr/lib/libpthread.so: undefined reference to `sa_enable'
/usr/lib/libpthread.so: undefined reference to `_sys_open'
/usr/lib/libpthread.so: undefined reference to `_sys_wait4'
/usr/lib/libpthread.so: undefined reference to `_sys_write'
/usr/lib/libpthread.so: undefined reference to `__sigtimedwait'
/usr/lib/libpthread.so: undefined reference to `__libc_sigaction14'
/usr/lib/libpthread.so: undefined reference to `_ksem_open'
/usr/lib/libpthread.so: undefined reference to `rasctl'
/usr/lib/libpthread.so: undefined reference to `_ksem_unlink'
/usr/lib/libpthread.so: undefined reference to `_lwp_wakeup'
/usr/lib/libpthread.so: undefined reference to `_sys_msgsnd'
/usr/lib/libpthread.so: undefined reference to `_sys_poll'
/usr/lib/libpthread.so: undefined reference to `sa_unblockyield'
/usr/lib/libpthread.so: undefined reference to `_sys_pread'
/usr/lib/libpthread.so: undefined reference to `sa_register'
/usr/lib/libpthread.so: undefined reference to `_sys_execve'
/usr/lib/libpthread.so: undefined reference to `_sys_fcntl'
/usr/lib/libpthread.so: undefined reference to `_sys_close'
/usr/lib/libpthread.so: undefined reference to `_sigtimedwait'
/usr/lib/libpthread.so: undefined reference to `makecontext'
/usr/lib/libpthread.so: undefined reference to `_sys_accept'
/usr/lib/libpthread.so: undefined reference to `_ksem_trywait'
/usr/lib/libpthread.so: undefined reference to `_sys_fsync'
/usr/lib/libpthread.so: undefined reference to `sa_stacks'
/usr/lib/libpthread.so: undefined reference to `__isthreaded'
/usr/lib/libpthread.so: undefined reference to `_sys_writev'
/usr/lib/libpthread.so: undefined reference to `_sys_nanosleep'
/usr/lib/libpthread.so: undefined reference to `_ksem_close'
/usr/lib/libpthread.so: undefined reference to `_sys_connect'
/usr/lib/libpthread.so: undefined reference to `_sys_select'
/usr/lib/libpthread.so: undefined reference to `_sys___sigsuspend14'
/usr/lib/libpthread.so: undefined reference to `_ksem_post'
/usr/lib/libpthread.so: undefined reference to `_ksem_destroy'
/usr/lib/libpthread.so: undefined reference to `pthread_atfork'
/usr/lib/libpthread.so: undefined reference to `_sys_readv'
/usr/lib/libpthread.so: undefined reference to `_sys___msync13'
/usr/lib/libpthread.so: undefined reference to `_sys_pwrite'
/usr/lib/libpthread.so: undefined reference to `sa_yield'
/usr/lib/libpthread.so: undefined reference to `_ksem_init'
collect2: ld returned 1 exit status
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]
Ok.  Stopping Configure.
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/lang/perl58
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/lang/perl58
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/lang/perl58
*** Error code 1

Stop.