From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: Question: link to wrong library Date: Mon, 22 Jan 2018 09:07:52 +0800 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1148a1b247313b0563530f81" X-Trace: blaine.gmane.org 1516583169 31665 195.159.176.226 (22 Jan 2018 01:06:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Jan 2018 01:06:09 +0000 (UTC) Cc: guile-devel To: =?UTF-8?B?6Zm26Z2S5LqR?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jan 22 02:06:05 2018 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edQYj-0007jF-Si for guile-devel@m.gmane.org; Mon, 22 Jan 2018 02:06:02 +0100 Original-Received: from localhost ([::1]:34300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edQak-0006xO-0D for guile-devel@m.gmane.org; Sun, 21 Jan 2018 20:08:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edQaZ-0006wx-JI for guile-devel@gnu.org; Sun, 21 Jan 2018 20:07:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edQaY-0003ad-6V for guile-devel@gnu.org; Sun, 21 Jan 2018 20:07:55 -0500 Original-Received: from mail-yb0-x230.google.com ([2607:f8b0:4002:c09::230]:36746) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edQaY-0003aC-1Q for guile-devel@gnu.org; Sun, 21 Jan 2018 20:07:54 -0500 Original-Received: by mail-yb0-x230.google.com with SMTP id v12so2485478ybl.3 for ; Sun, 21 Jan 2018 17:07:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VwnJWEHsmAOwWXz1We/cI3DvVmdZ+OKRaLItU4FgY70=; b=o+FjjbW0/b+dZmNHTLTate4Sk1ZynnQ67jInfpv9dF33Sfl/SAX0SqVW2rwsnyfIEg 6AThH2EI/6B+5WfGQ6x/5lvcLSEFMcsSUhdlcSUbIkwDMpkXsdQZB/yyG76avY2ekXbN F2BuW75QJTehuNWg4mqnSDM9ZS/hW/hTOFrDDEc4sTTbc1MN42h/9f7YPtlab9cw1RMv y2pesSv+Zkf6I7CrQ7qhcoF7B6bxXG2KKWgSiqt/mXGgdwCPZHXekbfapQCkorgfuIsE fCwQ2cfzErMmiqpZeMgY5iIbZiwTQ3eMO2ortQncpjH5BwpGRrZuVMB3942Iyw5U53Tc iTPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VwnJWEHsmAOwWXz1We/cI3DvVmdZ+OKRaLItU4FgY70=; b=BhRt0X28kLF/9FgE2dKz3bURazVySQLpzsAamVVqWRoBje40fCV3yZBYK1TRJ+yXNN lQyBo/5ye8vLHnVH1LBDCroaGmcnGNDEgq8HW0PmOWq8k47qR0SvljA4QGjPCbdQMZpQ JGqmHaBoP+PV3uFyVeio33RaCiIOGAyLIiOZPti81yT2pk3mIrfRfCymmE/v80ckTQp0 CpkNxJRT1A8V5pJXAGwy9WloL7mQlWtJjyqA8DtqdDdYGzHiPJjeh0M128D6fruNBie+ 7U67KKa+fq6IVJQn08LvI86bjADPFzpRarCtnMkqIEEg4FqxOwIydEmmV1Siim1vdEI4 uoPA== X-Gm-Message-State: AKwxytexZjwwmQa/KYj711lky4Nhi+gc9DfZpIc+PMwwSGX+zJusk8wi NunOK87ZxfbM+YifdLv4n6j567FHaIsTEgwCueI= X-Google-Smtp-Source: AH8x226Qbfwj3wU/2c3OuC/LXNe5WJ7BVedecNOzDxuzpS60JPQ8kQut2bOL85RHmnyL3B2POCj0i0pkYTSsUphJC/o= X-Received: by 10.37.108.193 with SMTP id h184mr5721450ybc.209.1516583273311; Sun, 21 Jan 2018 17:07:53 -0800 (PST) Original-Received: by 10.37.114.132 with HTTP; Sun, 21 Jan 2018 17:07:52 -0800 (PST) Original-Received: by 10.37.114.132 with HTTP; Sun, 21 Jan 2018 17:07:52 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c09::230 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19477 Archived-At: --001a1148a1b247313b0563530f81 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think you may need LD_LIBRARY_PATH 2018=E5=B9=B41=E6=9C=8821=E6=97=A5 23:46=EF=BC=8C"=E9=99=B6=E9=9D=92=E4=BA= =91" =E5=86=99=E9=81=93=EF=BC=9A > Hi. I'm new to guile. I compiled it from source without `make install`. > > I write a simple C file and use the flowing command to compile it. > `gcc -pthread -I. -L ./libguile/.libs -lguile-2.2 -lgc test.c` > it successed. but the a.out is always link to my system guile library. > $ ldd ./a.out > linux-vdso.so.1 (0x00007fffc259b000) > libguile-2.2.so.1 =3D> /usr/lib/libguile-2.2.so.1 (0x00007fa90f9fe000) > libgc.so.1 =3D> /usr/lib/libgc.so.1 (0x00007fa90f794000) > > > even I do the flowing: > $ cp libguile/.libs/libguile-2.2.so.1.3.0 libguile/.libs/libguile-2.5.so > > $ gcc -pthread -I. -L ./libguile/.libs -lguile-2.5 -lgc test.c # it > successed > > $ ldd ./a.out > linux-vdso.so.1 (0x00007ffd283e0000) > libguile-2.2.so.1 =3D> /usr/lib/libguile-2.2.so.1 (0x00007f83c71cc000) > libgc.so.1 =3D> /usr/lib/libgc.so.1 (0x00007f83c6f62000) > > > Could someone give me some tips. Thanks. > --001a1148a1b247313b0563530f81 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think you may need LD_LIBRARY_PATH

2018=E5=B9=B41=E6=9C=8821=E6=97= =A5 23:46=EF=BC=8C"=E9=99=B6=E9=9D=92=E4=BA=91" <qingyun.tao@tophant.com>=E5=86=99=E9= =81=93=EF=BC=9A
Hi. I'm new to guile.=C2=A0 I compiled it from source without `make in= stall`.=C2=A0

I write a simple C file and use the = flowing command to compile it.
=C2=A0 =C2=A0 `gcc -pthread -I. -L= ./libguile/.libs -lguile-2.2=C2=A0 -lgc test.c`
it=C2=A0successe= d. but the a.out is always link to my system guile library.
=C2= =A0 =C2=A0$ ldd ./a.out=C2=A0
linux-vdso.so.1 (0x00007fffc259b000)
libguile-2.2.so.1 =3D> /usr/lib/libguile-2.2.= so.1 (0x00007fa90f9fe000)
<= /span>libgc.so.1 =3D> /usr/lib/libgc.so.1 (0x00007fa90f794000)


even I do the flowing:
$ cp l= ibguile/.libs/libguile-2.2.so.1.3.0=C2=A0 libguile/.libs/libguile-2.5.so

<= /div>
$ gcc -pthread -I. -L ./libguile/.libs -lguile-2.5=C2=A0 -lgc tes= t.c=C2=A0 # it successed

$ ldd ./a.out=C2=A0
=
linux-vdso.so.1 (0x00007f= fd283e0000)
libguile= -2.2.so.1 =3D> /usr/lib/libguile-2.2.so.1 (0x00007f83c71cc000)
libgc.so.1 =3D> /usr/lib/l= ibgc.so.1 (0x00007f83c6f62000)


Could someone give me some tips.=C2=A0 Thanks.
--001a1148a1b247313b0563530f81--