Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

libpq - Causes segfault when used from luasql-postgresql #106

Closed
drahosp opened this issue Oct 5, 2012 · 8 comments
Closed

libpq - Causes segfault when used from luasql-postgresql #106

drahosp opened this issue Oct 5, 2012 · 8 comments
Assignees

Comments

@drahosp
Copy link
Member

drahosp commented Oct 5, 2012

libpq seems to be incorrectly configured and causes segfault on connect as mentioned by Ryan Pusztai on the Lua mailing list. I have confirmed this to be related to libpq, when linked with the postgres library distributed in Ubuntu the package works correctly.

@ghost ghost assigned drahosp Oct 5, 2012
@rjpcomputing
Copy link

You beat me too it. Here is my message:

I am trying to use the LuaSQL Postgres module in Windows 7 32bit from the binary release of batteries-0.9.1. Has anyone successfully used it in this package?

If not I wrote a test that breaks everytime.

local luasql = require( "luasql.postgres" )
local environment = luasql.postgres()
local connection = environment:connect( "my_table", "user", "password", "server" ) -- EXPLODES
print( "A message never seen" )

I can not call connect() at all. I have tested that the MySQL does work.

Any help would be greatly appreciated.

@drahosp
Copy link
Member Author

drahosp commented Oct 6, 2012

I'm looking into it over the weekend. On linux I managed to use the libpq.so provided by the OS package manager which worked without issues. On windows this should also work, if you manage to find a binary libpq.dll (renaming works if the name is not exactly the same) from a different package then it should work until I manage to fix the package.

@drahosp
Copy link
Member Author

drahosp commented Oct 18, 2012

Updated to 9.2.1, new configuration in place. The package now passes simple connect test.

@drahosp drahosp closed this as completed Oct 18, 2012
@rjpcomputing
Copy link

Did you put together another binary .zip for 0.9.2.1? If not can you? I am trying not to have to install a compiler on this machine. (You can tell me no)

@drahosp
Copy link
Member Author

drahosp commented Oct 18, 2012

I will do a new binary release this weekend including an announcement on the l-list.

@drahosp
Copy link
Member Author

drahosp commented Oct 23, 2012

@rjpcomputing a minimal Windows binary for batteries 0.9.7 is now available (full installation sans documentation, examples and tests). It now includes libpq-9.2.1. I will announce it on the list once I generate the linux binaries and full windows version (that includes documentation,examples, etc)

@rjpcomputing
Copy link

@drahosp I tested the minimal and it works great for Postgres. Thanks and I feel like this package is about ready to because the next Lua for Windows. I was wondering how to get modules updated. As an example Penlight is old in the batteries package.

@drahosp
Copy link
Member Author

drahosp commented Oct 24, 2012

@rjpcomputing clone the repo, update the files involved and write a CMakeLists.txt (or modify the existing one). More on this is on the wiki. More specifically for pure Lua modules the CMake files are rather trivial. After that its best to submit a pull request, if need be more active maintainers can get direct access for convenience.

However some more complex packages may require much more effort (eg. lua preprocessing as in metalua), for these its best to submit an issue with "Update Request" tag and I will look into it, luckily these are rather rare. I will try to update the instructions for maintainers with a step by step process once I update the homepage.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants