Pure and LLVM 3.6

132 views
Skip to first unread message

Albert Graef

unread,
May 6, 2015, 5:15:21 AM5/6/15
to pure...@googlegroups.com
Hi folks,

sorry for the long hiatus, which was necessary since I had to organize the Linux Audio Conference 2015 (which was a big success, you can find out more about it here: http://lac.linuxaudio.org/2015/).

If you've tried LLVM 3.6 already, which was released during the time I was busy with LAC, you surely noticed that Pure doesn't build against the new LLVM yet. That's because the old JIT was removed from LLVM, so I'll have to finally bite the bullet and port Pure over to the new MCJIT now. ;-) This probably isn't trivial and will thus take some time. So for the time being you'll have to hold on to LLVM 3.5 for a little longer while I'm working on that.

This shouldn't actually be much of an issue on most systems right now, except for Arch Linux which has switched over to LLVM 3.6 already. Fortunately, LLVM 3.5 is still available in the Arch repositories (packages llvm35, lvvm35-libs and clang35). So Alastair and I have made the Pure packages depend on those for now. The binary package repositories have been updated as well.

Unfortunately, there are still some issues with Arch's LLVM 3.5 packages. In particular, a few files (BugpointPasses.so, LLVMgold.so, bfd-plugins/LLVMgold.so and libLTO.so under /usr/lib) in the llvm35 package conflict with the llvm-libs package, which is still needed even if you install LLVM 3.5, because the mesa package depends on it. For the time being, you can just overwrite these files, by performing the upgrade with the --force option, i.e.:

sudo pacman -Syu --force

(Also make sure that you reply with "y" when pacman asks whether it should replace llvm with llvm35 and clang with clang35, otherwise upgrading the Pure packages won't work.)

If you'd rather keep the LLVM 3.6 versions of the conflicting files, just reinstall the llvm-libs package afterwards: sudo pacman -S llvm-libs.

Ok, I guess that's it for now. I'll let you know when I've ported Pure over to the MCJIT. In fact, that's my last TODO item before I can finally put the 1.0 sticker on Pure. :)

Best,
Albert

--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email:  agg...@gmail.com
WWW:    https://plus.google.com/+AlbertGraef

Albert Graef

unread,
May 6, 2015, 5:43:46 AM5/6/15
to pure...@googlegroups.com
On Wed, May 6, 2015 at 11:15 AM, Albert Graef <agg...@gmail.com> wrote:
sudo pacman -Syu --force

That's the command if you're using our binary package repos, of course. If you're upgrading directly from the AUR, that becomes:

yaourt -Syu --force

Eddie Rucker

unread,
May 6, 2015, 10:05:50 AM5/6/15
to pure...@googlegroups.com

Congratulations Albert on the successful Linux Audio Conference! I am looking forward to the updated JIT and Pure version 1.0.


Eddie Rucker

Director of Institutional Research
Blue Mountain College

From: pure...@googlegroups.com <pure...@googlegroups.com> on behalf of Albert Graef <agg...@gmail.com>
Sent: Wednesday, May 6, 2015 4:15 AM
To: pure...@googlegroups.com
Subject: [pure-lang] Pure and LLVM 3.6
 
--
You received this message because you are subscribed to the Google Groups "pure-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pure-lang+...@googlegroups.com.
To post to this group, send email to pure...@googlegroups.com.
Visit this group at http://groups.google.com/group/pure-lang.
For more options, visit https://groups.google.com/d/optout.

Albert Graef

unread,
May 9, 2015, 1:01:02 AM5/9/15
to pure...@googlegroups.com
On Wed, May 6, 2015 at 11:15 AM, Albert Graef <agg...@gmail.com> wrote:
Unfortunately, there are still some issues with Arch's LLVM 3.5 packages.

In fact, it seems that this has been fixed already. :) (Aus usual, Manjaro was a bit late, but the corresponding updates for llvm35 et al arrived there now as well.)

Michel Alexandre Salim

unread,
Jul 20, 2015, 1:34:12 AM7/20/15
to pure...@googlegroups.com
Hi Albert,


On Wednesday, May 6, 2015 at 4:15:21 PM UTC+7, aggraef wrote:

