Le 2016-03-29 17:23, Solène Rapenne a écrit :
Hello,

My system : (current, amd64)
OpenBSD 5.9-current (GENERIC.MP) #1970: Mon Mar 28 17:02:06 MDT 2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP


I installed lang/erlang17 (erlang-17.5p5v0) and the command are
suffixed by 17 (erl17 for erl, erlc17 for erlc). Problem, erlc17 tries
to call "erl" binary, which doesn't exist.

~~~ Terminal ~~~
# erlc17
erlc: Error 2 executing 'erl'.
~~~~~~~~

It is possible to get it working by creating a symlink of erl to erl17
but this is a workaround, not really nice.
I made a diff inspired from another patch that fix the name error in
another file, but with mine patch the ${MAJ_V} stays as this and isn't
replaced :(


--- erts/etc/common/erlc.c.orig Tue Mar 29 16:20:28 2016
+++ erts/etc/common/erlc.c      Tue Mar 29 16:20:58 2016
@@ -448,7 +448,7 @@

     status = my_spawnvp(argv)/*_spawnvp(_P_WAIT,progname,argv)*/;
     if (status == -1) {
-       fprintf(stderr, "erlc: Error executing '%s': %d", progname,
+ fprintf(stderr, "erlc${MAJ_V}: Error executing '%s': %d", progname,
                GetLastError());
     }
     if (pause_after_execution) {
@@ -473,7 +473,7 @@
     va_start(ap, format);
     erts_vsnprintf(sbuf, sizeof(sbuf), format, ap);
     va_end(ap);
-    fprintf(stderr, "erlc: %s\n", sbuf);
+    fprintf(stderr, "erlc${MAJ_V}: %s\n", sbuf);
     exit(1);
 }



Kind regards


This patch can go to garbage, it still call erl executable if I put 17 instead of the variable within the patch. In the file modified by the patch, there is a "# define ERL_NAME "erl"" but I won't compile if erl is modified.

Reply via email to