From: Bruno H. <br...@cl...> - 2017-03-13 19:19:29
|
Hi Sam, > My general attitude to compiler warnings is that each such warning is a bug. > Either it is a bug in the code being compiled, or it is a bug in the compiler. No. Different projects need to enable different sets of warnings. That's why the warnings have names, so that we can selectively enable or selectively disable them. Look again at these examples: nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings nw="$nw -Wundef" # All compiler preprocessors support #if UNDEF nw="$nw -Wtraditional" # All compilers nowadays support ANSI C Bruno |
From: Bruno H. <br...@cl...> - 2017-03-13 19:30:57
|
Hi Sam, > > <<There is now a general move away from "pack everything into one file" > > to "create separate file for different purposes"...>> > ... > This is not true for someone like me who threw together a quick hack to > be run by my wife. It is much easier for me to email her an executable > image which she will copy to her desktop and click to run than create a > tgz which she has to unpack, install &c &c. > > The only alternative to `(saveinitmem :executable t)` is > `(make-distribution)` which will create an executable installer. Our time is better invested in working on '(make-distribution)' than on '(saveinitmem :executable t)'. Bruno |
From: Sam S. <sd...@gn...> - 2017-03-13 20:29:21
|
Hi Bruno, > * Bruno Haible <oe...@py...t> [2017-03-13 20:30:47 +0100]: > >> > <<There is now a general move away from "pack everything into one file" >> > to "create separate file for different purposes"...>> >> ... >> This is not true for someone like me who threw together a quick hack to >> be run by my wife. It is much easier for me to email her an executable >> image which she will copy to her desktop and click to run than create a >> tgz which she has to unpack, install &c &c. >> >> The only alternative to `(saveinitmem :executable t)` is >> `(make-distribution)` which will create an executable installer. > > Our time is better invested in working on '(make-distribution)' > than on '(saveinitmem :executable t)'. Yep, I imagine a bunch of make-distrib-<platform>.lisp files, and something like this in init.lisp: #+win32 (load "make-distrib-win32") #+macos (load "make-distrib-macos") ... #-(or win32 macos ...) (defun make-distrib (name) (saveinitmem name :executable t)) :-) -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://iris.org.il http://camera.org http://www.dhimmitude.org http://jij.org Modern man is the missing link between apes and human beings. |
From: Bruno H. <br...@cl...> - 2017-03-13 22:16:24
|
Hi Sam, > > Our time is better invested in working on '(make-distribution)' > > than on '(saveinitmem :executable t)'. > > Yep, I imagine a bunch of make-distrib-<platform>.lisp files, > and something like this in init.lisp: > > #+win32 (load "make-distrib-win32") > #+macos (load "make-distrib-macos") > ... > #-(or win32 macos ...) > (defun make-distrib (name) > (saveinitmem name :executable t)) > > > :-) Yes, this is fine with me. If you have a feature that works reliably on some platforms, you can use it on these platforms, and find other ways to achieve the same high-level goal on the other platforms. Bruno |
From: Bruno H. <br...@cl...> - 2017-03-17 22:16:26
|
On 2017-03-13 I wrote: > But what I need is that "make check" does not abort prematurely, because > a "make check" failure means - to everyone - "the package is broken, you > should better not proceed with 'make install'". This is now done. If you want to run checks that include unportable ones, and you are prepared to deal with failures, run make check extracheck Bruno |
From: Sam S. <sd...@gn...> - 2017-03-19 01:28:21
|
This is wrong. exec images work on all platforms. On Fri, Mar 17, 2017 at 6:16 PM, Bruno Haible <br...@cl...> wrote: > On 2017-03-13 I wrote: >> But what I need is that "make check" does not abort prematurely, because >> a "make check" failure means - to everyone - "the package is broken, you >> should better not proceed with 'make install'". > > This is now done. If you want to run checks that include unportable ones, > and you are prepared to deal with failures, run > > make check extracheck > > Bruno > -- Sam Steingold <http://sds.podval.org> <http://www.childpsy.net> <http://steingoldpsychology.com> |
From: Bruno H. <br...@cl...> - 2017-03-19 02:01:09
|
Sam, > This is wrong. > exec images work on all platforms. "make check-exec-image" fails at least on OpenBSD/i386, OpenBSD/x86_64, and MirBSD. And probably on Cygwin as well, otherwise Ken Brown would not have added this patch to the Cygwin port of clisp: # HG changeset patch # User Ken Brown <kb...@co...> # Date 1429042817 14400 # Tue Apr 14 16:20:17 2015 -0400 # Node ID 5383b0dea9eef525202949979d621e9f84a91fec # Parent abc756d38a96bd7959869ca47d66590df7c19baf Don't allow saving executable memory images on Cygwin diff -r abc756d38a96 -r 5383b0dea9ee src/savemem.lisp --- a/src/savemem.lisp Sat Mar 14 14:45:32 2015 -0400 +++ b/src/savemem.lisp Tue Apr 14 16:20:17 2015 -0400 @@ -38,6 +38,9 @@ ((:script *script*) (null init-function)) keep-global-handlers (start-package *package*) (locked-packages *system-package-list*) executable) + (if executable + (error + "Sorry, this build does not support saving executable memory images")) (let* ((old-driver *driver*) old-global-handlers file-size (*package* (sys::%find-package start-package)) (active-restarts *active-restarts*) Bruno |
From: Sam S. <sd...@gn...> - 2017-03-20 15:35:31
|
Bruno, > * Bruno Haible <oe...@py...t> [2017-03-19 03:00:59 +0100]: > >> This is wrong. >> exec images work on all platforms. > > "make check-exec-image" fails at least on OpenBSD/i386, OpenBSD/x86_64, and > MirBSD. With my latest patch too?! > And probably on Cygwin as well, otherwise Ken Brown would not have added > this patch to the Cygwin port of clisp: > > # HG changeset patch > # User Ken Brown <kb...@co...> > # Date 1429042817 14400 > # Tue Apr 14 16:20:17 2015 -0400 > # Node ID 5383b0dea9eef525202949979d621e9f84a91fec > # Parent abc756d38a96bd7959869ca47d66590df7c19baf > Don't allow saving executable memory images on Cygwin > > diff -r abc756d38a96 -r 5383b0dea9ee src/savemem.lisp > --- a/src/savemem.lisp Sat Mar 14 14:45:32 2015 -0400 > +++ b/src/savemem.lisp Tue Apr 14 16:20:17 2015 -0400 > @@ -38,6 +38,9 @@ > ((:script *script*) (null init-function)) > keep-global-handlers (start-package *package*) > (locked-packages *system-package-list*) executable) > + (if executable > + (error > + "Sorry, this build does not support saving executable memory images")) > (let* ((old-driver *driver*) old-global-handlers file-size > (*package* (sys::%find-package start-package)) > (active-restarts *active-restarts*) Ken, does it fail with the hg tip? -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://www.dhimmitude.org http://no2bds.org https://jihadwatch.org http://iris.org.il There are many reasons not to use Lisp - but no good ones. |
From: Ken B. <kb...@co...> - 2017-03-20 21:37:43
|
Hi Sam, On 3/20/2017 11:35 AM, Sam Steingold wrote: > Ken, does it fail with the hg tip? Yes. I just built clisp from Bruno's tarball (https://haible.de/bruno/gnu/clisp-2.49.50.tar.bz2), and here's what happens when I try to save an executable in the build directory: $ ./clisp -norc -q -x '(progn (ext:saveinitmem "test.exe" :init-function (function exit) :EXECUTABLE t))' ;; Wrote the memory image into test.exe (13,849,465 bytes) Bytes permanently allocated: 160,328 Bytes currently in use: 3,602,952 Bytes available until next GC: 66,168 3602952 ; 66168 ; 160328 ; 2 ; 26120 ; 15000 $ ./test.exe Segmentation fault (core dumped) I suspect that the problem has something to do with my patches to make dynamic modules work, but I don't know for sure. Ken |
From: Ken B. <kb...@co...> - 2017-03-22 02:48:14
|
Hi Bruno, On 3/21/2017 6:52 PM, Bruno Haible wrote: > For me, with the same clisp-2.49.50, it succeeds, both in 32-bit and 64-bit > Cygwin builds. Here's the output of "make check-exec-image": make check-exec-image works for me too, but the test case I gave in my previous mail still crashes. Here it is again: $ ./clisp -norc -q -x '(progn (ext:saveinitmem "test.exe" :init-function (function exit) :EXECUTABLE t))' ;; Wrote the memory image into test.exe (13,954,214 bytes) Bytes permanently allocated: 160,720 Bytes currently in use: 3,624,680 Bytes available until next GC: 109,960 3624680 ; 109960 ; 160720 ; 1 ; 27104 ; 15000 $ ./test.exe Segmentation fault (core dumped) Did you try this? Ken |
From: Sam S. <sd...@gn...> - 2017-03-22 13:12:39
|
> * Ken Brown <xoebja@pbearyy.rqh> [2017-03-21 22:48:03 -0400]: > > On 3/21/2017 6:52 PM, Bruno Haible wrote: >> For me, with the same clisp-2.49.50, it succeeds, both in 32-bit and 64-bit >> Cygwin builds. Here's the output of "make check-exec-image": > > make check-exec-image works for me too, but the test case I gave in my > previous mail still crashes. Here it is again: > > $ ./clisp -norc -q -x '(progn (ext:saveinitmem "test.exe" :init-function > (function exit) :EXECUTABLE t))' > ;; Wrote the memory image into test.exe (13,954,214 bytes) > Bytes permanently allocated: 160,720 > Bytes currently in use: 3,624,680 > Bytes available until next GC: 109,960 > 3624680 ; > 109960 ; > 160720 ; > 1 ; > 27104 ; > 15000 > > $ ./test.exe > Segmentation fault (core dumped) > > Did you try this? works fine on macosx. -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net https://jihadwatch.org http://honestreporting.com http://americancensorship.org http://jij.org I am always late to my punctuality class. |
From: Bruno H. <br...@cl...> - 2017-03-21 22:52:42
|
Hi Sam and Ken, > > Ken, does it fail with the hg tip? > > Yes. I just built clisp from Bruno's tarball > (https://haible.de/bruno/gnu/clisp-2.49.50.tar.bz2), and here's what > happens when I try to save an executable in the build directory: > > $ ./clisp -norc -q -x '(progn (ext:saveinitmem "test.exe" :init-function > (function exit) :EXECUTABLE t))' > ;; Wrote the memory image into test.exe (13,849,465 bytes) > Bytes permanently allocated: 160,328 > Bytes currently in use: 3,602,952 > Bytes available until next GC: 66,168 > 3602952 ; > 66168 ; > 160328 ; > 2 ; > 26120 ; > 15000 > > $ ./test.exe > Segmentation fault (core dumped) For me, with the same clisp-2.49.50, it succeeds, both in 32-bit and 64-bit Cygwin builds. Here's the output of "make check-exec-image": ================================= 32-bit ================================= ./lisp.exe -B . -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -M lispinit.mem -x "(saveinitmem \"foo\" :executable t :norc t)" i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49.50 (2017-03-19) <http://clisp.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. ;; Wrote the memory image into foo.exe (9,653,004 bytes) Bytes permanently allocated: 89,504 Bytes currently in use: 1,862,536 Bytes available until next GC: 103,384 1862536 ; 103384 ; 89504 ; 1 ; 68088 ; 15000 Bye. ./foo -x "(setq zz 10) (saveinitmem \"foo\")" i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49.50 (2017-03-19) <http://clisp.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. 10 ;; Wrote the memory image into foo.mem (1,953,012 bytes) Bytes permanently allocated: 89,504 Bytes currently in use: 1,862,096 Bytes available until next GC: 103,888 1862096 ; 103888 ; 89504 ; 1 ; 19608 ; 15000 Bye. ./foo -norc -M foo.mem -x zz i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49.50 (2017-03-19) <http://clisp.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. 10 Bye. ./lisp.exe -B . -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -M lispinit.mem -x "(saveinitmem \"foo\" :executable t :norc t :quiet t :init-function (lambda () (prin1 *args*) (exit)))" -- a 1 i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49.50 (2017-03-19) <http://clisp.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. ;; Wrote the memory image into foo.exe (9,653,804 bytes) Bytes permanently allocated: 89,504 Bytes currently in use: 1,863,336 Bytes available until next GC: 102,584 1863336 ; 102584 ; 89504 ; 1 ; 71216 ; 15000 Bye. test "`./foo b | tr -d '\r'`" = '("b")' || exit 1 test "`./foo b 2 | tr -d '\r'`" = '("b" "2")' || exit 1 ls -l lisp.exe lispinit.mem foo foo.mem -rwxr-xr-x 1 bruno None 9653804 Mar 21 12:30 foo -rw-r--r-- 1 bruno None 1953012 Mar 21 12:30 foo.mem -rwxr-xr-x 1 bruno None 7699552 Mar 21 12:26 lisp.exe -rw-r--r-- 1 bruno None 1964412 Mar 21 12:28 lispinit.mem rm -f foo foo.mem ================================= 64-bit ================================= ./lisp.exe -B . -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -M lispinit.mem -x "(saveinitmem \"foo\" :executable t :norc t)" i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49.50 (2017-03-19) <http://clisp.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. ;; Wrote the memory image into foo.exe (12,371,952 bytes) Bytes permanently allocated: 151,088 Bytes currently in use: 2,896,280 Bytes available until next GC: 1,443,592 2896280 ; 1443592 ; 151088 ; 1 ; 102728 ; 15000 Bye. ./foo -x "(setq zz 10) (saveinitmem \"foo\")" i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49.50 (2017-03-19) <http://clisp.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. 10 ;; Wrote the memory image into foo.mem (4,310,848 bytes) Bytes permanently allocated: 151,088 Bytes currently in use: 2,895,768 Bytes available until next GC: 1,443,336 2895768 ; 1443336 ; 151088 ; 1 ; 24232 ; 16000 Bye. ./foo -norc -M foo.mem -x zz i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49.50 (2017-03-19) <http://clisp.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. 10 Bye. ./lisp.exe -B . -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -M lispinit.mem -x "(saveinitmem \"foo\" :executable t :norc t :quiet t :init-function (lambda () (prin1 *args*) (exit)))" -- a 1 i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49.50 (2017-03-19) <http://clisp.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. ;; Wrote the memory image into foo.exe (12,371,952 bytes) Bytes permanently allocated: 151,088 Bytes currently in use: 2,897,336 Bytes available until next GC: 1,444,120 2897336 ; 1444120 ; 151088 ; 1 ; 107632 ; 0 Bye. test "`./foo b | tr -d '\r'`" = '("b")' || exit 1 test "`./foo b 2 | tr -d '\r'`" = '("b" "2")' || exit 1 ls -l lisp.exe lispinit.mem foo foo.mem -rwxr-xr-x 1 bruno None 12371952 Mar 21 12:30 foo -rw-r--r-- 1 bruno None 4310848 Mar 21 12:30 foo.mem -rwxr-xr-x 1 bruno None 8036794 Mar 21 12:26 lisp.exe -rw-r--r-- 1 bruno None 4310888 Mar 21 12:27 lispinit.mem rm -f foo foo.mem |
From: Bruno H. <br...@cl...> - 2017-03-22 06:31:15
|
Hi Ken, > make check-exec-image works for me too, but the test case I gave in my > previous mail still crashes. Here it is again: Ah, I see what you mean. I did not try it. Please add this test to the "make check-exec-image" target. I'll try it on various platforms then. Bruno |
From: Ken B. <kb...@co...> - 2017-03-22 11:26:07
|
Hi Bruno, On 3/22/2017 2:31 AM, Bruno Haible wrote: > Please add this test to the "make check-exec-image" target. I'll try it > on various platforms then. I don't have write access to the hg repository, so I think someone else will have to do that. Ken |
From: Sam S. <sd...@gn...> - 2017-03-22 13:34:30
|
Hi Bruno, > * Ken Brown <xoebja@pbearyy.rqh> [2017-03-22 07:25:55 -0400]: > > On 3/22/2017 2:31 AM, Bruno Haible wrote: >> Please add this test to the "make check-exec-image" target. I'll try it >> on various platforms then. > > I don't have write access to the hg repository, so I think someone > else will have to do that. I will, no worries. I have a question for Bruno or anyone whose brain is more alive than mine ATM. Why does makemake output lines like this: --8<---------------cut here---------------start------------->8--- test "`./foo b | tr -d '\r'`" = '("b")' || exit 1 --8<---------------cut here---------------end--------------->8--- It seems to me that the `|| exit 1` part is completely unnecessary in a Makefile. I understand that `exit 1` is necessary in places like `(RMRF full; exit 1)` &c, but this trailer on the stand-alone line seems superfluous. What am I missing? -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://honestreporting.com http://mideasttruth.com http://thereligionofpeace.com https://jihadwatch.org A feature is a bug with tenure. |