Hello,

First, I'm using the Microsoft Compiler toolchain, which probably makes a
significant difference. Telling is that after the build completes, I have
both a lua51.dll (400k) and a lua5.1.lib (25k), indicating that anything
compiled against the .lib is really linking against the .dll.

I actually build a bit of an environment up, so I've gone a little retro
and wrote a batch file to manage the process, and this (for me) builds
LuaJIT in a useful way that allows me to use it with LuaRocks (along with
building IUP and it's assoc dependencies, which is why it's a little
convoluted):

set LUA51=../../luajit

cd c:\
mkdir build
cd build

set BASE=%CD%
set LUAJIT_BASE=%BASE%\luajit

REM
REM create output dirs
REM
mkdir luajit
mkdir luajit\include
mkdir luajit\lib
mkdir luajit\lib\dll9_64
mkdir luajit\lua

REM checkout LuaJIT into a directory...
REM svn co http://...  luajitsrc

REM
REM Build LuaJIT
REM
mkdir luajit\lua\jit

cd %BASE%\luajitsrc\src
CALL msvcbuild.bat

copy luajit.exe ..\..\luajit
copy lua51.dll  ..\..\luajit

copy lua51.lib ..\..\luajit\lib\dll9_64\lua5.1.lib
copy lua*.h    ..\..\luajit\include
copy lauxlib.h ..\..\luajit\include

cd ..

copy lib\*.lua ..\luajit\lua\jit

cd ..

REM .. do other things now ..

Now, to install Luarocks, I run the installer something like this:

luarocks\install.bat  /P c:\rocks /CONFIG c:\rocks /TREE c:\rocks /LUA
c:\build\luajit /INC c:\build\luajit\include /LIB
c:\build\luajit\lib\dll9_64 /BIN c:\build\luajit


HTH,

DMK


On Fri, Feb 24, 2012 at 6:14 PM, Oisín <[email protected]> wrote:

>
>
> On 24 February 2012 21:38, Daniel Klein 
> <[email protected]>wrote:
>
>> Hello,
>>
>> Tricky -- depends on how you build LuaJIT, and what luarocks needs the
>> LIBDIR for.
>>
>> My limited understanding is that for linking purposes the lib is
>> necessary (and it's the same), so I'm not sure the search needs to
>> encompass the DLL?
>>
>>
> Hmm, ok. So Luarocks needs a static Lua library then? By default, building
> Luajit from source in Windows only creates the dynamic library (lua51.dll).
>
> To have it create the static library requires changing an option in
> src/Makefile, which contains the comments:
>
>   # Mixed mode is not supported on Windows. And static mode doesn't work
> well.
>   # C modules cannot be loaded, because they bind to lua51.dll.
>
> I'm not sure what to think of that... but as it stands, the Luarocks
> installer fails because it only looks for lua5.1.lib - maybe it was done
> with MSVC in mind. I just ran mingw32-make again, this time with static
> mode set in the Makefile, which created libluajit.a - presumably following
> the Unix naming scheme because I'm using MinGW rather than MSVC.
>
> So I renamed the newly-built static library and copied it to the Luajit
> dir, but now Luarocks fails, telling me "lua.5.1.dll" is missing.
>
> Going by those comments in the Makefile (and my comedic failure trying to
> do it statically) I'm getting the feeling that the DLL is the 'right' way
> to use Luajit (at least with MinGW - if anyone has MSVC and wants to
> report, that'd be good).
> Daniel, could you give me a step-by-step explanation of how you built
> Luajit and got it to work out-of-the-box with Luarocks on Windows?
>
> thanks,
> Oisín
>
>
>> Cheers,
>>
>> D
>>
>>
>>
>>
>> On Fri, Feb 24, 2012 at 2:52 PM, Oisín <[email protected]> wrote:
>>
>>>
>>>
>>> On 22 February 2012 19:20, Hisham <[email protected]> wrote:
>>>
>>>> Hello,
>>>>
>>>> Here's another preview release of LuaRocks 2.0.8, which is mostly a
>>>> bugfix release.
>>>> This is a release candidate: if no problems are reported, these
>>>> packages will be
>>>> renamed into the final versions.
>>>>
>>>> http://luarocks.org/releases/luarocks-2.0.8-rc2.tar.gz
>>>> http://luarocks.org/releases/luarocks-2.0.8-rc2-win32.zip
>>>>
>>>> What's new since 2.0.8-rc1:
>>>>
>>>> * Fixes for Windows .bat installer
>>>> * Improved arch detection when packing binary rocks
>>>>
>>>
>>> Hi all,
>>>
>>> We probably need a patch like the following to detect/accept the
>>> differently-named Luajit library in Windows (lua51.dll, rather than
>>> lua.5.1.lib). It seems to work on my Vista and Win7 machines, but it might
>>> break something (Hisham suggested that the library might be checked
>>> elsewhere, not just in the install script). Comments?
>>>
>>> Oisín
>>>
>>>
>>>> What's new since 2.0.7.1:
>>>>
>>>> * Workaround LuaPosix 5.1.15 problem with chmod()
>>>> * Proper error messages when config files are invalid
>>>> * Avoid checking permissions when it's not necessary
>>>> * Fix behavior of 'builtin' rocks which install init.lua scripts
>>>> * git+file:// pseudoprotocol for local Git repos
>>>> * New binaries from GnuWin32 shipped in Win32 zip
>>>> * Nicer-looking help
>>>>
>>>> (As usual, see the GitHub logs for detailed history)
>>>>
>>>> Thanks to everyone who contributed! Once again, any kind of feedback
>>>> for this release
>>>> candidate is appreciated.
>>>>
>>>> -- Hisham
>>>> http://hisham.hm/
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Virtualization & Cloud Management Using Capacity Planning
>>>> Cloud computing makes use of virtualization - but cloud computing
>>>> also focuses on allowing computing to be delivered as a service.
>>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>>> _______________________________________________
>>>> Luarocks-developers mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/luarocks-developers
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Virtualization & Cloud Management Using Capacity Planning
>>> Cloud computing makes use of virtualization - but cloud computing
>>> also focuses on allowing computing to be delivered as a service.
>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>>> _______________________________________________
>>> Luarocks-developers mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/luarocks-developers
>>>
>>>
>> NOTICE OF CONFIDENTIAL AND PRIVILEGED INFORMATION
>>
>> This e-mail message, including any attachments, may contain information that 
>> is
>> confidential, privileged, subject to copyright, or exempt from disclosure.  
>> Any
>> unauthorized distribution, disclosure, copying, review, retransmission or 
>> other use
>> of or reliance on this information may be unlawful and is strictly 
>> prohibited.  You
>> may contact us at: [email protected]
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> Luarocks-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/luarocks-developers
>>
>>
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Luarocks-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luarocks-developers
>
>

NOTICE OF CONFIDENTIAL AND PRIVILEGED INFORMATION

This e-mail message, including any attachments, may contain information that is 
confidential, privileged, subject to copyright, or exempt from disclosure.  Any 
unauthorized distribution, disclosure, copying, review, retransmission or other 
use 
of or reliance on this information may be unlawful and is strictly prohibited.  
You 
may contact us at: [email protected]

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to