Hi Alex

        The message says that the module 'rocks.luasql.postgres'
could not be found, which seems an installation problem.  Note that
luasql-postgres should install a module called 'luasql.postgres', thus
it seems strange to me the prefix 'rocks'.  Anyway, could you find a
file called postgres.dll (I am assuming you are on a Windows machine,
don't you?) and post here the complete path?

        Regards,
                Tomás Guisasola

On Thu, 16 Oct 2014, alexandre.bertr...@tudor.lu wrote:

Hi,
well, I have to come back to you once more... luasql-postgres got
installed, but when trying to run some example, require fails. I've been
looking for a postgres.lua file, but apart one in the "example" folder, I
couldn't find any (using this file also gives an error, but I don't think
that file might be relevant). I've searched for a solution, but couldn't
make one out fitting my case.
So, here again your input would be more than welcome ;¬). Cheers,
Alex
Here's the message from the initial require failure:
Program starting as '"C:\Program Files\Osmose\Zerobrane\bin\lua.exe" -e
"io.stdout:setvbuf('no')"
"J:\PRG\CIP-ECOTEC\Projects\OptiHeat\3-Production\2_Optimisation\Osmose\osmose\MyWork\Postgresql1.lua"'.
Program 'lua.exe' started in
'J:\PRG\CIP-ECOTEC\Projects\OptiHeat\3-Production\2_Optimisation\Osmose\osmose'
(pid: 8648).
C:\Program Files\Osmose\Zerobrane\bin\lua.exe:
...tion\2_Optimisation\Osmose\osmose\MyWork\Postgresql1.lua:6: module
'rocks.luasql.postgres' not found:
       no field package.preload['rocks.luasql.postgres']
       no file 'lualibs/rocks\luasql\postgres.lua'
       no file 'lualibs/rocks\luasql\postgres/rocks\luasql\postgres.lua'
       no file 'lualibs/rocks\luasql\postgres/init.lua'
       no file
'lualibs/rocks\luasql\postgres/rocks\luasql\postgres/rocks\luasql\postgres.lua'
       no file
'lualibs/rocks\luasql\postgres/rocks\luasql\postgres/init.lua'
       no file '.\rocks\luasql\postgres.lua'
       no file 'C:\Program
Files\Osmose\Zerobrane\lua\rocks\luasql\postgres.lua'
       no file 'C:\Program
Files\Osmose\Zerobrane\lua\rocks\luasql\postgres\init.lua'
       no file '.\rocks\luasql\postgres.lua'
       no file 'C:\Program
Files\Osmose\Zerobrane\bin\lua\rocks\luasql\postgres.lua'
       no file 'C:\Program
Files\Osmose\Zerobrane\bin\lua\rocks\luasql\postgres\init.lua'
       no file './rocks\luasql\postgres.lua'
       no file './rocks\luasql\postgres/init.lua'
       no file './lua/rocks\luasql\postgres.lua'
       no file './lua/rocks\luasql\postgres/init.lua'
       no file 'C:\Program
Files\Osmose\Zerobrane\lualibs/rocks\luasql\postgres/rocks\luasql\postgres.lua'
       no file 'C:\Program
Files\Osmose\Zerobrane\lualibs/rocks\luasql\postgres.lua'
       no file 'C:\Program
Files\Osmose\Lua\5.1/rocks\luasql\postgres.lua'
       no file 'C:\Program
Files\Osmose\Lua\5.1/rocks\luasql\postgres/init.lua'
       no file 'C:\Program
Files\Osmose\Lua\5.1/lua/rocks\luasql\postgres.lua'
       no file 'C:\Program
Files\Osmose\Lua\5.1/lua/rocks\luasql\postgres/init.lua'
       no file 'bin/rocks\luasql\postgres.dll'
       no file 'bin/clibs/rocks\luasql\postgres.dll'
       no file '.\rocks\luasql\postgres.dll'
       no file 'C:\Program
Files\Osmose\Zerobrane\rocks\luasql\postgres.dll'
       no file 'C:\Program Files\Osmose\Zerobrane\loadall.dll'
       no file 'C:\Program
Files\Osmose\Zerobrane\bin/rocks\luasql\postgres.dll'
       no file 'C:\Program
Files\Osmose\Zerobrane\bin/clibs/rocks\luasql\postgres.dll'
       no file 'C:\Program
Files\Osmose\Lua\5.1/rocks\luasql\postgres.dll'
       no file 'C:\Program
Files\Osmose\Lua\5.1/rocks\luasql\postgres51.dll'
       no file 'C:\Program
Files\Osmose\Lua\5.1/clibs/rocks\luasql\postgres.dll'
       no file 'C:\Program
Files\Osmose\Lua\5.1/clibs/rocks\luasql\postgres51.dll'
       no file 'bin/rocks.dll'
       no file 'bin/clibs/rocks.dll'
       no file '.\rocks.dll'
       no file 'C:\Program Files\Osmose\Zerobrane\rocks.dll'
       no file 'C:\Program Files\Osmose\Zerobrane\loadall.dll'
       no file 'C:\Program Files\Osmose\Zerobrane\bin/rocks.dll'
       no file 'C:\Program Files\Osmose\Zerobrane\bin/clibs/rocks.dll'
       no file 'C:\Program Files\Osmose\Lua\5.1/rocks.dll'
       no file 'C:\Program Files\Osmose\Lua\5.1/rocks51.dll'
       no file 'C:\Program Files\Osmose\Lua\5.1/clibs/rocks.dll'
       no file 'C:\Program Files\Osmose\Lua\5.1/clibs/rocks51.dll'
stack traceback:
       [C]: in function 'require'
       ...tion\2_Optimisation\Osmose\osmose\MyWork\Postgresql1.lua:6: in
main chunk
       [C]: at 0x00402a57




From:   Philipp Janda <siffie...@gmx.net>
To:     luarocks-developers@lists.sourceforge.net,
Date:   16/10/2014 14:42
Subject:        Re: [Luarocks-developers] Problem installing
luasql-postgresql



Am 16.10.2014 um 11:36 schröbte
alexandre.bertr...@tudor.lu:
Hi Philipp,

Hi!

thanks for the tip, that was my error. I still encountered 2 problems
(described here:
https://github.com/keplerproject/luafilesystem/issues/22
and here http://comments.gmane.org/gmane.comp.lang.lua.luarocks/4299),
which I managed to solve. I was just wondering: to solve the link error
issue, I added in the luarocks config. lua "LUALIB = '/lib/lua5.1.lib'",
without deleting the line "LUALIB = 'lua5.1.dll',". Is this going to
cause
problems, shall I maybe delete the latter?

Visual C can't link to a DLL directly like MinGW can, but instead must
link to an import library (we probably should make sure that it does in
the LuaRocks installation script). Since you can only have one value per
key in a Lua table, you already have overwritten the old `LUALIB` entry,
and you can remove it. (Normally the `/lib/` part should go to
`LUA_LIBDIR` instead of `LUALIB`, but I think the two variables are
always used together anyway.)

The `pq.lib` issue should be fixed in the rockspec (and unless I miss
something should have affected MinGW builds as well).

Anyway, many thanks to the community and especially to Philipp and
Hisham
for the support!
Cheers,
Alex


Philipp




------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers



--
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to