guile-devel
[Top][All Lists]
Advanced

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

Re: guile-config broken?


From: rm
Subject: Re: guile-config broken?
Date: Mon, 5 Mar 2001 15:22:07 +0100
User-agent: Mutt/1.0.1i

Here is a small update:
I spickled eval.c with some printf-debugging and 
got the following:

 %  guile-config link
 ERROR: duplicate symbol is 'flags'
 ERROR: In procedure let*:
 ERROR: duplicate bindings
 %

                                                                rr

It seems like the second binding of
'flags' in guile-config line 167 doesn't
work with the stricter testing in eval.c,
lines 712 ff. since 'vars' will allready
contain the symbol 'flags' and hence 
the test scm_c_improper_memq will return
SCM_BOOL_T.
Changing the code in guile-config so that
the libguile linking flags are appended
to 'flags' by means of a 'set!' seems to
fix this bug.

 Ralf

----------------------------X------------------------

....

(let* ((flags
          (let loop ((libs
                      ;; Get the string of linker flags we used to build
                      ;; Guile, and break it up into a list.
                      (separate-fields-discarding-char #\space
                                                       (get-build-info 'LIBS)
                                                       list)))

            (cond
             ((null? libs) '())

             ;; Turn any "FOO/libBAR.a" elements into "-lBAR".
             ((match-lib (car libs))
              => (lambda (bar)
                   (cons (string-append "-l" bar)
                         (loop (cdr libs)))))

             ;; Remove any empty strings that may have seeped in there.
             ((string=? (car libs) "") (loop (cdr libs)))

             (else (cons (car libs) (loop (cdr libs))))))))

         ;; Include libguile itself in the list, along with the
         ;; directory it was installed in.
         (set! flags (cons (string-append "-L" (get-build-info 'libdir))
                      (cons "-lguile" flags)))


...


----------------------------X------------------------



reply via email to

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