View Full Version : WDL on 64bit Systems
tgehrig
02-05-2008, 02:30 PM
Hi,
I needed the following patch to get the authentication of the ninjam-server working on a 64bit Linux.
--- sha.cpp (Revision 73)
+++ sha.cpp (Arbeitskopie)
@@ -69,7 +69,7 @@
}
-#define SHA_ROTL(X,n) (((X) << (n)) | ((X) >> (32-(n))))
+#define SHA_ROTL(X,n) ((((X)&0xffffffffL) << (n)) | (((X)&0xffffffffL) >> (32-(n))))
#define SHUFFLE() E = D; D = C; C = SHA_ROTL(B, 30); B = A; A = TEMP
void WDL_SHA1::add(const void *data, int datalen)
Justin
02-07-2008, 11:48 AM
Cool, I'll merge in...
-Justin
akademie
03-28-2017, 05:36 AM
Hi Justin,
it seems that updating of the source code for 64bit systems never happened...?
I did install linux ninjam server (64 bit Ubuntu server) few weeks ago and I had the same problem with authenticating until I found this thread and modified the sha.cpp file by myself according to tgehrig's suggestion.
It would be fine to have the downloadable sources updated ;-)
Thanks
akademie
Xenakios
03-28-2017, 05:41 AM
Hi Justin,
it seems that updating of the source code for 64bit systems never happened...?
I did install linux ninjam server (64 bit Ubuntu server) few weeks ago and I had the same problem with authenticating until I found this thread and modified the sha.cpp file by myself according to tgehrig's suggestion.
It would be fine to have the downloadable sources updated ;-)
Thanks
akademie
You must be using some very old WDL source, the change is in the WDL source I've got from the WDL git repo. (Using git is preferable over using source code direct downloads.)
akademie
03-28-2017, 05:52 AM
Hello Xenakios, thank you for reply. I have not much experience with Linux and gits...
When installing ninjam server, from terminal I downloaded sourcecode.gz from cockos site unpacked and make...
How can I incorporate/perform git sync/update of downloaded source code from Terminal before "make", please?
Thank you
akademie
Xenakios
03-28-2017, 06:04 AM
Hello Xenakios, thank you for reply. I have not much experience with Linux and gits...
When installing ninjam server, from terminal I downloaded sourcecode.gz from cockos site unpacked and make...
How can I incorporate/perform git sync/update of downloaded source code from Terminal before "make", please?
Thank you
akademie
Ah, you are using some source code that has the very old WDL included with it? I don't suppose there's anything to be done in that case except manually edit the wrong WDL line.
akademie
03-28-2017, 06:11 AM
I meant if there is a specific command which I could type in linux terminal to get/install (or whatever we can name it) the right WDL from the git (over the unpacked sourcecode from regular download) ?
I apologize for confussion, I am really Windows guy :-) but starting touching the Linux for future (and now for the ninjam server).
akademie
Xenakios
03-28-2017, 06:16 AM
I meant if there is a specific command which I could type in linux terminal to get/install (or whatever we can name it) the right WDL from the git (over the unpacked sourcecode from regular download) ?
I apologize for confussion, I am really Windows guy :-) but starting touching the Linux for future (and now for the ninjam server).
akademie
Git is not going to help you with the ninjam server thing because it doesn't have a git repo Cockos is actively maintaining etc...
Anyway WDL by itself is hosted at Github and can be got with :
git clone https://github.com/justinfrankel/WDL.git
But cloning that isn't going to change what WDL version is used by ninjam server since that comes with its own WDL source code.
akademie
03-28-2017, 06:29 AM
Oh I see, thanks a lot for explanation, Xenakios.
So it may be valid request to update NINJAM-server source code with corrected WDL (for 64bit authentication) by Cockos, then.
akademie
TauTau
05-08-2017, 03:20 AM
I fetched the current WDL version from git, but it doesn't compile with the downloaded ninjam source
g++ -O2 -s -Wall -pthread -c -o ../../WDL/jnetlib/asyncdns.o ../../WDL/jnetlib/asyncdns.cpp
g++ -O2 -s -Wall -pthread -c -o ../../WDL/jnetlib/connection.o ../../WDL/jnetlib/connection.cpp
g++ -O2 -s -Wall -pthread -c -o ../../WDL/jnetlib/listen.o ../../WDL/jnetlib/listen.cpp
g++ -O2 -s -Wall -pthread -c -o ../../WDL/jnetlib/util.o ../../WDL/jnetlib/util.cpp
g++ -O2 -s -Wall -pthread -c -o ../../WDL/jnetlib/httpget.o ../../WDL/jnetlib/httpget.cpp
g++ -O2 -s -Wall -pthread -c -o ../../WDL/rng.o ../../WDL/rng.cpp
g++ -O2 -s -Wall -pthread -c -o ../../WDL/sha.o ../../WDL/sha.cpp
g++ -O2 -s -Wall -pthread -o ninjamsrv ../../WDL/jnetlib/asyncdns.o ../../WDL/jnetlib/connection.o ../../WDL/jnetlib/listen.o ../../WDL/jnetlib/util.o ../../WDL/jnetlib/httpget.o ../../WDL/rng.o ../../WDL/sha.o ../mpb.o ../netmsg.o usercon.o ninjamsrv.o
ninjamsrv.o: In function `onConfigChange(int, char**)':
ninjamsrv.cpp:(.text+0x824): undefined reference to `JNL_Listen::JNL_Listen(short, unsigned long)'
ninjamsrv.o: In function `main':
ninjamsrv.cpp:(.text.startup+0x4dc): undefined reference to `JNL_Listen::JNL_Listen(short, unsigned long)'
ninjamsrv.cpp:(.text.startup+0x61d): undefined reference to `JNL::addr_to_ipstr(unsigned long, char*, int)'
ninjamsrv.cpp:(.text.startup+0x928): undefined reference to `JNL::addr_to_ipstr(unsigned long, char*, int)'
usercon.o: In function `User_Connection::OnRunAuth(User_Group*)':
usercon.cpp:(.text+0x2994): undefined reference to `JNL::addr_to_ipstr(unsigned long, char*, int)'
usercon.o: In function `User_Connection::Run(User_Group*, int*)':
usercon.cpp:(.text+0x6b30): undefined reference to `JNL::addr_to_ipstr(unsigned long, char*, int)'
usercon.cpp:(.text+0x6c3e): undefined reference to `JNL::addr_to_ipstr(unsigned long, char*, int)'
usercon.o:usercon.cpp:(.text+0x7c74): more undefined references to `JNL::addr_to_ipstr(unsigned long, char*, int)' follow
collect2: error: ld returned 1 exit status
make: *** [ninjamsrv] Error 1
TauTau
05-08-2017, 03:28 AM
I applied the patch from this thread to the Cockos WDL version, anonymous still gives me the error, but user/password works now ;)
How does ninjam integrate into Reaper?
Xenakios
05-08-2017, 05:57 AM
How does ninjam integrate into Reaper?
Reaper comes with its own Ninjam implementation which hopefully works with the Ninjam server discussed in this thread.
TauTau
05-08-2017, 06:12 AM
yeah, found it, and it connects nicely... as far as I understood, the tempo is only the same, when I use session mode in Reaper, can I also have the same tempo when I use it with an existing project? Also I couldn't find where I can set the server tempo from within the plugin?
Justin
09-02-2017, 08:29 PM
Sorry, this is way overdue, but I've updated the ninjam server source to compile on modern systems:
https://www.cockos.com/ninjam/downloads/src/ninjam_server_0.071.zip
(the main web page is also updated, obviously)
Edit: updated to .071 (CRLF support in config files).
brummbear
03-14-2019, 01:15 AM
Hi Justin,
0.071 sources do not compile to anything usable on my Win10 machine (client cannot connect to server).
0.06 sources compile immediately without fuss to a working version, detailed description here: https://forum.cockos.com/showthread.php?p=2107599#post2107599
EDIT:
The culprit was resolved (solution is in linked thread)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.