dprintf error seems to prevent using deputy on Ubuntu 14.04.3 LTS
$ ivycc --deputy --gcc=c99 -c -o src/nrpc.o src/nrpc.c Fatal error: exception Invalid_argument("dprintf: unknown format %s,")
My first time using ivycc. Had some hiccups building & installing that I think I resolved. (The first build complained about a missing realpath.cmi, but "make clean && make" took care of that.)
I guess the above error comes out of ocaml because the input doesn't refer to dprintf. I am using a newer version of ocaml than configure contemplates: version 4.01.0 (from apt-get). Is that known not to work, or is there another workaround? No amount of --verbose or --trace offered any clues.
Thanks for checking in here!
First, let me warn you about a couple of things. I was never involved with the development of Ivy. I found it last year, discovered that it didn't build, and decided to try to resurrect it to at least the point of building and running. I also wanted to make it easier for others to find and try, since it's an interesting project.
(Also, I'm not very knowledgable about OCaml. I'm a Haskeller who would like to dabble in it.)
That said, I'm happy to know that somebody else is trying it out, and I welcome any support in getting things working and figuring out bugs.
If you get a reproducible build issue, please do let me know, and we can try to fix it.
I don't know which versions of OCaml will work, but I did use 4.01.0 from apt-get on Ubuntu 15.04 to build Ivy myself. Shamefully, I haven't actually looked into running it very much since I got busy with other stuff.
If you can figure out your issue and share the solution here, it would make me happy. :) I don't currently have time to work on Ivy. But I can try to support you if you need it.
And thanks for your answers!
Sounds like we'll need an ocamler to make any real progress. Simple problems I encountered:
- cannot build out of tree. My patch to
configure.achelps but doesn't fix the problem. - heapsafe-lib builds glibc setjmp directly. Afaict there's no need; better to just link to glibc. Since I don't have the requisite header
bits/setjmp.hand wasn't trying to use heapsafe, I just touched all the.ofiles, and everything still linked. - There's something screwy with the dependencies. On first build realpath.cmi was not produced, leading to an ocaml complaint. A clean rebuild created it.
-
configure.acdoesn't useAC_CONFIG_SUBDIRSbecause it passes--with-zrapp. IIRC the reasoning is incorrect: you can pass extra arguments into the top-level configure, and it will propogate them down.
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AC_PROG_INSTALL
AC_CANONICAL_SYSTEM
-IVYHOME=`pwd`
+IVYHOME=$srcdir
DEFAULT_CIL_MODE=GNUCC
IVY_VERSION=1.0
@@ -130,9 +130,9 @@ AC_SUBST(USE_SATURN)
#We can't use AC_CONFIG_SUBDIRS because it doesn't support adding new
#flags (--with-zrapp):
# AC_CONFIG_SUBDIRS(cil)
-if test -f cil/configure; then
+if test -f $srcdir/cil/configure; then
AC_MSG_NOTICE(Configuring CIL:);
- cd cil; ./configure --with-zrapp; cd ..
+ (cd $srcdir/cil; ./configure --with-zrapp;)
else
AC_MSG_ERROR(Missing the CIL directory)
fi
``
The $srcdir change seems like an obvious improvement. Thanks!
I'm not sure about the setjmp issue. It seems the original developers/researchers might have done something special to it.
As for AC_CONFIG_SUBDIRS, it seems like they wanted to make --with-zrapp required. I'm not experienced with Autoconf, but I tried the following, and it didn't pass --with-zrapp:
# Pass --with-zrapp to cil/configure
AC_ARG_WITH([zrapp],
[AS_HELP_STRING([--without-zrapp],
[disable support for zrapp in CIL (unsupported)])],
[],
[with_zrapp=yes])
AC_CONFIG_SUBDIRS(cil)