Subject: Re: could not determine version of /usr/lib/libpthread.so
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 09/26/2003 19:33:18
On Fri, 26 Sep 2003, Jeremy C. Reed wrote:

> Note that my previous email and PR #22052 say:
>
>        Use the shared library, but some functions are only in the
>        static library, so try that secondarily.
>
> So my errors are probably referring to those "some functions" that are
> missing.

I read this wrong.

That GNU ld link script also refers to a /usr/lib/libpthread_nonshared.a
file too. Maybe that is the one that is supposed to be used?

Looking at the build log from my successful build (without pkgsrc), I see
that it never refers to libpthread.so or .a. It always uses "-pthread".

My pkgsrc has:

PTHREAD_TYPE as native.

BUILDLINK_PREFIX.pthread  is /usr

BUILDLINK_FILES.pthread is include/pthread.h lib/libpthread.*

BUILDLINK_CFLAGS.pthread is -pthread

LIBTOOL_ARCHIVE_UNTRANSFORM_SED is
-e "s|/usr/lib/libpthread.la|-lpthread|g"  -e
"s|/usr/lib/libpthread.la|-lpthread|g"

BUILDLINK_LDFLAGS.pthread is -lpthread

My work.puget//.buildlink/.pthread_buildlink_done contains:
/usr/include/pthread.h
/usr/lib/libpthread.a
/usr/lib/libpthread.so

I also have these files:
lrwxrwxrwx    1 reed     reed           21 Sep 27 01:40
work.puget//.buildlink/lib/libpthread.a -> /usr/lib/libpthread.a
-rw-r--r--    1 reed     reed          764 Sep 27 01:40
work.puget//.buildlink/lib/libpthread.la
lrwxrwxrwx    1 reed     reed           22 Sep 27 01:40
work.puget//.buildlink/lib/libpthread.so -> /usr/lib/libpthread.so

And work.puget//.buildlink/lib/libpthread.la is:

# libpthread.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.4a (1.641.2.255 2001/05/22
10:39:30)
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libpthread.so.0'

# Names of this library.
library_names='libpthread.so.0.0 libpthread.so.0 libpthread.so'

# The name of the static archive.
old_library='libpthread.a'

# Libraries that this one depends upon.
dependency_libs=''

# Version information for libpthread.
current=0
age=0
revision=0

# Is this an already installed library?
installed=yes

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/lib'

# This file has been modified by buildlink2.


I wonder if my /usr/lib/libpthread_nonshared.a should be listed above???

Should I send-pr this?

   Jeremy C. Reed
   http://bsd.reedmedia.net/