[PATCH] fix build issues in Hurd systems

Flávio Cruz <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <CAKwpGPzOzdswuhMpWjQ+RaZ+bWZZ=PchWX1YVfM4O+qdB8OatA@mail.gmail.com>
Hello

There has been some issues when building clisp in Debian Hurd. See
https://buildd.debian.org/status/fetch.php?pkg=clisp&arch=hurd-i386&ver=1%3A2.49-10&stamp=1440769077
where
compilation fails with:

Bytes permanently allocated:             90,464
Bytes currently in use:               5,313,132
Bytes available until next GC:        1,328,283

*** - handle_fault error2 ! address = 0x7fff6884 not in
[0x67d05128,0x680a1000) !
SIGSEGV cannot be cured. Fault address = 0x7fff6884.
GC count: 128
Space collected by GC: 0 97002732
Run time: 5 800000
Real time: 6 392980
GC time: 0 620000
Permanently allocated: 90464 bytes.
Currently in use: 6641408 bytes.
Free space: 7 bytes.

*** - UNIX error 16776913: (ipc/mig) bad request message ID

*** - UNIX error 16776913: (ipc/mig) bad request message ID

*** - UNIX error 16776913: (ipc/mig) bad request message ID
make[1]: *** [interpreted.mem] Segmentation fault

This happens because the call to fsync (on stream.d) sets errno to
EMIG_BAD_ID, which crashes clisp. This patch fixes the problem by
defining IS_EINVAL_EXTRA for Hurd.

Best
Flávio

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140

_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
clisp-hurd-einval-extra.patch (text/x-patch, 817 B)
Description: Define IS_EINVAL_EXTRA for Hurd systems
 clisp (1:2.49-10) unstable; urgency=medium
 .
   * Makes clisp compilable under debuild
   * Solves https://lists.debian.org/debian-hurd/2012/06/msg00053.html

Author: Flavio Cruz <[email protected]>

Last-Update: 2015-09-23

--- clisp-2.49.orig/src/stream.d
+++ clisp-2.49/src/stream.d
@@ -3483,6 +3483,8 @@ local void clear_tty_input (Handle handl
   #define IS_EINVAL_EXTRA  ((errno==EBADF)||(errno==EACCES)||(errno==EBADRQC))
 #elif defined(UNIX_DARWIN) || defined(UNIX_FREEBSD) || defined(UNIX_NETBSD) || defined(UNIX_OPENBSD)
   #define IS_EINVAL_EXTRA  ((errno==EOPNOTSUPP)||(errno==ENOTSUP)||(errno==ENODEV))
+#elif defined(UNIX_HURD)
+  #define IS_EINVAL_EXTRA  ((errno==EOPNOTSUPP)||(errno==EMIG_BAD_ID))
 #else
   #define IS_EINVAL_EXTRA  0
 #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.