Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345103 - dev-lang/llvm-lua new package
Summary: dev-lang/llvm-lua new package
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: https://github.com/neopallium/llvm-lua
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2010-11-11 13:52 UTC by Oleg Popov
Modified: 2016-07-03 07:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-lang/llvm-lua-1.3.1 (llvm-lua-1.3.1.ebuild,893 bytes, text/plain)
2010-11-11 13:53 UTC, Oleg Popov
Details
Patch to get rid of "no-jit" libraries when USE-flag "nojit" is disabled (1.3.1-no-no-jit.patch,1.44 KB, text/plain)
2010-11-11 13:55 UTC, Oleg Popov
Details
removed use-flag "nojit" (llvm-lua-1.3.1.ebuild,754 bytes, text/plain)
2011-01-02 04:19 UTC, Oleg Popov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Popov 2010-11-11 13:52:10 UTC
llvm-lua is a JIT and static Lua compiler that uses LLVM as the compiler backend.
Replacement for dev-lang/lua can also be built (with USE=nojit)

Reproducible: Always

Steps to Reproduce:
Comment 1 Oleg Popov 2010-11-11 13:53:34 UTC
Created attachment 253993 [details]
dev-lang/llvm-lua-1.3.1
Comment 2 Oleg Popov 2010-11-11 13:55:15 UTC
Created attachment 253995 [details]
Patch to get rid of "no-jit" libraries when USE-flag "nojit" is disabled
Comment 3 Jory A. Pratt gentoo-dev 2011-01-01 20:07:57 UTC
(In reply to comment #1)
> Created an attachment (id=253993) [details]
> dev-lang/llvm-lua-1.3.1
> 

It is bad practice to apply a patch based on useflag.
Comment 4 Oleg Popov 2011-01-02 04:11:09 UTC
(In reply to comment #3)
> It is bad practice to apply a patch based on useflag.
> 

Is it because failure to apply patch may be unnoticed by maintainer?

OK, maybe it's good idea to remove those "no-jit" libraries unconditionally.
Comment 5 Oleg Popov 2011-01-02 04:19:09 UTC
Created attachment 258601 [details]
removed use-flag "nojit"
Comment 6 Dennis Schridde 2012-05-31 17:06:43 UTC
DEPEND=">=sys-devel/llvm-$LLVM
		|| (
			>=sys-devel/clang-$LLVM
			>=sys-devel/llvm-gcc-$LLVM
		)"

There is no llvm-gcc in Portage - where do you have that from? Also the website says: "Clang or llvm-gcc 4.2.x from LLVM 2.8 release." So I assume the version should be 4.2 and not 2.8?

Further I suggest renaming the LLVM variable to LLVM_VERSION and putting it right at the top - even before MY_PN.
Comment 7 Dennis Schridde 2012-05-31 17:07:43 UTC
(In reply to comment #6)
> DEPEND=">=sys-devel/llvm-$LLVM"
P.S: There was llvm-3.1 released in the meantime - does llvm-lua still work with that?
Comment 8 Oleg Popov 2012-05-31 18:24:01 UTC
(In reply to comment #6)
> There is no llvm-gcc in Portage - where do you have that from?

It was there until December 2011.

> Also the
> website says: "Clang or llvm-gcc 4.2.x from LLVM 2.8 release." So I assume
> the version should be 4.2 and not 2.8?

In-tree versions were equal to those of LLVM.

> Further I suggest renaming the LLVM variable to LLVM_VERSION and putting it
> right at the top - even before MY_PN.

Do it if you are interested. I personally found llvm-lua to be inferior to luajit-2 (unless a script calls each cpu-hungry function only once, which is not my case).

There are other problems with this ebuild that you might want to fix. First, it installs to /usr/local instead of /usr. Second, a patch that gets rid of conflicts with vanilla lua is very rough. You might want to rewrite it. For example, the patch seems to make it impossible to build a script into static binary. It may be a bug in llvm-lua itself, though. Third, development of llvm-lua seems to be stopped, and I don't know if it supports newer LLVM.
Comment 9 Dennis Schridde 2012-05-31 19:09:24 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > Further I suggest renaming the LLVM variable to LLVM_VERSION and putting it
> > right at the top - even before MY_PN.
> 
> Do it if you are interested. I personally found llvm-lua to be inferior to
> luajit-2 (unless a script calls each cpu-hungry function only once, which is
> not my case).
I have tested neither in practice yet. But thanks for that info!

> There are other problems with this ebuild that you might want to fix. First,
> it installs to /usr/local instead of /usr.
Will fix that. Thanks for the hint!

> Second, a patch that gets rid of
> conflicts with vanilla lua is very rough. You might want to rewrite it. For
> example, the patch seems to make it impossible to build a script into static
> binary. It may be a bug in llvm-lua itself, though.
That is the nojit patch? [1] is a try to improve it.

> Third, development of
> llvm-lua seems to be stopped, and I don't know if it supports newer LLVM.
It does not. 1.3.1 supports 2.8, current master supports 2.9 (but not 2.8) and 3.0/3.1 are not supported at all.

[1] http://code.google.com/p/llvm-lua/issues/detail?id=15
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-07-03 07:24:15 UTC
Looks like this is dead upstream. Last commit 2012, around LLVM 3.0. I'm pretty sure it won't work with modern LLVM versions.