[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed release schedule for maxima 5.9.3 |
Date: |
05 Jan 2006 16:23:11 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
OK, please try the fix now in 2.6.8pre and cvs head. I set
compiler::*tmp-dir* at the top of top-level.
Please let me know if problems persist.
Take care,
"Vadim V. Zhytnikov" <address@hidden> writes:
> Camm Maguire writes:
> > OK, something like this is now in CVS head and Version_2_6_8pre.
> > Please test, esp. on windows, and let me know if I can close the bug
> > on the website.
>
> Trying to backport compiler-temp-dir patch from 2.6.8pre
> to 2.6.7 I found a serious flaw in it. The problem is
> that value of *tmp-dir* is determined during build time
> and this value remains hard-coded in gcl or maxima image.
> This makes lots of trouble when program get installed on
> other computer. Quite probable that compile will not
> work unless *tmp-dir* is reset according to new
> environment. I propose to modify initial value of
> *tmp-dir* and its use in gazonk-name:
>
> (1) Make default value of *tmp-dir* nil
>
> (2) In gazonk-name:
> if *tmp-dir* is nil then use (get-temp-dir)
> if *tmp-dir* is not nil use it's value
>
> The patch to gcl 2.6.7 which works to me
> is attached. Please note also (abs(si::getpid))
> in gazonk-name. The problem is that getpid
> may return negative values on Windows Me.
>
> Best wishes,
>
> Vadim
>
> --
> Vadim V. Zhytnikov
>
> <address@hidden>
> <address@hidden>
> diff -uNr gcl-2.6.7-orig/cmpnew/gcl_cmpmain.lsp
> gcl-2.6.7/cmpnew/gcl_cmpmain.lsp
> --- gcl-2.6.7-orig/cmpnew/gcl_cmpmain.lsp 2005-05-07 01:56:55 +0400
> +++ gcl-2.6.7/cmpnew/gcl_cmpmain.lsp 2006-01-04 20:05:55 +0300
> @@ -391,10 +391,31 @@
> (values)
> ))))))
>
> +(defun get-temp-dir ()
> + (dolist (x `(,@(mapcar 'si::getenv #-winnt '("TMPDIR" "TMP") #+winnt
> '("TEMP" "TMP")) #-winnt "/tmp" ""))
> + (when x
> + (let* ((x (pathname x))
> + (x (if (pathname-name x) x
> + (merge-pathnames
> + (make-pathname :directory (butlast (pathname-directory x))
> + :name (car (last (pathname-directory x))))
> + x))))
> + (when (directory x)
> + (return-from
> + get-temp-dir
> + (namestring
> + (make-pathname
> + :directory (when (or (pathname-directory x) (pathname-name x))
> + (append (pathname-directory x) (list (pathname-name
> x))))))))))))
> +
> +(defvar *tmp-dir* nil)
> +
> (defun gazonk-name ( &aux tem)
> (dotimes (i 1000)
> - (unless (probe-file (setq tem (merge-pathnames (format nil
> "gazonk~d.lsp" i))))
> - (return-from gazonk-name (pathname tem))))
> + (let ((tem (merge-pathnames
> + (format nil "~agazonk_~d_~d.lsp" (if *tmp-dir* *tmp-dir*
> (get-temp-dir)) (abs(si::getpid)) i))))
> + (unless (probe-file tem)
> + (return-from gazonk-name (pathname tem)))))
> (error "1000 gazonk names used already!"))
>
> (defun prin1-cmp (form strm)
> diff -uNr gcl-2.6.7-orig/pcl/makefile gcl-2.6.7/pcl/makefile
> --- gcl-2.6.7-orig/pcl/makefile 2005-05-07 18:40:33 +0400
> +++ gcl-2.6.7/pcl/makefile 2006-01-04 20:04:07 +0300
> @@ -19,7 +19,7 @@
> '(setq compiler::*default-c-file* t)'\
> '(setq compiler::*default-data-file* t)'\
> '(setq compiler::*default-system-p* t)' \
> - '(setq compiler::*keep-gaz* t)'
> + '(setq compiler::*keep-gaz* t compiler::*tmp-dir* "")'
>
> all: $(addsuffix .c,$(AFILES)) $(addsuffix .o,$(AFILES))
>
> @@ -33,14 +33,12 @@
> $(addsuffix .lisp,$(subst
> gcl_pcl_impl_low,impl/gcl/gcl_pcl_impl_low,$(FILES)))
> rm -f *.o *gazonk*
> cp ../h/cmpinclude.h .
> - echo ${SETUP} '(pcl::compile-pcl)' | ../unixport/saved_gcl ../unixport/
> -# FIXME -- small compiler setjmp/volatile detection bug -- CM
> -# doesn't seem to be needed now, but investigate more later
> -# patch -p0 <pcl_methods.patch
> -# rm -f pcl_methods.o
> - for i in gazonk* ; do j=$$(echo $$i | sed 's,\..*$$,,1');\
> - cat $$i | sed -e "s,$$j\.h,gcl_pcl_$$j.h,1" \
> - -e "s,init_.*$$j,init_gcl_pcl_$$j,g"
> >gcl_pcl_$$i && rm $$i; done
> + echo ${SETUP} '(pcl::compile-pcl)' | ../unixport/saved_gcl
> + for i in gazonk* ; do \
> + j=$$(echo $$i | sed 's,\..*$$,,1');k="gazonk$$(echo $$j | cut
> -f3 -d\_)";\
> + l=$$(echo $$i | sed 's,^.*\.,,1');\
> + cat $$i | sed -e "s,$$j\.h,gcl_pcl_$$k.h,1" \
> + -e "s,init_.*$$j,init_gcl_pcl_$$k,g"
> >gcl_pcl_$$k.$$l && rm $$i; done
>
> %.o: %.c %.h %.data
> $(CC) $(CFLAGS) -c $< -o $@
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- RE: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed release schedule for maxima 5.9.3, Mike Thomas, 2006/01/03
- Re: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed release schedule for maxima 5.9.3, Vadim V. Zhytnikov, 2006/01/04
- Re: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed release schedule for maxima 5.9.3, Camm Maguire, 2006/01/05
- Re: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed release schedule for maxima 5.9.3, Vadim V. Zhytnikov, 2006/01/06
- Re: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed release schedule for maxima 5.9.3, Vadim V. Zhytnikov, 2006/01/06
- Re: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed release schedule for maxima 5.9.3, Camm Maguire, 2006/01/09
- Re: [Gcl-devel] Re: [Maxima] describe & newline problems, was: proposed release schedule for maxima 5.9.3, Vadim V. Zhytnikov, 2006/01/09