nwnxee / unified

Binaries available under the Releases tab on Github
https://nwnxee.github.io/unified
GNU General Public License v3.0
131 stars 92 forks source link

PostgreSQL compilation issue #90

Closed ELadner closed 5 years ago

ELadner commented 6 years ago

Something in commit 9f45d71 broke finding the libpq includes and libraries on my system. Not sure where to start but find_packge isn't finding PostgreSQL for some reason.

Liareth commented 6 years ago

@kmsheehan Do you know anything about this?

ELadner commented 6 years ago

On closer inspection, I think it's just a CMake warning or something.

This is printed during the makefile build stage:

-- Found JNI: /usr/lib/jvm/java-9-oracle/lib/libjawt.so  
-- Found Java: /usr/lib/jvm/java-9-oracle/bin/java (found version "9.0.4") 
-- Found Ruby: /home/eladner/.rvm/rubies/ruby-2.4.2/bin/ruby (found version "2.4.2") 
CMake Warning at Plugins/SQL/CMakeLists.txt:11 (message):
  Not compiling with MYSQL support, not found

CMake Warning at Plugins/SQL/CMakeLists.txt:23 (message):
  Not compiling with PostgreSQL support, not found

-- Configuring done
-- Generating done

But during the compile stage, it does correctly build the NWNX_SQL.so binary.

Liareth commented 6 years ago

It can build NWNX_SQL even if it has no targets - it will just throw an exception on startup because it has no targets ...

mtijanic commented 6 years ago

Incidentally, I'm a big fan of SQLite. Is there interest for embedding it in NWNX?

kmsheehan commented 6 years ago

I would think it should be on the list of things to do - if NWNX is enabled for SP / MP and not just PWs it is much easier (no real setup) to run with an embedded DB.

ELadner commented 6 years ago

I like SQLite as well, but it's not a good fit for a multi-user environment like PW servers.

From their website "In contrast to many other database management systems, SQLite is not a client–server database engine. Rather, it is embedded into the end program. SQLite is ACID-compliant and implements most of the SQL standard, using a dynamically and weakly typed SQL syntax that does not guarantee the domain integrity."

ELadner commented 6 years ago

After thinking about it, you could probably do SQLite now, but if you ever move to multi-threaded, you'd probably start to have issues.

mtijanic commented 6 years ago

NWScript is never going to be multithreaded. But when we add async SQL query support, SQLite will be ill equipped to handle it. The big issue with SQLite is that it'll be hard to expose the same database to other services, such as a webserver. But I think that's a very PW specific usecase, and as glowinger says, sqlite would be great for regular MP modules using NWNX.

mtijanic commented 5 years ago

There's nothing to be done here. Incidentally, SQLite support was also recently added as mentioned here. Closing.