-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pure-octave: update to 0.8 #353
Conversation
According to the upstream README, the current version of pure-octave is not compatible with the current MacPorts version of octave, 4.2.0 (and probably octave 4.2.1, that was released a couple of days ago). |
That's true, I'm still working on Octave 4.2 compatibility (upstream developer here). But the 0.8 version will at least work with Octave 4.0.3, which is an improvement over the 0.7 version currently in MP which doesn't do that (and doesn't compile with Octave 4.2 either). I hope that I can resolve the remaining issues with Octave 4.2 soon (looks like the octave_embed interface was broken in 4.2.0, other high-profile projects like R are hit by this as well, see e.g. renozao/RcppOctave#14). But this is an intricate issue involving internals of the Octave interpreter implementation, so it may well take a little while. In the meantime, pure-octave 0.8 version gives MP Pure users a migration path since they may stick to Octave 4.0.3 a bit longer (which still builds and runs fine with MP, if you just check out the 4.0.3 version of the Portfile). That's what I'm doing myself right now. |
@Schamschula, sorry, I thought that the 0.8 version would at least build with Octave 4.2.0, because it contains some fixes for that, too. It certainly builds with Octave 4.2.0 on Linux. But it seems that there are some additional Mac-specific issues there, too. Obviously the |
I don't understand this, pure-octave 0.8 builds just fine against Octave 4.2.0 if I compile it straight from the source. It only fails with the Portfile. Maybe some snafu in the Pure portgroup, I'm checking that now. |
Indeed, port groups can be quite an issue: e.g. the octave port group... |
It must be the Pure portgroup; here's the compile command when I compile straight from source using just
Here's the same command when running
Note that the |
Yup. It seems the pure port group overwrites the libc++11 used by octave. |
You found that much quicker than I did. ;-) Where's that portgroup file again?? |
Ok, looks like I have to add this line to the portfile:
Let me quickly amend the pull request and rebase, then everything should be good. |
8b54a1d
to
63afd7f
Compare
Fixed and squashed to a single commit again. Builds fine with Octave 4.2 now, too, so I'd say that it's good to go. |
The pure portgroup sets |
Ok, so the proper way to handle this situation would be to set |
I don't know. Why does this port need to use a different C++ standard library than the one MacPorts wants to use? |
Octave probably achieves the same effect with But the pure PortGroup probably needs a fix in any case. (I would say that we need a variable that tells what the default stdlib setting is. At the moment one can change |
That's probably true.
Why would need such a variable?
Why would it break, rather than doing exactly what it was programmed to do? |
(Let's work under assumption that the GCC magic by Marcus doesn't work and that users need to use either libstdc++ v.2 or libc++, that is: forget about GCC for the sake of this argument.) Scenario A: port needs C++11, but doesn't have any dependencies. So it simply uses configure.cxx_stdlib libc++ on a no-matter-what basis. Scenario B: port has some heavy dependencies like boost and needs C++11. In that case the only reasonable thing is if {${configure.cxx_stdlib} != "libc++"} {
ui_error ...
} since one cannot use either of the two stdlibs to compile. But the second example really wants make sure that Now imagine a PortGroup for compiling software that's all C++11 (think of Qt for example). Imagine scenario A in particular. A PortGroup for more-or-less-standalone software could easily set configure.cxx_stdlib libc++ to achieve C++11 compatibility. But then another port with more dependencies (some of which include C++ interface that has been compiled against
|
This is a rather peculiar case, because unlike all the other Pure addon modules, which get built using the system C/C++ compiler directly, pure-octave gets built using Octave's mkoctfile utility. The sources of pure-octave itself don't need the You can check that yourself by trying to compile pure-octave directly from source (with both the latest octave and pure installed). Just So it's not really anything with the pure-octave port itself, and the pure port group is all right, too. It's just that peculiar requirement of Octave 4.2's mkoctfile which simply needs the As an aside, I must say that I'm not happy with the Octave 4.2 release anyway. While Octave 4.0 was really stable, 4.2 seems like an interim release to me, with some of the internal APIs being redesigned but not quite there yet. This release is giving me headache also on Linux, since it breaks the internal API which allows modules like pure-octave to embed the Octave interpreter in other C/C++ programs. More precisely, one of Octave's crucial interface routines in that API, eval_string(), just segfaults, probably due to some missing initialization in the API routine that creates the embedded Octave interpreter. This routine works fine in both Octave 4.0.x and Octave 4.3, but it's just completely broken in Octave 4.2. I haven't been able to track this down yet, and knowing that it's fixed somehow in Octave 4.3, I won't waste any more time with this release. So I'm currently using either Octave 4.0.3 or 4.3 instead, on all platforms, and I'm waiting as fast as I can for the upcoming 4.4 release, so that I can just pretend that Octave 4.2 ever existed. 😉 TL;DR Let's just keep everything as it is now, the port builds fine now, the pure port group doesn't need any fixes either, and everyone is happy. 😄 |
BTW, in case the MP Octave maintainer is listening, can the octave-devel port please be updated so that it builds Octave 4.3, instead of some pre-release snapshot of 4.2? Just an idea... |
Upstream release (compatibility with Octave 4.0.3+).