all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* confusion/mdl
@ 2018-08-29  3:14 Benjamin Slade
  2018-08-29 15:29 ` confusion/mdl Pierre Neidhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Slade @ 2018-08-29  3:14 UTC (permalink / raw)
  To: Guix-Help


I'm trying to build confusion, the MDL (muddle lisp) interpreter [from
http://www.russotto.net/git/mrussotto/confusion/src/master/src ]. It
says "To build it, you will need the Boehm-Demers-Weiser conservative
garbage collector for C", so I installed the guix package `libgc`. I
haven't had much luck building it though:

````
$ make
g++ -g -DGC_DEBUG  -Wall -Wno-switch   -c -o macros.o macros.cpp
macros.cpp: In function ‘mdl_value_t* mdl_get_atom(const char*, bool, mdl_value_t*)’:
macros.cpp:616:27: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     char *trailer = strstr(pname, "!-");
                     ~~~~~~^~~~~~~~~~~~~
macros.cpp: In function ‘char* mdl_getcwd()’:
macros.cpp:1121:16: error: ‘getcwd’ was not declared in this scope
         cwdp = getcwd(cwdbuf, bsize);
                ^~~~~~
macros.cpp:1121:16: note: suggested alternative: ‘getw’
         cwdp = getcwd(cwdbuf, bsize);
                ^~~~~~
                getw
macros.cpp: In function ‘mdl_value_t* mdl_internal_open_channel(mdl_value_t*)’:
macros.cpp:1322:10: error: ‘isatty’ was not declared in this scope
     if (!isatty(fileno(f)))
          ^~~~~~
macros.cpp: In function ‘mdl_value_t* mdl_internal_reset_channel(mdl_value_t*)’:
macros.cpp:1367:10: error: ‘isatty’ was not declared in this scope
     if (!isatty(fileno(f)))
          ^~~~~~
macros.cpp: In function ‘mdl_value_t* mdl_internal_reopen_channel(mdl_value_t*)’:
macros.cpp:1406:10: error: ‘isatty’ was not declared in this scope
     if (!isatty(fileno(f)))
          ^~~~~~
macros.cpp: In function ‘void mdl_interp_init()’:
macros.cpp:3865:24: warning: ‘GC_gc_no’ is deprecated [-Wdeprecated-declarations]
     last_assoc_clean = GC_gc_no;
                        ^~~~~~~~
In file included from macros.hpp:18,
                 from macros.cpp:27:
/home/slade/.guix-profile/include/gc/gc.h:81:35: note: declared here
 GC_API GC_ATTR_DEPRECATED GC_word GC_gc_no;
                                   ^~~~~~~~
macros.cpp: In function ‘mdl_value_t* mdl_builtin_eval_logout()’:
macros.cpp:8942:9: error: ‘getppid’ was not declared in this scope
     if (getppid() == 1) exit(0);
         ^~~~~~~
macros.cpp:8942:9: note: suggested alternative: ‘getpt’
     if (getppid() == 1) exit(0);
         ^~~~~~~
         getpt
macros.cpp: In function ‘mdl_value_t* mdl_builtin_eval_sleep()’:
macros.cpp:9175:5: error: ‘sleep’ was not declared in this scope
     sleep(fix->v.w);
     ^~~~~
make: *** [<builtin>: macros.o] Error 1
````

I had a look at Arch's AUR package [
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mdli ] for it*
and it really seems to consist of `make CXX='g++-4.3'`. Though
Confusion's build instructions themselves don't seem to require an older
version of gcc, but, then again, I didn't have much luck building it on
guix.

What would people suggest as the next step to try?


* Which I couldn't get to successfully build on my Arch machine either,
  the old gcc versions don't seem to build properly.

--
Benjamin Slade - https://babbagefiles.xyz
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: confusion/mdl
  2018-08-29  3:14 confusion/mdl Benjamin Slade
@ 2018-08-29 15:29 ` Pierre Neidhardt
  2018-08-29 18:58   ` confusion/mdl Benjamin Slade
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Neidhardt @ 2018-08-29 15:29 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: Guix-Help

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]


> macros.cpp: In function ‘mdl_value_t* mdl_get_atom(const char*, bool, mdl_value_t*)’:
> macros.cpp:616:27: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
>      char *trailer = strstr(pname, "!-");

Well, it looks like macros.cpp is doing something dirty here.
I suppose this is an upstream bug (which should be reported).
As a workaround, you could try setting appropriate compilation flags.  Look
around "-fpermissive" in the gcc manual.

(Sorry if this help is a little scarce, I'm very busy these days... :p)

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: confusion/mdl
  2018-08-29 15:29 ` confusion/mdl Pierre Neidhardt
@ 2018-08-29 18:58   ` Benjamin Slade
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Slade @ 2018-08-29 18:58 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: Guix-Help

Thanks, that at least gives me a place to start.


On 2018-08-29T09:29:40-0600, Pierre Neidhardt <mail@ambrevar.xyz> wrote:


 > > macros.cpp: In function ‘mdl_value_t* mdl_get_atom(const char*, bool, mdl_value_t*)’:
 > > macros.cpp:616:27: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
 > >      char *trailer = strstr(pname, "!-");

 > Well, it looks like macros.cpp is doing something dirty here.
 > I suppose this is an upstream bug (which should be reported).
 > As a workaround, you could try setting appropriate compilation flags.  Look
 > around "-fpermissive" in the gcc manual.

 > (Sorry if this help is a little scarce, I'm very busy these days... :p)

 > -- 
 > Pierre Neidhardt
 > https://ambrevar.xyz/


-- 
Benjamin Slade - https://babbagefiles.xyz 
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-29 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-29  3:14 confusion/mdl Benjamin Slade
2018-08-29 15:29 ` confusion/mdl Pierre Neidhardt
2018-08-29 18:58   ` confusion/mdl Benjamin Slade

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.