MathMap on Ubuntu 16.04 Xenial

201 views
Skip to first unread message

Dos Santos Mendes Filipe

unread,
Jul 6, 2016, 4:00:57 PM7/6/16
to MathMap
Hi,

I try to install MathMap on Ubuntu 16.04 (Xenial) and am confronted to a problem whith libnoise.

I tried to install from the tar.gz sources and after that, from the git repository.

The two methods ended the same when compiling with the following error message

builtins/libnoise.cpp:23:19: fatal error: noise.h: File not found



I think all the dependencies are installed. Anyway, libnoise is builtin so I presume a little something is missing for my ubuntu version and I don't know what.

thanks by advance to all who'll give me a hand on this :)

Tom Rathborne

unread,
Jul 6, 2016, 5:48:56 PM7/6/16
to mat...@googlegroups.com
Hola!

On Wed, Jul 06, 2016 at 12:27:15PM -0700, Dos Santos Mendes Filipe wrote:
> I try to install MathMap on Ubuntu 16.04 (Xenial) and am confronted to a
> problem whith libnoise.
>
> I tried to install from the tar.gz sources and after that, from the git
> repository.
>
> The two methods ended the same when compiling with the following error
> message
> builtins/libnoise.cpp:23:19: fatal error: noise.h: File not found
>
> I think all the dependencies are installed. Anyway, libnoise is builtin so I
> presume a little something is missing for my ubuntu version and I don't know
> what.

TL;DR:

git/mathmap$ rm -rf libnoise
git/mathmap$ make libnoise
git/mathmap$ make

Details:

... only to find another problem, see below for what I found!
I have Linux Mint with a hosed build system, but I also have debootstrap:

# mkdir /data/xenial ; debootstrap xenial /data/xenial
... mount -o loop { various system partitions }
# chroot /data/xenial
... install libgimp2.0-dev, 115M of deps, etc ...
# git clone https://github.com/schani/mathmap.git
... hack around ...

I found this zipfile ... and these diffs ...
Oh right, I knew that -- it's "make libnoise"!

This invokes the Makefile rule which extracts
libnoisesrc-1.0.0.zip
applies patches (libnoise*.diff), and builds it.

So, that's not a Xenial-specific solution,
but now I have a problem that I didn't have on Mint:

In file included from compiler.c:48:0:
opfuncs.h: In function 'fold_rhs':
opmacros.h:106:31: error: too many arguments to function
'gsl_sf_ellint_D'
#define ELL_INT_D(phi,k,n) gsl_sf_ellint_D((phi), (k), (n),
GSL_PREC_SINGLE)

So, there's some change to the gsl api in Xenial? *sigh*

While I was hacking it died on a libgif API change, the &error
parameter had disappeared, but I didn't hit that error again.

So yeah, a bit of bitrot and apparent nondeterminism is in your
future. I wish I understood autoconf better; it would make building
MathMap much less painful.

> thanks by advance to all who'll give me a hand on this :)

I hope I got you un-stuck, and I'll look into the API changes
when I have more time! Maybe you can adjust the code, there
are more clues than just "noise.h missing". :)

Speaking of time, broadband Internet and SSD are so amazing --
installing a whole xenial system with gimp development environment and
then getting most of the way through a mathmap build took less time
and effort than just downloading and installing mathmap used to!

Cheers,

Tom

--
-- Tom Rathborne -------------------------------- Itinerant Algorithm Shaman --
What is wanted is not the will to believe,
but the will to find out,
which is the exact opposite.
-- Bertrand Russell, "Skeptical Essays", 1928

Dos Santos Mendes Filipe

unread,
Jul 7, 2016, 2:35:19 AM7/7/16
to MathMap, tom.ra...@gmail.com
Hi Tom, thank you for the tips. I'm very not familiar with compiling sources (not at all really)

And tried to recompile libnoise as you recommended. The result is the same when I make MathMap, I get the same error as previously.

As my un derstanding an knowledge are limited, I don't know what to do :D Thank you anyways for trying !

I saw some warning compiling libnoise (obsolete constants and so)

Tom Rathborne

unread,
Jul 15, 2016, 2:29:37 PM7/15/16
to MathMap
Alllll righty!

My laptop is back with a fresh install of Linux Mint MATE 18, which is
based on Xenial, so I'll do this from scratch-ish. I think this will
cover all of the development library requirements:

$ apt-get install build-essential doxygen libtool-bin libgtksourceview2.0-dev libgif-dev clisp libgsl-dev libfftw3-dev libgimp2.0-dev

Then get the source code (ok you did this ... but it can't hurt to
start fresh if you have been banging on it:

$ git clone https://github.com/schani/mathmap.git
$ cd mathmap

In 'Makefile', I changed these settings:
THREADED = -DTHREADED_FINAL_RENDER
PREFIX = /usr/local

And then, build the auxilliary stuff:

$ git submodule update --init --recursive
$ make libnoise
$ make

Oi! Got some errors due to recent incompatible (for shame!) libgsl and
libgif changes. So, I made this change in opmacros.h:
-#define ELL_INT_D(phi,k,n) gsl_sf_ellint_D((phi), (k), (n), GSL_PREC_SINGLE)
+#define ELL_INT_D(phi,k,n) gsl_sf_ellint_D((phi), (k), (n))

... and I found this example of how to fix the libgif error:
http://github.com/richardgv/skippy-xd/commit/32d62ffe06b2809625b83846e6b8569a99deeb81
but I am lazy so I just monkeypatched rwimg/rwgif.c to add and ignore
the error code parameter -- see attached patch file. Put it in your
rwimg/ directory and
$ patch -p1 < gif.patch

Then back in the mathmap directory...
$ make
$ sudo make install

Then I started GIMP and had the MathMap plugin!

I hope this gets you running ... if not, I hope it at least gets you
a different error which you can report and I'll try to help again!

Cheers,

Tom

On Wed, Jul 06, 2016 at 11:35:19PM -0700, Dos Santos Mendes Filipe wrote:
> Hi Tom, thank you for the tips. I'm very not familiar with compiling
> sources (not at all really)
>
> And tried to recompile libnoise as you recommended. The result is
> the same when I make MathMap, I get the same error as previously.
>
> As my un derstanding an knowledge are limited, I don't know what to
> do :D Thank you anyways for trying !
>
> I saw some warning compiling libnoise (obsolete constants and so)

--
-- Tom Rathborne --------------------------------------- Chief Talent Artist --
He who writes with no misspelled words has prevented a first suspicion
on the limits of his scholarship or, in the social world,
of his general education and culture. -- Julia Norton McCorkle
gif.patch
Reply all
Reply to author
Forward
Message has been deleted
0 new messages