From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Append effective version to GUILE_LOAD[_COMPILED]_PATH Date: Wed, 16 Mar 2016 15:19:26 +0100 Message-ID: References: <87oaaupes6.fsf@drakenvlieg.flower> Reply-To: mikael@djurfeldt.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11444c528d89a6052e2b334a X-Trace: ger.gmane.org 1458138373 12660 80.91.229.3 (16 Mar 2016 14:26:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Mar 2016 14:26:13 +0000 (UTC) Cc: guile-devel To: Jan Nieuwenhuizen Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Mar 16 15:26:05 2016 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1agCOg-0005x7-Jr for guile-devel@m.gmane.org; Wed, 16 Mar 2016 15:26:02 +0100 Original-Received: from localhost ([::1]:56681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agCOf-0002Dr-Ff for guile-devel@m.gmane.org; Wed, 16 Mar 2016 10:26:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agCIO-0007Q0-GD for guile-devel@gnu.org; Wed, 16 Mar 2016 10:19:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agCIM-0006XM-L8 for guile-devel@gnu.org; Wed, 16 Mar 2016 10:19:32 -0400 Original-Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:34492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agCIJ-0006Wf-Lz; Wed, 16 Mar 2016 10:19:28 -0400 Original-Received: by mail-wm0-x230.google.com with SMTP id p65so192284193wmp.1; Wed, 16 Mar 2016 07:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc; bh=wfV9TmoG7z75Bz5TvittSUtvJ4o8zSGsJei3GS12fDo=; b=RGlXtFDZWXhq+RIev92Tk9y0Dn2b3Cx9l1mD/8YgDFxdvFvhLHpZKhPEKO2ZyCxrPP vchuHjOGWsjMPO6/dos/aq5mBKrRg8oF4cd0r9xSttpmyi0BjJ6B8COcQvldFasS+kAv /iuKtsl+JA/qrtuHmwe+jY4bY+7XGXHyJLQKVvXWUG6d88RpVmLjEqk9FwvsEqrbjAsq /yWSKe8amnUSpXd1ZqAg/OSz5gpOW86LZ8PYEYAcuNt756A9VyI/MR4OEvZFOpC7k0lS BNiSZtHl+ALPuG9N+sYr/lY6zGYjBBLIDQyrasTkErfuDJFgmt9F4wIIN4PDEJJM5/At Iy3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:sender:in-reply-to :references:date:message-id:subject:from:to:cc; bh=wfV9TmoG7z75Bz5TvittSUtvJ4o8zSGsJei3GS12fDo=; b=KEtsKwNcz/VfBp37PXH6I4kPn2Nn5z/us1JaGTWcD/HcVisgOtXEoruU847qXIXuDX efG8rmGWeywkbrIh/EbRDxbpnB5qooj810LYH4z4KsveSDs3xrdoCNTRV2OXAGkaVmIS QSRU2+M3y7o2Wsgh8PHDGH2Q8sIjwjl6XC5q1C7/ZZlTSa8VT6oPArGkJ/ceKsqou7Zc 3lhA/+qT5IYdh6l2IprjkTcw23O4+MGvUKNR9U94PvYQhdoxnfjjBYn2SPnnLXa0iOI0 86o4qH465D/AxfGr8ZXfOAlW9a0q0+C/fmPcYe7auMkp8IMAHWPdYVG8QvTuJguOq/Ts 2gEQ== X-Gm-Message-State: AD7BkJIw0PtDHXeniKsyQTQSLiP5onlMonoEjv8mX4ZFe0F+q+LfgUAR4GrJIW0WxuTySuy1SxNcaGltn1lzVg== X-Received: by 10.28.173.143 with SMTP id w137mr5024267wme.101.1458137966935; Wed, 16 Mar 2016 07:19:26 -0700 (PDT) Original-Received: by 10.194.73.100 with HTTP; Wed, 16 Mar 2016 07:19:26 -0700 (PDT) In-Reply-To: <87oaaupes6.fsf@drakenvlieg.flower> X-Google-Sender-Auth: LGhBecqq3dOo8dkgqxW585XMlOQ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::230 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:18231 Archived-At: --001a11444c528d89a6052e2b334a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In python, the version number is higher up in the directory hierarchy, which, hypothetically, allows newer versions to have "inventions" in the more detailed directory structure: /usr/lib/python2.6 /usr/lib/python2.7 etc Just a thought. On Fri, Mar 4, 2016 at 2:13 PM, Jan Nieuwenhuizen wrote: > Hi, > > I am running guile-2.0 and guile-2.2 alongside each other which is > causing me some pain*). > > This is what bits of my GUILE_LOAD_COMPILED_PATH look like > > > /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/lib/guile/2.2/ccache > --> > /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/lib/guile/2.2/ccache/= ice-9/and-let-star.go > > > /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/guile/site/2.2/ > --> > /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/guile/site/2.2/= os/process.go > > If `/' is always used as the suffix of each path > element, and we/guix/packagers do not include that suffix in GUILE_*PATH > elements, then Guile can append effective-prefix and different major > Guile-versions can happily share the same GUILE_LOAD[_COMPILED]_PATH, > e.g., having > > > GUILE_LOAD_COMPILED_PATH=3D/gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-pr= ofile/share/guile/site > > then guile-2.0 would get (os process) from > > /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/guile/site = + > /2.0 > --> > /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/guile/site/2.0/= os/process.go > > and guile-2.2 would read > > /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/guile/site = + > /2.2 > --> > /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/guile/site/2.2/= os/process.go > > What do you think? No more pain! Find patch attached. > > Greetings, > Jan > > > *) Some of my pain > > My Debian host system has guile-2.0, guix depends on guile-2.0, guix's > LD script depends on guile-2.0, the guile bits of my project depend on > guile-2.2. > > I have some scripts to make this situation almost bearable, but still I > regularly > > cannot find a basic library > > [1]13:53:25 janneke@janneke-ijzer:~ > $ guile --no-auto-compile > GNU Guile 2.0.11 > Copyright (C) 1995-2014 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> (use-modules (os proccess)) > While compiling expression: > ERROR: no code for module (os proccess) > > or some guile script (guix) aborts > > guix environment --ad-hoc ccache coreutils git guix emacs guile-next > guile-next-lib > Throw without catch before boot: > Throw to key misc-error with args ("make_objcode_from_file" "bad > header on object file: ~s" > ("\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00") #f)Aborting. > Aborted > > or linking breaks > > g++ -Wall -std=3Dc++11 -g -I. -I out/alarm.project/c++ -I > check/alarm.project/ out/alarm.project/c++/main.o > out/alarm.project/c++/Alarm.o out/alarm.project/c++/AlarmSystem.o > out/alarm.project/c++/pump.o out/alarm.project/c++/runtime.o > -lboost_system -lboost_coroutine -lboost_thread -lboost_context -pthread = -o > out/alarm.project/c++/test > collect2: error: ld terminated with signal 6 [Afgebroken] > Throw without catch before boot: > Aborting. > > and then I juggle installed guile versions and/or manually modify > GUILE_LOAD_COMPILED_PATH. > > > > -- > Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org > Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.= nl > > --001a11444c528d89a6052e2b334a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
In python, the version number is higher up in the director= y hierarchy, which, hypothetically, allows newer versions to have "inv= entions" in the more detailed directory structure:

= /usr/lib/python2.6
/usr/lib/python2.7
etc
Just a thought.

On Fri, Mar 4, 2016 at 2:13 PM, Jan Nieuwenhuizen <jan= neke@gnu.org> wrote:
Hi,
I am running guile-2.0 and guile-2.2 alongside each other which is
causing me some pain*).

This is what bits of my GUILE_LOAD_COMPILED_PATH look like

=C2=A0 =C2=A0 /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/lib/guile= /2.2/ccache
=C2=A0 =C2=A0 --> /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/li= b/guile/2.2/ccache/ice-9/and-let-star.go

=C2=A0 =C2=A0 /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/gui= le/site/2.2/
=C2=A0 =C2=A0 --> /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/sh= are/guile/site/2.2/os/process.go

If `/<effective-version>' is always used as the suffix of each pa= th
element, and we/guix/packagers do not include that suffix in GUILE_*PATH elements, then Guile can append effective-prefix and different major
Guile-versions can happily share the same GUILE_LOAD[_COMPILED]_PATH,
e.g., having

=C2=A0 =C2=A0 GUILE_LOAD_COMPILED_PATH=3D/gnu/store/7ml4psifv46pzxjxw56xfl7= mwd47k277-profile/share/guile/site

then guile-2.0 would get (os process) from

=C2=A0 =C2=A0 /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/gui= le/site + /2.0
=C2=A0 =C2=A0 --> /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/sh= are/guile/site/2.0/os/process.go

and guile-2.2 would read

=C2=A0 =C2=A0 /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/share/gui= le/site + /2.2
=C2=A0 =C2=A0 --> /gnu/store/7ml4psifv46pzxjxw56xfl7mwd47k277-profile/sh= are/guile/site/2.2/os/process.go

What do you think?=C2=A0 No more pain!=C2=A0 Find patch attached.

Greetings,
Jan


*) Some of my pain