Ok, I guess that's it for now. I'll let you know when I've ported Pure over to the MCJIT. In fact, that's my last TODO item before I can finally put the 1.0 sticker on Pure. :)


Do you have a rough ETA on when this port is done -- and where could we see the work-in-progress code? (Couldn't find it in the Hg repo). Fedora 23 has been branched, featuring LLVM 3.6, scheduled for release at the end of October. Hoping to get at least a snapshot build working ASAP


Not too urgent though -- if when Fedora 24 is branched (roughly next January) there is still no working build then the package gets retired.

Best,

-- 
Michel Alexandre Salim

Albert Graef

unread,
Jul 20, 2015, 4:19:14 AM7/20/15
to pure...@googlegroups.com
Hi Michel,

On Mon, Jul 20, 2015 at 7:34 AM, Michel Alexandre Salim <sal...@fedoraproject.org> wrote:
Do you have a rough ETA on when this port is done -- and where could we see the work-in-progress code? (Couldn't find it in the Hg repo).

Sorry, I haven't started working on that yet. I hoped that I could work on it during the summer semester holidays, but there' still lot of other stuff I need to do for work. I'll let you and everybody else know when I start working on that branch.

For the time being, do you still have LLVM 3.5 in Fedora? Ubuntu still has both 3.5 and 3.6 in its repositories, although you can only install the development packages for one of the versions at the same time. (In principle, it's possible to have several full versions of LLVM all installed in parallel, if it's done the right way, like on OSX using MacPorts.)

Michel Alexandre Salim

unread,
Jul 21, 2015, 4:17:58 AM7/21/15
to pure...@googlegroups.com
Hi Albert,


On Monday, July 20, 2015 at 3:19:14 PM UTC+7, aggraef wrote:
Hi Michel,

On Mon, Jul 20, 2015 at 7:34 AM, Michel Alexandre Salim <sal...@fedoraproject.org> wrote:
Do you have a rough ETA on when this port is done -- and where could we see the work-in-progress code? (Couldn't find it in the Hg repo).

Sorry, I haven't started working on that yet. I hoped that I could work on it during the summer semester holidays, but there' still lot of other stuff I need to do for work. I'll let you and everybody else know when I start working on that branch.

For the time being, do you still have LLVM 3.5 in Fedora? Ubuntu still has both 3.5 and 3.6 in its repositories, although you can only install the development packages for one of the versions at the same time. (In principle, it's possible to have several full versions of LLVM all installed in parallel, if it's done the right way, like on OSX using MacPorts.)

Alas, no, Fedora defaults to having the single, latest version of a particular library/framework, and compatibility packages are only created as needed -- the reverse of the Debian/Ubuntu situation where you have multiple Python, LLVM, etc. stacks and only the default gets changed.

If there is buildable code by January that's fine, otherwise I can ask for an exemption if the feature is being worked on (or try and maintain a parallel LLVM stack, but these days sadly I don't have time to maintain highly-complex packages like LLVM). Perhaps you'd welcome outside help though? If there's information available on Pure internals, and an overview of what changes are needed it seems an interesting enough task to dedicate spare time to :)

Thanks,

-- 
Michel

Albert Graef

unread,
Jul 21, 2015, 5:00:04 AM7/21/15
to pure...@googlegroups.com
Hi Michel,

On Tue, Jul 21, 2015 at 10:17 AM, Michel Alexandre Salim <sal...@fedoraproject.org> wrote:
If there's information available on Pure internals, and an overview of what changes are needed it seems an interesting enough task to dedicate spare time to :)

Help is always welcome, of course. ;-)

I'm afraid, though, that LLVM 3.6 calls for a substantial rewrite of Pure's internals, because the old JIT isn't supported any longer. This isn't straightforward because the new JIT (MCJIT) does things very differently, in particular, when it comes to recompiling functions on the fly. At least it was that way when I last looked at MCJIT. And then there might still be bugs in the MCJIT. Being one of the LLVM applications with the heaviest use of dynamic compilation features, Pure is likely to shake them out, just as with the old JIT. ;-)

However, I really want to solve this asap. (I'm on Arch, a rolling distro, so being stuck with LLVM 3.5 hurts me, too.) So I hope that I can still set aside some weeks to work on this during summer and autumn.

Reply all
Reply to author
Forward
0 new messages