So copied includes and headers to these [-I and -L] directories from /mysql/include and mysql/lib/opt respectively.
Sorted.
(2) Cannot find -lnsl. I presume this is "Name services library, a library of name service calls (getpwnam, getservbyname, etc...) on SVR4 Unixes. GNU libc uses this for the NIS (YP) and NIS+ functions." Should we be linking to this anyway (Vista machine)?
I'm not sure how to run the exe. Whether from a windows command prompt or from within Cygwin.
It didn't like ..../netmud.exe /run and the bat window disappeared before I could read what it said, so I opened up a windows elevated command prompt, cd'ed to /game/ and ran without the /run switch. This was the output:
[06/08 18:49:47] 1.8.3
[06/08 18:49:47] MUSH restarted, PID 5832, at Sun Jun 08 18:49:47 2008
[06/08 18:49:47] Couldn't read all of 'txt/connect.txt'
...
[06/08 18:49:47] Couldn't read all of 'html/connect.html'
...
[06/08 18:49:47] Couldn't open data/indb! Creating minimal world.
[06/08 18:49:47] Reading access.cnf
[06/08 18:49:47] Reading mush.cnf
[06/08 18:49:47] Reading alias.cnf
[06/08 18:49:47] Reading restrict.cnf
...
[06/08 18:49:47] CONFIG: option MASTER_ROOM not a valid room! (as now a minimal db)
[06/08 18:49:47] Seeding OpenSSL random number pool.
[06/08 18:49:47] Seeded after 1 cycle.
Listening on port 8081 using IPv4.
[06/08 18:49:47] 252 file descriptors available.
[06/08 18:49:47] RESTART FINISHED.
setitimer: Invalid argument
...
Looks like it's working. Last site shows the domain name and can connect as god to the local machine, obeying the ip address and domain name check in access.cnf.
OpenSSL
-------
This is working fine now, though the cygwin build seems more prone to "network address already in use" errors, so have to wait until the port is fully closed.
MySQL
-----
This could be broken. See http://dev.pennmush.org/ticket/7586 .
MySQL shows in @config compile; there were no errors in compile.
There are no sql entries in the logs, which makes it difficult to see what's going on.
First time round:
think sql(SELECT 1) returned "No SQL database connection" though I have a working database and user set up in mySQL and mush.cnf.
After that:
this and @sql requests closed down the MUSH without warning.
Also noticed that sometimes (maybe related to these crasehs) the database move from /data/ to save goes wrong and outdb disappears.
I haven't played with PennMUSH since they added mySQL so I can't really help with that side of it. Possibly there is a permissions problem, depending on the configuration of mySQL it might be up but refusing connections from the Mush unless it gives the correct password.
You may get more help from the pennmush.org site, as they would be more familiar with the database aspects. Hmmm - I see from the support ticket you mention you are looking around there. That ticket started 2 months ago.
You could always use an earlier version unless you are desperate to have the latest PennMUSH. The other approach is to fire up gdb. At least if you actually get a crash it usually helps point you to the place to look.
Sorry, could be that this is my problem, trying to link to MySQL library libmysqlclient.a not compiled with Cygwin.
Instructions at
http://cygwin.com/ml/cygwin/2006-01/msg00772.html
suggest getting the MySQL linux source and using configure, make and make install on that.
WIP: Configure is telling me that the compiler can't convert between a long long and a float ... upgrade to egcs 1.0.3 or newer.
I successully followed the simple instructions at:
http://cygwin.com/ml/cygwin/2006-01/msg00772.html to build MySQL from source with Cygwin.
This suggests getting the MySQL linux tar.gz source and using configure, make and make install on that (go make yourself lunch and check back on progress at intervals, or bed down for the night).
Configure told me that the compiler can't convert between a long long and a float ... upgrade to egcs 1.0.3 or newer.
In the hope that I could simply avoid the use of long long to float conversion, in configure I hardwired inac_cv_conv_longlong_to_float=yes before being told: "Your compiler cannot convert a longlong value to a float! If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try again".
The build succeeded. libmysqlclient.a and co. according to my pennmush makefile need to be in /usr/local/lib/mysql/. mysql.h and co. need to be in /usr/local/include/mysql . In case that didn't find them, I copied libmysqlclient.a to my mysql windows binary directory /mysql/lib/opt and made sure mysql.h was in /mysql/include/. Sorry, in the flurry of activity I'm not sure if that was necessary.
Instructions at the mysql site are far more tortuous, use BitKeeper and require care, it says, to produce a stable library not prone to random crashes.
The German site offering cygwin ports of things like the client is not available (fwiw, see http://lists.mysql.com/win32/28 ).
RESULT
---------
@sql twit
SQL: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'twit' at line 1
a wandering dervish has arrived.
@sql update test set name='name1' where id=1
SQL: 1 row affected.
@sql select * from test
Row 1, Field id: 1
Row 1, Field name: name1
Row 2, Field id: 2
Row 2, Field name: name2
Makefile should link to -lmysqlclient, not -lmysql as I previously foolishly stated. That it worked but crashed was a fluke. I don't have libnsl, so I took out -lnsl, not sure if that's right. -lcrypt is needed assuming you have and are using libcrypt.