gnuplot on MacPorts with aqua?

Mojca Miklavec mojca.miklavec.lists at gmail.com
Sun Apr 29 03:46:43 PDT 2012


On Sat, Apr 28, 2012 at 08:39, Marko Käning wrote:
>> On Apr 27, 2012, at 11:13 PM, Jason Swails wrote:
>>
>> Have you tried rebuilding aquaterm with MacPorts?
>
> Well, I've done that just now and it didn't change anything.
> X11 works, aqua doesn't. :-(

In what way does it fail?

Do you happen to have /Applications/AquaTerm.app installed? Do you
happen to use i386 gnuplot? Both reasons will almost surely make the
old (= what is currently installed in macports) version of AquaTerm
fail.

If you have the system-wide AquaTerm installed, it might help to
completely remove AquaTerm installed on the system (just rm
/Applications/AquaTerm.app, /Library/Frameworks/AquaTerm.framework,
/usr/lib/libaquaterm*, /usr/local/include/aquaterm). If you have
32-bit gnuplot it might help to use 64-bit only (you may not enable
wxwidgets variant).


BACKGROUND

Let me explain a bit of a background. AquaTerm does some communication
between gnuplot and AquaTerm.app. That works perfectly fine as long as
gnuplot and AquaTerm.app run either both in 32-bit or both 64-bit,
else there are problems when data is transferred between both. If you
are using 64-bit system and happen to have 32-bit gnuplot then
AquaTerm will fire up in 64-bit mode by default and gnuplot will send
32-bit integers to it, so it will fail to work.

With substantial patches by Alexander Wittig AquaTerm 1.1.0 was
released about a year ago - which fixed the majority of these
problems. But now there is a problem if you compile gnuplot with the
old aquaterm library and gnuplot starts the new AquaTerm.app from
/Applications instead of /Applications/MacPorts.

In AquaTerm 1.1.0 two show stoppers remained (when 32 and 64-bit was
mixed, plots were not cleared; and after doing "set term aqua
<something>" the numbers on both axes were transparent), which is why
I was reluctant to ask macports to upgrade. On top of that I realized
that Per Persson didn't upload tar.gz with source to sourceforge, only
AquaTerm1.1.0.dmg which was probably the main reason why macports
didn't automatically pick it up.

Some time ago Alexander fixed the bug with failure to clear the plot.
Last week I found and fixed the bug with transparent labels. I have
created a repository on
    https://github.com/mojca/aquaterm_aquaterm/
which according to my current knowledge fixes all the major bugs
(there are still many compiler warnings when compiling on Lion; I
didn't research how to get rid of them yet).

I suggested to Per to do a new release, but he seems to be busy enough
and might not have time to look into it right now. I planned to
prepare an experimental package for MacPorts fetching the source from
GitHub, just to get a broader audience being able to test if there are
any remaining bugs.


GNUPLOT

It would be perfect if gnuplot had slightly more flexibility to:
a) specifying which aquaterm to use if there are many versions on the system
b) explicitly enable or disable aquaterm
c) use "-framework AquaTerm" and "-F/path/to/Frameworks" instead of
"-I/path/to/include/" and "-laquaterm"
d) specify a different default terminal even when aquaterm is installed

The (c) part was an explicit wish of Per Persson, the rest are my own
"feature requests".

I submitted two patches to gnuplot to do (a)-(d), see:
    http://sourceforge.net/tracker/index.php?func=detail&aid=3476165&group_id=2055&atid=302055
    http://sourceforge.net/tracker/?func=detail&aid=3476336&group_id=2055&atid=302055
or for (a)-(c):
    https://github.com/mojca/gnuplot/blob/mojca/m4/apple.m4

One of the main developers consequently applied the following patch
which solves (b) only:
    https://github.com/mojca/gnuplot/commit/e68660baab61725e74d24438ea72774208e03600
by disabling aquaterm by default and only providing a switch to enable it.

(I'm sorry for sending links to unofficial version of repository, but
I'm not aware of a nice way to link to single commits on ViewVC,
http://gnuplot.cvs.sourceforge.net/gnuplot/)

One of the main "problems" is that nobody in the core development team
of Gnuplot is a mac user, so they depend solely on external people
sending patches and providing feedback. There is lack of both (people
sending patches for OS X and people testing the patches and providing
valuable feedback).

I wanted to submit some of the mentined patches also on the Macports
tracker to get more testers, but I would first like to get gnuplot
4.6.0 included into MacPorts before AquaTerm hacks are discussed, see:
    http://trac.macports.org/ticket/33596
I volunteered to become gnuplot maintainer, but I need some
experienced developer with commit rights first to review the patch and
do the final commit to SVN.

Mojca


More information about the macports-users mailing list