delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/01/14:21:38

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Sun, 1 Nov 2009 20:21:26 +0100
Message-ID: <c159f9ab0911011121q376d61ecye5fcd321c912633@mail.gmail.com>
Subject: Problem with dlopen()
From: Juan Jose Garcia-Ripoll <juanjose DOT garciaripoll AT googlemail DOT com>
To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

This function does some nonstandard things, but the most annoying one
is imposing that the library to be loaded has to have a file
extension.

If I invoke dlopen("/path/to/temp/dir/temporary_file", ...) then the
routine fails with an error like "File or directory does not exist".
It is probably not that text, but something similar output by
dlerror(). If I rename the file as "temporary_file.foo" then dlopen()
succeeds.

Using strace reveals that in the first case dlopen() is adding the
extension ".dll" and complaining that the file does not exist. In
addition to this, the file has to be given executable permissions
using chmod() or dlopen will fail.

The reason I found this bug is that ECL (Embeddable Common Lisp)
compiles lisp files to DLLs and uses nonstandard names for that. With
mingw32 and Microsoft Visual Studio C++ we never had a problem, but
cygwin broke when we used our code.

Juanjo

--=20
Instituto de F=EDsica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019