unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: guile-devel@gnu.org
Subject: dynamic-link issue: does not always load
Date: Fri, 20 Mar 2020 17:00:11 -0700
Message-ID: <291418a1-d34d-b6c5-9e90-8f7b6972fcdf@gmail.com> (raw)

There is an old bug report #21076 on dynamic-link:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21076

Say you have a file libyaml.0.so-2, dynamic-link can't load it

     (dynamic-link "libyaml.0.so-2") => exception

even if there is a file libyaml.so:

   $ cat /usr/lib64/libyaml.so
   INPUT(libyaml-0.so.2)

it fails with (dynamic-link "libyaml")

I have submitted the following patch, which at least
makes the first version work.  If you think this is a libtool
but you may be right, but the bug report on this has not
been touched for 8 years:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8976

This patch fixes issue with libtool and OSes which use
non-standard extensions for shared libraries.  The libltdl
function lt_dlopenext expects the argument to have a standard
extension or no extention.  Arguments reflecting shared object
files with non-standard extensions will fail to load.  For
example, my system has /usr/lib64/libyaml-0.so.2.  w/o this
patch (dynamic-link "libyaml-0.so.2") does not work; with it,
it does.  Go figure.

--- libguile/dynl.c-orig    2020-03-20 05:56:42.101214929 -0700
+++ libguile/dynl.c    2020-03-20 05:57:40.432893330 -0700
@@ -69,7 +69,10 @@
      handle = lt_dlopen (NULL);
    else
      {
-      handle = lt_dlopenext (fname);
+      handle = lt_dlopen (fname);
+
+      if (handle == NULL)
+         handle = lt_dlopenext (fname);

        if (handle == NULL
  #ifdef LT_DIRSEP_CHAR




                 reply	other threads:[~2020-03-21  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=291418a1-d34d-b6c5-9e90-8f7b6972fcdf@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of guile-devel@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-devel/0 guile-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-devel guile-devel/ https://yhetil.org/guile-devel \
		guile-devel@gnu.org
	public-inbox-index guile-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.devel
	nntp://news.gmane.io/gmane.lisp.guile.devel


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git