[Cs-dev] Update for Emscripten
Date | 2014-11-13 00:56 |
From | Steven Yi |
Subject | [Cs-dev] Update for Emscripten |
Attachments | None None |
Hi All, I just spent a couple hours looking into getting Csound to build with Emscripten again. I just completed changes and pushed to GIT. I ended up using #ifndef __EMSCRIPTEN__ around any code that used pthreads. I had to do a few other things as well. As it is, I'm now able to compile Csound with Emscripten. However, the example page is not working. I get an exception in the console: TypeError: argTypes.every is not a function and then libcsound fails to load. Ed: Could you take a look into this? I'm not sure if you've run into this before or not. Perhaps it's something new having to do with using emsdk 1.25.0. Otherwise, I tested compiling the desktop build here on OSX and that worked alright. If you are doing a build and have any issues after the changes I committed, please report them here. Thanks, steven
|
Date | 2014-11-13 10:59 |
From | Edward Costello |
Subject | Re: [Cs-dev] Update for Emscripten |
Hey, Yeah no problem I’ll look into it on the weekend, and let you know what I find out. That error is unfamiliar, but on first impressions it looks like the function that it’s trying to call has been optimised out by the emscripten compiler. > On 13 Nov 2014, at 01:56, Steven Yi |
Date | 2014-11-16 17:51 |
From | Edward Costello |
Subject | Re: [Cs-dev] Update for Emscripten |
Tried compiling there with the latest and I get this: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: PTHREAD_LIBRARY linked by target "libcsnd6" in directory /Volumes/Data/Dropbox/Programming/csound/interfaces Any ideas? > On 13 Nov 2014, at 11:59, Edward Costello |
Date | 2014-11-16 18:59 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Update for Emscripten |
Attachments | None None |
Are you building in the develop branch? The CMake files there look, at a hasty glance, OK for this. I removed the dependency on PTHREAD_LIBRARY for libcsnd6 on WIndows, and I don't see it for other platforms either, maybe you did not clean up everything first; you can always remove your entire source tree and clone it again. Regards, Mike ----------------------------------------------------- Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sun, Nov 16, 2014 at 12:51 PM, Edward Costello <EDWARD.COSTELLO@nuim.ie> wrote: Tried compiling there with the latest and I get this: |
Date | 2014-11-16 22:26 |
From | Edward Costello |
Subject | Re: [Cs-dev] Update for Emscripten |
Attachments | None None |
Ok, I did a fresh clone and it builds fine now. Unfortunately it won’t run, I’m getting this weird error: run() called, but dependencies remain, so not running libcsound.js:1 I need to investigate further, I’ll have a look tomorrow and if I don’t come up with anything I’ll ask on the mailing list. Ed
|
Date | 2014-11-17 19:11 |
From | Edward Costello |
Subject | Re: [Cs-dev] Update for Emscripten |
Attachments | None None |
Ok, so that error actually isn’t an error, it’s just a warning that all the javascript hasn’t loaded yet. So I can instantiate Csound now, I had to change some of the cwrap functions in the constructor as you used to be able to give the input/output arguments to the C function without square braces if there was only 1 argument, now you have to put them always in square braces, so that will have to change. e.g from this: var _process = cwrap('CsoundObj_process', 'number', ['number', 'number', 'number', 'number']); var _process = cwrap('CsoundObj_process', ['number'], ['number', 'number', 'number', 'number']); But now I am getting crashes when I try to compile an orchestra with this: missing function: csp_orc_sa_instr_add_tree libcsound.js:1
|