COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > NINJAM Discussion > NINJAM User Discussion

Reply
 
Thread Tools Display Modes
Old 11-28-2018, 01:48 PM   #1
Alkamist
Human being with feelings
 
Join Date: Dec 2011
Posts: 458
Default Compiling the server program on Windows?

Hey there!

I've been trying to figure out how to compile the Ninjam server program to host a server on Windows 10. I downloaded the source code and I'm kind of lost. I'm not very experienced with this sort of thing so I don't know what to do.

I see there are some old VC++ 6 project files, am I supposed to get VC++ 6 to compile it? What would be the easiest way for me to compile the server program?

If anyone could give some instructions for a dummy that would be great! I'm on Windows 10 64 bit.
Alkamist is offline   Reply With Quote
Old 03-12-2019, 09:31 PM   #2
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 86
Default

bump. same question. how to compile the sources on Win10 64bit. current visual studio 2017 & compiler has issues. anybody?
brummbear is offline   Reply With Quote
Old 03-13-2019, 04:42 PM   #3
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 86
Default

OK, so it finally compiled after:
* Adding individual component "Windows Universal CRT SDK" to VS 2017
* Manually adding a #define strcasecmp stricmp
* Excluding non existing cpp files from old 2006 project file (projectmode.cpp and historyfile.cpp)
* Deleting incompatible command line compiler options

The server runs but the user authentication does not work. Seems there is something wrong with SHA implementation on 64bit systems

What now?

Last edited by brummbear; 03-13-2019 at 08:30 PM.
brummbear is offline   Reply With Quote
Old 03-13-2019, 05:44 PM   #4
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 531
Default

Hi brummbear,
maybe try to check these threads:

https://forum.cockos.com/showthread.php?t=62063
https://forum.cockos.com/showthread.php?t=17757
akademie is offline   Reply With Quote
Old 03-13-2019, 08:44 PM   #5
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 86
Default

Hi akademie,

Thank you for these hints! I checked the SHA fix for 64bit but it turns out the fix was indeed already merged by Justin into the latest sources for 0.071. Hence, this is apparently not the culprit.

I am getting kicked out immediately, both as a user with password and also as an anonymous. In fact it looks like the server does not even parse the user name at all. Here is the output from the server regardless how I try to login:

: Incoming connection from 127.0.0.1!
127.0.0.1: disconnected (username:'', code=1)

Thus I am wondering if this could have anything to do with string/char functions that do not compile properly? The compiler gives warnings about the older POSIX string functions not being the best choice in current windows, but it still compiles without errors.

The cfg file gets processed properly by the server, all settings like port bpm etc work. If I only could connect to this thing!
Do you have any other ideas?
brummbear is offline   Reply With Quote
Old 03-13-2019, 09:06 PM   #6
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 531
Default

I am not a programmer, so I cannot help with it more I think :-/
I did compile linux server for me year or two ago and I faced this problem because of 64-bit system. Anonymous login was OK, but I needed personal access and it was not working. So that's why I found those threads and made changes.
Maybe, also check if your CFG files are right in access policy.. anonymous = yes, etc...
akademie is offline   Reply With Quote
Old 03-14-2019, 12:39 AM   #7
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 86
Default

I'm not a programmer either... have not coded in c++ in 20years. The cfg is ok.
The problem is somewhere in the initial phase when the connection gets established between server and client, could be even before the username gets evaluated. Hence I tried a newer WDL/jnetlib but still no luck. Also with the entire current version of WDL no luck.

I also tried with Windows specific function names for the POSIX functions that created warnings (which should not be an issue anyway). Compiles without errors, no warnings. Still no connection possible.

It probably requires deeper debugging with breakpoints to get to the bottom of this - arrrgggh.
brummbear is offline   Reply With Quote
Old 03-14-2019, 12:59 AM   #8
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 86
Default

UPDATE: In desperation I downloaded the OLD Ninjam sources from Bill Auger's github (i.e. V0.06 and not the updated V0.071 from Justin's github).

https://github.com/downloads/bill-au...erver_0.06.zip


Ironically, the old sources compile without any issue immediately in VS2017 on my Win 10 64bit machine! Connections no problem, simply working.

How????
brummbear is offline   Reply With Quote
Old 03-14-2019, 06:40 AM   #9
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,723
Default

Looks like NINJAM uses WDL JNetLib. The JNetLib client is broken when building with VS2017+. A commit from 2014 prevents constants used by the JNetLib client from being set to expected values if they already defined–which they are since VS2017. Try applying this patch to latest WDL: https://github.com/cfillion/WDL/comm...b4e4465e.patch.
cfillion is online now   Reply With Quote
Old 03-14-2019, 04:18 PM   #10
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 86
Default

MERCI, merci!! I keep being amazed by the helpfulness of this community!

It was indeed the WDL/JNetlib issue which killed the show. With your fix and the added #define strcasecmp stricmp in usercon.cpp of the Ninjam Server everything compiled fine in VS2017. Server is running and connections work as expected now.
brummbear is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.