From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: (dynamic-link "libm") fails [was Re: Integrate Guile with GNU Scientific Library] Date: Sat, 5 Oct 2019 09:55:40 -0700 Message-ID: <78ee84e0-0c75-bf55-ae73-4136db094d35@gmail.com> References: <872711be-6794-bb44-3634-b90baf568751@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="147056"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Oct 05 18:56:12 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGnLn-000c8N-HH for guile-user@m.gmane.org; Sat, 05 Oct 2019 18:56:11 +0200 Original-Received: from localhost ([::1]:58034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGnLl-0005ZW-Jv for guile-user@m.gmane.org; Sat, 05 Oct 2019 12:56:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52559) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGnLO-0005ZE-PV for guile-user@gnu.org; Sat, 05 Oct 2019 12:55:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGnLN-0008HY-St for guile-user@gnu.org; Sat, 05 Oct 2019 12:55:46 -0400 Original-Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:45465) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGnLN-0008Gs-Lm for guile-user@gnu.org; Sat, 05 Oct 2019 12:55:45 -0400 Original-Received: by mail-pf1-x431.google.com with SMTP id y72so5766322pfb.12 for ; Sat, 05 Oct 2019 09:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=1ImAbNT9pEEDYqPbZhez8c31VnLXhyxLZnjbFjzYkgo=; b=uyuzjRjlufFDkiUdd3xuwox9+592IdVTWduOVsn44d+nr7mrgWaJqKA6sZa2eBhkcd 7zAiig8yV3Otd7VkdUxW0p1Qidk38MGVYNTrjvU3DF8+jV7g5ucfqhcT7uDRt80W3p2t 90rakN3CXa+ytONbmMGfjZVdsu26oouVY8VGZXt1y5pSa+6DTpAEPhvLU1d+AP2ICJzX 5aN0LLc859ID8TC1TifsylXSd6B//bXRI7LPoswgKLB/IwS6FL5mWtq00EqTqDDJoka7 YABcUAKVb91eia6Tkqo4fPcjV3NTD4xbDXMtOVePKucT/X53DOEEnnkZJoto9CKaS7Ln 1enQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=1ImAbNT9pEEDYqPbZhez8c31VnLXhyxLZnjbFjzYkgo=; b=b2jc+3AQXKz7RtkjOFHBiwx73StpR17Bm63e4d1Gcf6VgVwKDLFKEr0EQr3jD4JQKP 1wG1qeXgonuoH2VZQJIg2HHL4TH2DQU69uAb14vQI1BPzLJrk11n0+AtezbG8ItlQ8zH nI+Vna1AK/RoqM9EH6R403sk0s/WWxuuVK1QqLe4cMBT04rXe94dfpI4B9cS2gHH8XZe 2uBkpyc2TFH9bRelMyKUBF+ZqSb5MHQqh4xAskVbYgbaWPQs/wGwdMxVP84EGvgMrymm OPD3YCTCklXjCwZ/BX8dK52lnXa3Us3EPcBB9kXm6iBEqMjNPEV3+86IYYTaa04QUfq+ z3aw== X-Gm-Message-State: APjAAAXIMeH036fcDsY1aRwCVwylspef0WK8YWEd8GHRl8cfczNl1mmV HXnUeXcrqKDZ6nh7flXd2oQIm7Pn X-Google-Smtp-Source: APXvYqxdqqWk89TmA9GhPPXoGAgiRXVjZ53ym9EYS4/xdjdrr62WlZTeZaQLUzMXEz7rbx7aP5JOOg== X-Received: by 2002:a62:7ece:: with SMTP id z197mr23139789pfc.78.1570294542301; Sat, 05 Oct 2019 09:55:42 -0700 (PDT) Original-Received: from [192.168.2.183] (216-165-237-5.championbroadband.com. [216.165.237.5]) by smtp.gmail.com with ESMTPSA id c125sm9825688pfa.107.2019.10.05.09.55.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Oct 2019 09:55:41 -0700 (PDT) In-Reply-To: <872711be-6794-bb44-3634-b90baf568751@gmail.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::431 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15733 Archived-At:   scheme@(guile-user)> (dynamic-link "libffi")   $1 = #   scheme@(guile-user)> (dynamic-link "libm")   ERROR: In procedure dynamic-link:   In procedure dynamic-link: file: "libm", message: "file not found" Both libraries are linked into guile, so being already linked is not an issue. However:   mwette$ file /usr/lib/x86_64-linux-gnu/libm.so /usr/lib/x86_64-linux-gnu/libm.so: ASCII text mwette$ cat /usr/lib/x86_64-linux-gnu/libm.so /* GNU ld script */ OUTPUT_FORMAT(elf64-x86-64) GROUP ( /lib/x86_64-linux-gnu/libm.so.6  AS_NEEDED ( /usr/lib/x86_64-linux-gnu/libmvec_nonshared.a /lib/x86_64-linux-gnu/libmvec.so.1 ) ) This is an apparent redirection.   I think this is a bug (or feature) of dlopen:   mwette$ cat z2.c   #include   #include   int main() {     void *p;     p = dlopen("/usr/lib/x86_64-linux-gnu/libm.so", RTLD_NOW);     printf("%p\n", p);   }   mwette$ gcc z2.c -ldl   mwette$ ./a.out   (nil) Matt On 10/3/19 6:10 PM, Matt Wette wrote: > $ guild compile-ffi gsl-sort.ffi > ... > ERROR: In procedure dynamic-link: > In procedure dynamic-link: file: "libm", message: "file not found" > > So for some reason the linker is not finding libm.so on my Unbuntu. > I will need to look into that.