[GTALUG] Ubuntu 16.04 / gcc 5.4.0 - errors generated inside system include files

D. Hugh Redelmeier hugh at mimosa.com
Mon Aug 8 18:01:17 EDT 2016


| From: Stewart C. Russell via talk <talk at gtalug.org>

|  So what we have here is a kind of
| internal bitrot: the code doesn't change, but the standards of the
| language do, so it won't build.

Perhaps not in this case.  exp(3) has always been in <math.h>.  But if a 
simple declaration in that header looked like this:
	double exp();
and it got attacked by the logo.h #define to turn it into
	double expresn();
the resulting error message ought to be a lot clearer.  I don't know
why there would not have been an error (a clash with the programs's
external variable exp / expresn).

But glibc started doing odd preprocessor tricks (token pasting I think, 
but I didn't look closely) and then weird things happen.

So the actual behaviour rotted whereas the language status didn't
change.  I think.

| Thank you. I'll definitely try the simpler ones. Don't think the glibc
| ones are within my grasp.

It turns out that there are other compiler error messages that I
haven't sorted through.  But since 6.0 is in Fedora, you might have a
look at what the source RPM does to patch them up.

(Fedora RPMs include an unchanged upstream tar.gz and a bunch of
patches and a recipe for building the package.  Even if it doesn't
directly apply to Ubuntu/debian, it should be quite helpful.)

| You'd previously asked why I wasn't using the distro-supplied versions.
| True enough: Ubuntu has a packaged UCB Logo 5.5 archive that installs
| and runs easily enough. Unfortunately, it's not fit for my purposes.

That's sad.  6.0 seems to date back to 2008.  Maybe you could package
6.0 for debian or Ubuntu if you figure this out.

| Yeah, I should probably do this using Python's turtle module, as it
| makes some nice output and is actually maintained. Logo, however,
| encourages a much more interactive development style.

I have a soft spot for Logo.  I've described some of my experience
with it on this list.

| 	cs pd repeat 10 [
| 		rt  54 fd 43.865
| 		lt  90 fd 45.002
| 		lt 108 fd 45.002
| 		lt  90 fd 43.865
| 		lt  90
| 	] pu ht

Nice.  Reminds me of some things that we came up with when my kids and
I were playing with logo.  (We were using Atari 8-bit Logo, a product
of LCSI, a company with which Seymour Papert was involved.)

I had no trouble running it using Fedora's package.

Some of those lengths look a bit, uhh, empirical.

It's more fun if you don't start with cs and end with ht.  Then you
can iterate and get interesting effects.
	cs repeat 6 [load "stewarts-pattern.logo2 fd 30]
	cs repeat 2 [load "stewarts-pattern.logo2 fd 45.002]
	cs repeat 3 [load "stewarts-pattern.logo2 rt 10]


More information about the talk mailing list