guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: merged FFI, fixed a statprof bug, you need to make clean


From: Thien-Thi Nguyen
Subject: Re: merged FFI, fixed a statprof bug, you need to make clean
Date: Sat, 30 Jan 2010 17:16:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

() Andy Wingo <address@hidden>
() Fri, 29 Jan 2010 19:07:55 +0100

   Somehow guile-tools snarf-check-and-output-texi is trying to
   import srfi-1, which fails because parts of srfi-1 are in an
   unbuilt shlib.  But actually sometimes it succeeds if an
   installed shlib is in your LD_LIBRARY_PATH or equivalent --
   in that case you get an incompatible version and a segfault,
   as dsmith saw.

   Care to take a poke at fixing it? :)

I ran into similar (semi-)circular "bleed through" dependencies
(from former installs) w/ Guile 1.4.x some time ago, and tried
different strategies.  The simplest, but most drastic, solution
was do:

$ rm -rf FOO
$ ./configure --prefix FOO
$ make all check install installcheck

where FOO must be a directory not normally on your (env var)
`PATH', such as /tmp/a/b/c, or similar.

The present solution is to arrange for the build-time
`%load-path' to include `top_builddir', in which there is a
init.scm file (see below) that discards non-build elements from
`%load-path', ensuring no bleed through.  I know the Guile 1.9.x
build system is different, but perhaps a similar trick based on
the same principle could be used?

Note that the "pruning build-time %load-path plus build-tree
init.scm" approach has another advantage: you also avoid any
previously-installed init.scm (which may screw things up subtly).

thi

_________________________________________________________________________
;;; init.scm --- discard non-build %load-path elements for pre-inst-guile

;; Copyright (C) 2009 Thien-Thi Nguyen
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this software; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Commentary:

;; If env var INHIBIT_PRE_GUILE_LOAD_PATH_MUNGING is not set
;; (to any value), discard the tail elements of `%load-path'.

;;; Code:

(or (getenv "INHIBIT_PRE_GUILE_LOAD_PATH_MUNGING")
    (set-cdr! ((if (string=? "." "../g14")
                   identity
                   cdr)
               %load-path)
              '()))

;;; init.scm ends here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]