From owner-freebsd-java@FreeBSD.ORG Sun Jan 25 17:29:53 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D348D16A4CE for ; Sun, 25 Jan 2004 17:29:53 -0800 (PST) Received: from ebola.biohz.net (adsl-66-127-84-214.dsl.sntc01.pacbell.net [66.127.84.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id A824C43D46 for ; Sun, 25 Jan 2004 17:29:49 -0800 (PST) (envelope-from renaud+freebsd-java@waldura.com) Received: from flu (localhost [127.0.0.1]) by ebola.biohz.net (Postfix) with SMTP id 180451151A7 for ; Sun, 25 Jan 2004 17:29:49 -0800 (PST) Message-ID: <001b01c3e3ab$e38eb880$011211ac@biohz.net> From: "Renaud Waldura" To: References: <20040126000539.V18991-100000@srv.ba.sdxnet.com> Date: Sun, 25 Jan 2004 17:29:48 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: Re: Problems linking against pthreads X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2004 01:29:54 -0000 Thanks for the tip. I may still do that. While a program using this library I finally compiled works fine stand-alone -- called from main() -- a servlet doing the exact same work crashes the VM. Bummer. SIGSEGV 11* segmentation violation "Thread-15" (TID:0x29c44ab0, sys_thread_t:0x8518a80, state:R) prio=5 at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306) at java.lang.Runtime.loadLibrary0(Runtime.java:749) at java.lang.System.loadLibrary(System.java:820) at org.xiph.libshout.Shout.(Shout.java:34) at cc.emit.web.servlet.StreamSong.streamSongs(StreamSong.java:95) etc. ----- Original Message ----- From: "Vladimir Botka" To: "Renaud Waldura" Cc: Sent: Sunday, January 25, 2004 3:17 PM Subject: Re: Problems linking against pthreads > Hi, > got the similar problem when starting eclipse (Undefined symbol > "pth_attr_destroy"). It was solved when I upgraded to > jdk-1.4.2p6. Rebuilding glib, pth (/usr/local/lib/pth/libpthread.so.20) > and setting ldconf was of no help. > > Cheers, Vladimir > > On Sun, 25 Jan 2004, Renaud Waldura wrote: > > > 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 > > > > _______________________________________________ > > freebsd-java@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-java > > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > > > > >