Problems linking against pthreads
Renaud Waldura
renaud+freebsd-java at waldura.com
Sun Jan 25 14:06:37 PST 2004
I got it. I needed to link the glue library against libc_r.
I attach a patch with my changes, maybe it will help somebody one day...
----- Original Message -----
From: "Renaud Waldura" <renaud+freebsd-java at waldura.com>
To: <freebsd-java at freebsd.org>
Sent: Sunday, January 25, 2004 12:49 PM
Subject: Problems linking against pthreads
> I'm attempting to write an Icecast stream source in Java. I've got Icecast
> 2.0 all built up and working, with all its libraries libshout, libvorbis
> etc.
>
> I have found this package:
> http://benow.ca/index?page=project&project=libshout-java
> that allows me to make calls to libshout from a Java program, but I'm
having
> a hard time getting the library links resolved correctly.
>
> When running a Java program that uses the libshout-java glue, I get:
>
> java.lang.UnsatisfiedLinkError:
> /home/renaud/src/libshout-java-0.1-freebsd/native/libshoutjava.so.1.0:
> /usr/local/lib/libshout.so.3: Undefined symbol "pthread_cond_signal"
>
> OK, so it looks like libshout needs pthreads. Another program that uses
> libshout is linked against both libc and libc_r, thus including pthreads.
>
> work/ices-2.0-Beta2/src/ices:
> libshout.so.3 => /usr/local/lib/libshout.so.3 (0x28158000)
> libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28343000)
> libc.so.4 => /usr/lib/libc.so.4 (0x283fa000)
>
> Yet the Diablo VM I'm using is linked against libc only:
>
> java version "1.3.1"
> Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.3.1-0)
> Classic VM (build diablo-1.3.1-0, green threads, nojit)
>
> /usr/local/diablo-jdk1.3.1/jre/bin/i386/green_threads/java:
> libhpi.so => not found (0x0)
> libc.so.4 => /usr/lib/libc.so.4 (0x28067000)
>
> This is where I get stuck. How can I provide libc_r to my libshout when
the
> VM doesn't use it? Or is this the wrong approach?
>
> I'm running FreeBSD 4.2-RELEASE. Thanks for any clues!
>
> --Renaud
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libshout-java-0.1-freebsd.patch
Type: application/octet-stream
Size: 2745 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20040125/be66e354/libshout-java-0.1-freebsd.obj
More information about the freebsd-java
mailing list