Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 74311 invoked from network); 18 Feb 2006 16:22:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Feb 2006 16:22:30 -0000 Received: (qmail 96107 invoked by uid 500); 18 Feb 2006 16:22:18 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 96005 invoked by uid 500); 18 Feb 2006 16:22:17 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 95994 invoked by uid 99); 18 Feb 2006 16:22:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2006 08:22:17 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.39.12.10] (HELO deck1210.hostdeck.com) (212.39.12.10) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2006 08:22:16 -0800 Received: (qmail 32306 invoked from network); 18 Feb 2006 17:21:53 +0100 Received: from host70-41.pool82106.interbusiness.it (HELO fatti.com) (82.106.41.70) by deck1210.hostdeck.com with SMTP; 18 Feb 2006 17:21:53 +0100 Message-ID: <43F74992.3050600@fatti.com> Date: Sat, 18 Feb 2006 17:21:38 +0100 From: Enrico Migliore Reply-To: enrico.migliore@fatti.com Organization: - User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: Classpath on Cygwin: failed to open native library error References: <1140102032.9742.43.camel@localhost.localdomain> <1140104812.9742.46.camel@localhost.localdomain> <1140118870.4859.34.camel@localhost.localdomain> <43F4EE7B.5020806@object-refinery.com> <43F60951.6000304@fatti.com> <43F7219B.2060004@academ.org> In-Reply-To: <43F7219B.2060004@academ.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N snowdosker wrote: > Hi, Enrico. > > Just figured out the roots of the problem. It comes from dlopen() > function on cygwin. > *JCHEVM* use the following code for loading native shared libraries > in \cygwin\home\ivan\jchevm\libjc\native_lib.c line:330 > > else if ((handle = dlopen(dlname, RTLD_NOW)) == NULL) { > _JC_EX_STORE(env, UnsatisfiedLinkError, > "failed to open native library `%s': %s", name, dlerror()); > goto fail; > } > > Exactly what we see in error output.... > So I just wrote simple test > > if ((handle = > dlopen("/usr/local/classpath/lib/classpath/*libjavanio.dll.a*", > RTLD_NOW)) == NULL) { > printf("fail %s", dlerror()); } > else { > printf("loaded"); > } > > And it's failed > Well, then I tried to > > if ((handle = > dlopen("/usr/local/classpath/lib/classpath/*cygjavanio-0.dll*", > RTLD_NOW)) == NULL) { > printf("fail %s", dlerror()); } > else { > printf("loaded"); > } > > And got success ...! > ---------------------- > > I also had found some interesting articles related to libtool , dlopen > and LoadLibrary API function > and thier behaviours under cygwin.. > Probably this will help to solve problem soon..... > Well, if you will be more lucky in finding solution , just let me know > > Ivan Hi Ivan, good boy! Let's browse the Cygwin documentation and see how dlopen() works. Please share the link you've found :-) dlopen() is a POSIX function. Enrico