Hello,
I have the following issue on macOS with latest git:
I'm compiling ecl with:
ABI=32 CFLAGS="-m32" LDFLAGS="-m32" ./configure --prefix=/opt/ecl/tmp
--enable-threads=yes
This test fails about 50% of the time:
(defun safe-system (string)
;; (cmpnote "Invoking external command:~% ~A~%" string)
(let ((result (ext:system string)))
(unless (zerop result)
(cerror "Continues anyway."
"(SYSTEM ~S) returned non-zero value ~D"
string result))
result))
(safe-system "sh -c 'echo OK'")
(si:quit 0)
$ /opt/ecl/tmp/bin/ecl -load test.lsp
;;; Loading "/Users/sylvain/src/lisp/ecl/test.lsp"
OK
$ /opt/ecl/tmp/bin/ecl -load test.lsp
;;; Loading "/Users/sylvain/src/lisp/ecl/test.lsp"
OK
An error occurred during initialization:
(SYSTEM "sh -c 'echo OK'") returned non-zero value -1.
$ /opt/ecl/tmp/bin/ecl -load test.lsp
;;; Loading "/Users/sylvain/src/lisp/ecl/test.lsp"
OK
* The call to "system" is failing with ECHILD (The calling process has no
existing unwaited-for child processes).
* I could pinpoint it to commit a7000ca0f9f360fc1e0697b1c879096aa189e10e
(Reimplementation of the SIGCHILD handler).
* It doesn't happen when compiling 64 bits or compiling with threads disabled
Unrelated to this, the following patch should fix an issue that "ar" is called
in some build steps instead of $(AR). This can cause some problems when
cross-compiling:
diff --git a/src/c/Makefile.in b/src/c/Makefile.in
index 495f205..1636a16 100644
--- a/src/c/Makefile.in
+++ b/src/c/Makefile.in
@@ -21,6 +21,7 @@ RM = @RM@
EXE = @EXEEXT@
DPP = ./dpp$(EXE)
RANLIB = @RANLIB@
+AR = @AR@
# Data for installation
#
@@ -101,7 +102,7 @@ ffi_x86_64.c: $(srcdir)/arch/ffi_x86_64.d $(DPP) $(HFILES)
../libeclmin.a: $(OBJS) all_symbols.o all_symbols2.o
$(RM) $@
- ar cr $@ $(OBJS)
+ $(AR) cr $@ $(OBJS)
$(RANLIB) $@
clean:
diff --git a/src/compile.lsp.in b/src/compile.lsp.in
index 0c437ac..e92bee1 100755
--- a/src/compile.lsp.in
+++ b/src/compile.lsp.in
@@ -104,9 +104,9 @@
(concatenate 'string
"sh -c 'rm -rf tmp; mkdir tmp;"
"cp @LIBPREFIX@eclmin.@LIBEXT@ @LIBPREFIX@ecl.@LIBEXT@;"
-"cd tmp; ar -x ../@LIBPREFIX@lsp.@LIBEXT@;"
+"cd tmp; @AR@ -x ../@LIBPREFIX@lsp.@LIBEXT@;"
"for i in *.@OBJEXT@; do mv $i lsp_`basename $i`; done;"
-"ar -r ../@LIBPREFIX@ecl.@LIBEXT@ *.@OBJEXT@ ../c/all_symbols2.@OBJEXT@; rm
*.@OBJEXT@;"
+"@AR@ -r ../@LIBPREFIX@ecl.@LIBEXT@ *.@OBJEXT@ ../c/all_symbols2.@OBJEXT@; rm
*.@OBJEXT@;"
"@RANLIB@ ../@LIBPREFIX@ecl.@LIBEXT@'"))
#+:wants-dlopen
Regards,
Sylvain
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Ecls-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecls-list