My Debian host system has guile-2.0, guix depends on guile-2.0, guix's<= br> LD script depends on guile-2.0, the guile bits of my project depend on
guile-2.2.

I have some scripts to make this situation almost bearable, but still I
regularly

cannot find a basic library

=C2=A0 =C2=A0 [1]13:53:25 janneke@janneke-ijzer:~
=C2=A0 =C2=A0 $ guile --no-auto-compile
=C2=A0 =C2=A0 GNU Guile 2.0.11
=C2=A0 =C2=A0 Copyright (C) 1995-2014 Free Software Foundation, Inc.

=C2=A0 =C2=A0 Guile comes with ABSOLUTELY NO WARRANTY; for details type `,s= how w'.
=C2=A0 =C2=A0 This program is free software, and you are welcome to redistr= ibute it
=C2=A0 =C2=A0 under certain conditions; type `,show c' for details.

=C2=A0 =C2=A0 Enter `,help' for help.
=C2=A0 =C2=A0 scheme@(guile-user)> (use-modules (os proccess))
=C2=A0 =C2=A0 While compiling expression:
=C2=A0 =C2=A0 ERROR: no code for module (os proccess)

or some guile script (guix) aborts

=C2=A0 =C2=A0 guix environment --ad-hoc ccache coreutils git guix emacs gui= le-next guile-next-lib
=C2=A0 =C2=A0 Throw without catch before boot:
=C2=A0 =C2=A0 Throw to key misc-error with args ("make_objcode_from_fi= le" "bad header on object file: ~s" ("\x7fELF\x02\x01\x= 01\x00\x00\x00\x00\x00\x00\x00\x00") #f)Aborting.
=C2=A0 =C2=A0 Aborted

or linking breaks

=C2=A0 =C2=A0 g++ -Wall -std=3Dc++11=C2=A0 -g -I. -I out/alarm.project/c++ = -I check/alarm.project/=C2=A0 =C2=A0out/alarm.project/c++/main.o out/alarm.= project/c++/Alarm.o out/alarm.project/c++/AlarmSystem.o out/alarm.project/c= ++/pump.o out/alarm.project/c++/runtime.o=C2=A0 =C2=A0 -lboost_system -lboo= st_coroutine -lboost_thread -lboost_context -pthread -o out/alarm.project/c= ++/test
=C2=A0 =C2=A0 collect2: error: ld terminated with signal 6 [Afgebroken]
=C2=A0 =C2=A0 Throw without catch before boot:
=C2=A0 =C2=A0 Aborting.

and then I juggle installed guile versions and/or manually modify
GUILE_LOAD_COMPILED_PATH.



--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar=C2=AE=C2=A0 http://AvatarAcad= emy.nl


--001a11444c528d89a6052e2b334a--