4

After hearing of Seymour Papert's passing, I wanted to install Berkeley Logo (UCBLogo). The Ubuntu repos only have v5.5.

After downloading and extracting the archive, working out its dependencies (seemingly libbsd-dev libx11-dev build-essential libwxgtk3.0-dev libtinfo-dev texinfo texlive) and running ./configure, running make gives these errors:

gcc -g -O   -O0 -DUSE_OLD_TTY   -c -o coms.o coms.c
In file included from coms.c:30:0:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
 __MATHCALL_VEC (exp,, (_Mdouble_ __x));
 ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
 __MATHCALL_VEC (exp,, (_Mdouble_ __x));
 ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:100:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
 __MATHCALL_VEC (exp,, (_Mdouble_ __x));
 ^
<builtin>: recipe for target 'coms.o' failed
make: *** [coms.o] Error 1

The package builds properly on a Raspberry Pi (Raspbian, gcc 4.9.2, armv7l) but not on this machine (Ubuntu 16.04, gcc 5.4.0, x86_64). I wouldn't have expected errors generated inside system include files. The mathcalls.h header looks quite different on the two systems, with the error lines calling a different macro. Could this be a gcc-4 to gcc-5 issue?

1
  • As an update, I don't have a solution to this, but someone in the local LUG took a good look at the code and came up with some potential mitigations: [[GTALUG] Ubuntu 16.04 / gcc 5.4.0 - errors generated inside system include files](gtalug.org/pipermail/talk/2016-August/003922.html "[GTALUG] Ubuntu 16.04 / gcc 5.4.0 - errors generated inside system include files"). Essentially, the code redefines exp for its own purposes, when it's the nearest thing to a reserved word that the C language can have.
    – scruss
    Mar 21, 2017 at 22:40

1 Answer 1

2

I worked out how to compile this code:

  • In coms.c and in graphics.c move the line include <math.h> to before the line include "logo.h"
  • After running .configure open up the file makefile and change the call to the library -ltermcap with -lncurses.

Then you can run make and it should compile OK.

One thing I haven't worked out is how to compile with the wx toolkit. I have the libraries on my system, but both .configure and make seem to ignore it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .