LuaJIT

BlindBanana
Member
 
Posts: 23
Joined: Sun Mar 17, 2013 13:33

by BlindBanana » Thu Mar 21, 2013 11:03

Traxie21 wrote:[...]I have two linux computers, one of which can probably run MT, but neither can connect to the internet. So I cant install the needed libraries for MT. (No friggin idea why, they were second hand, I bought them that way)


Just compile it on the on computer with internet and copy it to the other one.
 

BlindBanana
Member
 
Posts: 23
Joined: Sun Mar 17, 2013 13:33

by BlindBanana » Thu Mar 21, 2013 11:26

prestidigitator wrote:
BlindBanana wrote:Every system shares libraries, this has nothing to do with static or dynamic linking!

Actually it has everything to do with static and dynamic linking. What you might be getting confused with is run-time loading of dynamic libraries, where the application requests a library that was not specified at compile/link time. This is incredibly useful for plugin frameworks. It must be used with care, because you want to make absolutely sure nothing can be loaded that was not intended by the application design, but it is still invaluable.


Dynamic linking loads libs on run-time, yes. Static linking includes not the whole lib, just the pieces that are actually used.
So dynamic linking as well as static linking share libs. This has nothing to do with the problems of dynamic linking.

prestidigitator wrote:Ironically you are using a game that essentially uses unchecked, completely open run-time loading of dynamic libraries for just about everything, so arguing that it is a bad thing is a little hypocritical. Every mod we use is a library loaded at run-time. Nevermind that it is written in Lua and not C/C++.


So just because I don't like dynamic linking I'm not allowd to use software wich is dynamic linked? I don't think so.
And I would not link the included lua lib of mintest dynamic, since on (at least) some systems there will be an incompatible version.
And the execution of arbitrary code is one of the problems of dynamic linking.

prestidigitator wrote:
BlindBanana wrote:When a library is statically linked to an executable only a copy of each library routine called is included.
Which btw makes deployment a lot easier.

This is where I think you are getting very confused between shared libraries and run-time loading. If the library is a shared library, your statement is false. The WHOLE shared library is absolutely loaded into memory. Period. However, the code and read-only data portions of the library can be shared between running processes (and not just ones started from the same parent process that happened to use the library; I mean ALL applications on the system that use the shared library).


Which also happens if binaries are static linked. At least the text segments are only once in memory.

prestidigitator wrote:I also disagree that statically linking using an archive library helps with deployment. If you deploy by simply providing a downloadable folder and don't want to bother thinking about library paths or launch scripts or anything, you might be right. However, anyone who has any experience deploying real applications or maintaining packages can just as easily package a shared library with an application, whether the application is installed or run in place from a download folder. You can even package a shared library with the application and manage the application execution in such a way that it is used only if the library is not already included on the system. This is whether you dynamically load the library at run-time or link to it at compile time.


Why sould I package for half a dozen different Systems with different package solutions/formats if I could just copy my static linked binary and be happy spending the saved time playing Minetest?

I don't think the debate dynamic vs static linking ends. But it's a pleasure. ;-)

Can wep lease come back to the topic Minetest with LuaJIT integrated?
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Thu Mar 21, 2013 12:00

Girls, Girls, you're both pretty, can we get back on topic now?

Compile and link how you think best.
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Thu Mar 21, 2013 12:02

BlindBanana wrote:
Traxie21 wrote:[...]I have two linux computers, one of which can probably run MT, but neither can connect to the internet. So I cant install the needed libraries for MT. (No friggin idea why, they were second hand, I bought them that way)


Just compile it on the on computer with internet and copy it to the other one.

My computer with internet is my office computer, and its Windows XP. I'm not supposed to change it, as I don't own it.
 

BlindBanana
Member
 
Posts: 23
Joined: Sun Mar 17, 2013 13:33

by BlindBanana » Thu Mar 21, 2013 22:04

To build Minetest with luajit just run cmake with
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-DLUAJIT=1

https://github.com/minetest/minetest/pull/558
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Fri Mar 22, 2013 13:30

BlindBanana wrote:To build Minetest with luajit just run cmake with
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-DLUAJIT=1

https://github.com/minetest/minetest/pull/558


I merged the pull request into my own fork, and the build fails with LuaJIT(but not with vanilla Lua using -DLUAJIT=0) with:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- Build files have been written to: /home/rarkenin/build/minetest/rarkenin-minetest-f1f9aa9/build
[  0%] [  1%] Built target jsoncpp
Original luajit makefile target
make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
make[3]: *** No targets specified and no makefile found.  Stop.
make[2]: *** [src/CMakeFiles/build_luajit] Error 2
make[1]: *** [src/CMakeFiles/build_luajit.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  3%] Built target jthread
make: *** [all] Error 2


Edit: Forgot to mention I am doing a Win32 build for a friend, using the buildbot that is included.
Last edited by rarkenin on Fri Mar 22, 2013 13:37, edited 1 time in total.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

BlindBanana
Member
 
Posts: 23
Joined: Sun Mar 17, 2013 13:33

by BlindBanana » Fri Mar 22, 2013 13:59

rarkenin wrote:[...]Edit: Forgot to mention I am doing a Win32 build for a friend, using the buildbot that is included.


Please try to build without buildbot and see if the error still occures.
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Fri Mar 22, 2013 14:38

BlindBanana wrote:
rarkenin wrote:[...]Edit: Forgot to mention I am doing a Win32 build for a friend, using the buildbot that is included.


Please try to build without buildbot and see if the error still occures.


Win32 builds without buildbot fail to build at all.

I've tried hand-specifying MingW and running Cmake, but the results are even worse. It hardly makes it into LuaJIT.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sat Mar 23, 2013 20:06

Windows Build: http://sfan5.dyndns.org/minetest-0.4.5-2318d19-luajit-win32.tar.xz
No guarantees about download speed or if the download link works
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Sat Mar 23, 2013 22:02

This is way faster
If you can think it, you can make it.
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Sat Mar 23, 2013 22:13

sfan5 wrote:Windows Build: http://sfan5.dyndns.org/minetest-0.4.5-2318d19-luajit-win32.tar.xz
No guarantees about download speed or if the download link works


Can you explain what buildbot changes need to take place for this?
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

User avatar
Tedypig
Member
 
Posts: 284
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear

by Tedypig » Tue Mar 26, 2013 20:44

This is way faster than the release on the main site.
01010100 01100101 01100100 01111001 01110000 01101001 01100111
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Mar 26, 2013 21:03

I do try to stay on top of things :-)
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Tedypig
Member
 
Posts: 284
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear

by Tedypig » Tue Mar 26, 2013 21:14

Why doesn't minetestserver.exe work? Windows 7.

EDIT: Never-mind, apparently if you have more than one world you can't use it...
Last edited by Tedypig on Tue Mar 26, 2013 22:37, edited 1 time in total.
01010100 01100101 01100100 01111001 01110000 01101001 01100111
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

by stu » Tue Mar 26, 2013 22:33

VanessaE wrote:New build for Ubuntu Precise AMD64, this time with common actually being included :-)


Could you tell me how you did that? For some reason checkinstall is not including the common, build & survival dirs in the .deb (btw: I have been using the bash script you posted over the page)

If I can fix this I will upload a 32bit build for Ubuntu Precise i386.

Cheers!
Last edited by stu on Tue Mar 26, 2013 22:37, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Mar 28, 2013 04:15

stu: The full version of my script (not shown previously) copies minetest_game and common into the games folder within the minetest source tree before running checkinstall. Somehow it seems to just work. :-)

Here is the latest version of the script, in its entirety:

http://pastebin.ubuntu.com/5654234/

As you can see, there are things in this script that are specific to my machine and server setup, but you can surely tweak this to work for you also. The bits that update my website and update my server's "game" of course won't apply to you.

Note that my builds don't include the survival and build games, just the basic stuff.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Zedm0n
Member
 
Posts: 18
Joined: Sun Mar 24, 2013 14:48

by Zedm0n » Thu Mar 28, 2013 10:57

VanessaE, could you post a compressed tarball as well as a .deb? I am using Funtoo Linux and honestly I am not a huge fan of Debian and it's children. I am sure there are others out there that feel the same.


Zedm0n
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Mar 28, 2013 19:44

Sure, I can try; alien's Slackware output seems suitable. Note that I can't test the results, so I'll leave it to you to tell me if it works.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Zedm0n
Member
 
Posts: 18
Joined: Sun Mar 24, 2013 14:48

by Zedm0n » Thu Mar 28, 2013 20:22

You rock, girl!

Downloading and testing now.

EDIT 1: Looks like I'll have to manially chase down a few libs because I have newer version. It shouldn't be a huge issue though.

EDIT 2: A quick "emerge =media-libs/libpng-1.2.50" later and it's running. Now I just need to move my mods to whereever they go now.

EDIT3: CPU usage (via top) has gone up on average from 125% to 175-200% and the load has increased from about 1.5 to about 2.25. This just fine since I have a quad core i5. Reserved memory usage has gone up from about 650MB to just over 1GB but the virtual memory is stable at 1.5GB. Also, my frame rate is the same. Over all the "Canyons" mod I am testing today is running MUCH faster. I can no longer catch up to the falling blocks it generates.


Zedm0n
Last edited by Zedm0n on Thu Mar 28, 2013 21:05, edited 1 time in total.
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

by stu » Thu Mar 28, 2013 22:09

VanessaE wrote:stu: The full version of my script (not shown previously) copies minetest_game and common into the games folder within the minetest source tree before running checkinstall. Somehow it seems to just work. :-)

Here is the latest version of the script, in its entirety:

http://pastebin.ubuntu.com/5654234/

As you can see, there are things in this script that are specific to my machine and server setup, but you can surely tweak this to work for you also. The bits that update my website and update my server's "game" of course won't apply to you.

Note that my builds don't include the survival and build games, just the basic stuff.


Thank you for replying and sharing this Vanessa, it's a really useful script, however, I am still not getting all the dirs from /games included in the .deb. All I get under games now is /minimal (which kinda stands to reason really)
Perhaps dh_make would be better than checkinstall but it's a long time since I used it.

I am able to use this myself as I can just copy the dirs manually, from what I am finding is that my 'normal' frame-rate is relatively unchanged (maybe a fraction better) the BIG difference is that it drops very little when I use full viewing range with fast move/fly.

Thank you again for your help.
Last edited by stu on Thu Mar 28, 2013 22:12, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Mar 29, 2013 01:30

In my last build, I checked right after uploading that in fact the common and minetest_game folders are included where they belong and are complete.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Fri Mar 29, 2013 12:11

soo, why isn't luaJIT in the main game yet?
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Fri Mar 29, 2013 12:32

Traxie21 wrote:soo, why isn't luaJIT in the main game yet?


It causes bugs with some mods (mostly serialization?).
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Mar 29, 2013 17:51

Calinou: actually, it doesn't cause any errors, it just exposes a minor bug in serialize.lua (sp) that gets missed by vanilla Lua, namely those invalid escape characters. My build script strips those out.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Tue Apr 02, 2013 19:38

Calinou wrote:
Traxie21 wrote:soo, why isn't luaJIT in the main game yet?


It causes bugs with some mods (mostly serialization?).

funny thing, this has never stopped changes to the main game before? (things have been broken many times)
[h]Zen S.D.[/h] The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno
 

User avatar
Tedypig
Member
 
Posts: 284
Joined: Tue Mar 05, 2013 12:33
IRC: Piggybear87
In-game: Piggybear

by Tedypig » Fri Apr 05, 2013 21:06

I thought we were getting LuaJIT in 0.4.6?
01010100 01100101 01100100 01111001 01110000 01101001 01100111
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Apr 05, 2013 22:35

Nope, it isn't in 0.4.6 by default, but maybe some time during the 0.4.7 cycle.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Apr 08, 2013 21:40

LuaJIT support has been merged into Minetest upstream, so now most future builds of Minetest will be able to support LuaJIT if it is installed on the user's system.

See these forum threads:

PilzAdam's Win32 builds: http://forum.minetest.net/viewtopic.php?id=4547
My Linux AMD64 builds: http://forum.minetest.net/viewtopic.php?id=5515
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Mon Apr 08, 2013 22:22

I downloaded and installed LuaJIT for my Lubuntu 12.10 following the instructions here:

http://luajit.org/

During cmake I saw the message found LuaJIT.

Edit: installed LuaJIT and then the latest minetest.
Last edited by Topywo on Mon Apr 08, 2013 22:22, edited 1 time in total.
 

User avatar
Jonathan
Member
 
Posts: 119
Joined: Tue Apr 02, 2013 14:07

by Jonathan » Fri Apr 19, 2013 17:58

VanessaE wrote:LuaJIT support has been merged into Minetest upstream, so now most future builds of Minetest will be able to support LuaJIT if it is installed on the user's system.

See these forum threads:

PilzAdam's Win32 builds: http://forum.minetest.net/viewtopic.php?id=4547
My Linux AMD64 builds: http://forum.minetest.net/viewtopic.php?id=5515


Sorry to bother you again VanessaE, but how do you exactly install LuaJIT to where Minetest uses it?

All my attempts have failed (Then again, this is something that I'm learning as I go :P).

Version of Minetest I was using: "minetest-0.4.6-1f42479-bugfixes-win32"
Operating System: "32 bit Windows 7 Professional"

I thought all I had to do was download LuaJIT-2.0.1, and build it for a 32 bit OS (I used Windows SDK 7.1). After that copy luajit.exe and lua51.dll to a new folder (LuaJIT), in the LuaJIT folder create a "lua" folder with a "jit" folder in it. Copy the lua files from the download source "jit" folder to the newly created "LuaJIT\lua\jit" folder, and copy the path that the LuaJIT.exe is in (C:\Program Files\LuaJIT), and append to the PATH system variable string (...;C:\Program Files\LuaJIT)

guess not... Sorry for the large post, just wish I knew what I was doing wrong.
By perseverance the snail reached the ark.
- Charles Spurgeon
 

PreviousNext

Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 6 guests