[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Building lua wrapper for coolprop
- From: Hisham <h@...>
- Date: Mon, 20 Jun 2016 15:48:09 -0300
On 20 June 2016 at 14:49, Christophe Jorssen <jorssen.leraincy@free.fr> wrote:
> Thanks Hisham!
>
> 2016-06-20 16:25 GMT+02:00 Hisham <h@hisham.hm>:
>> On 20 June 2016 at 06:34, Christophe Jorssen <jorssen.leraincy@free.fr> wrote:
>>> 4) As Hisham recommanded :
>>> git clone git@github.com:ipese/LuaCoolProp.git
>>>
>>> then followed instructions there for linux after editing the Makefile
>>> to make it work for lua5.2
>>>
>>> luarocks --local build luacoolprop-scm-1.rockspec
>>> luarocks --local pack luacoolprop
>>> luarocks install luacoolprop-scm-1.linux-x86_64.rock
>>
>> As a clarification: this command downloads a fresh copy of the source
>> code in a temporary dir. It will not act on your local clone with your
>> edited Makefile. To use the copy of the sources in your current dir
>> you'd use `luarocks make`. But that shouldn't be necessary. There's no
>> need to edit the Makefile; the rockspec sets the correct flags.
>>
>
> Good to know. Thanks.
>
>>> Same error as last year...
>>>
>>> Do you have an idea why it still does not work?
>>
>> I have no idea, but try this: require("coolprop.capi"). This might
>> give you better diagnostics.
>>
>
> Thanks.
>
> christophe@uranium:~$ lua
> Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
>> require("coolprop.capi")
> error loading module 'coolprop.capi' from file
> '/home/christophe/luarocks/lib/lua/5.2/coolprop/capi.so':
> /home/christophe/luarocks/lib/lua/5.2/coolprop/capi.so: undefined
> symbol: get_parameter_information_string
> stack traceback:
> [C]: in ?
> [C]: in function 'require'
> stdin:1: in main chunk
> [C]: in ?
>>
>
> So, the first message was misleading. What else can I do? Some more info below.
>
> christophe@uranium:~/luarocks$ rgrep get_parameter_information_string *
> Fichier binaire lib/lua/5.2/coolprop/capi.so correspondant
> share/lua/5.2/coolprop/ffi.lua:long
> get_parameter_information_string(const char *key, char *Output, int
> n);
> share/lua/5.2/coolprop/ffi.lua:function
> coolprop.get_parameter_information_string(key)
> share/lua/5.2/coolprop/ffi.lua: local value =
> lib.get_parameter_information_string(key, bub, 4096)
> share/lua/5.2/coolprop.lua:function
> coolprop.get_parameter_information_string(key)
> share/lua/5.2/coolprop.lua: local val, err =
> capi.get_parameter_information_string(key)
>
> christophe@uranium:~/git/LuaCoolProp$ rgrep get_parameter_information_string *
> src/capi.cpp:static int
> lua_coolprop_get_parameter_information_string(lua_State *L) {
> src/capi.cpp: {"get_parameter_information",
> lua_coolprop_get_parameter_information_string},
> src/capi.cpp: {"get_parameter_information_string",
> lua_coolprop_get_parameter_information_string},
No idea, sorry. I helped out with packaging of the rockspec back in
the day, but this may be a problem with the upstream module. One last
idea: did you try the versioned rockspec? (5.0.7) Something might be
broken between the rockspec and the latest coolprop repository; the
versioned rockspec points to a revision that was known to work with
the rockspec at some point.
Hope that helps,
-- Hisham