[Cs-dev] Trouble compiling PNaCl code
Date | 2015-05-22 04:29 |
From | Forrest Cahoon |
Subject | [Cs-dev] Trouble compiling PNaCl code |
Attachments | None None |
In my work on a Chrome App using the PNaCl-compiled version of csound, I'm continuing to have trouble accessing the filesystems that csound uses. I think this is due to differences between Chrome apps, which run locally, and server-based apps which use PNaCl. So far I have just been using a pre-compiled pexe, but I think I need to compile my own to solve this problem. I can't seem to get it to work, though.This is what I've done. Downloaded the Native Client SDK from https://developer.chrome.com/native-client/sdk/download Unzipped into /usr/local/share From nacl_sdk dir, ran ./naclsdk update, which downloaded pepper_42 (current stable) code into its own subdir. Set NACL_SDK_ROOT env var to /usr/local/share/nacl_sdk/pepper_42 Downloaded libsndfile-nacl.tar.gz from the Dropbox url given in the PDF. Unpacked tarball, cd'd to libsndfile-nacl/src and ran make. This ran without errors. Changed into the nacl dir of csound (still using develop branch of the repo, not sure if that matters) and ran ./build.sh: forrest@makemake:~/src/csound6/csound-csound6-git/nacl$ ./build.sh ../Engine/csound_orc.y:24.1-12: warning: deprecated directive, use ‘%pure-parser’ [-Wdeprecated] %pure_parser ^^^^^^^^^^^^ ../Engine/csound_orc.y:120.1-12: warning: deprecated directive, use ‘%pure-parser’ [-Wdeprecated] %pure_parser ^^^^^^^^^^^^ ../Engine/csound_orc.y: warning: 4 shift/reduce conflicts [-Wconflicts-sr] ../Engine/csound_orc.y: warning: 18 reduce/reduce conflicts [-Wconflicts-rr] CC pnacl/Release/__//Engine/auxfd.o In file included from ../Engine/auxfd.c:24: In file included from ../include/csoundCore.h:818: ../H/prototyp.h:27:10: fatal error: 'sndfile.h' file not found #include <sndfile.h> ^ 1 error generated. Makefile:232: recipe for target 'pnacl/Release/__//Engine/auxfd.o' failed make: *** [pnacl/Release/__//Engine/auxfd.o] Error 1 Strange that I would get an error that it couldn't find sndfile.h, since I have that file in /usr/include. Since it's probably better to include the one from the libsndfile-nacl tarball anyway, I edited Makefile and added the path to libsndfile-nacl/src to the includes. This time, it runs successfully. The last line is LIB /usr/local/share/nacl_sdk/pepper_42/lib/pnacl/Release/libcsound.a Great. I assume this means I have a static lib that I can link into the .pexe file. Now, I change into the csound subdir under nacl and run make: forrest@makemake:~/src/csound6/csound-csound6-git/nacl/csound$ make CXX pnacl/Release/csound.o csound.cpp:519:11: error: no member named 'VarDictionary' in namespace 'pp' pp::VarDictionary var_dictionary_message(var_message); ~~~~^ csound.cpp:520:27: error: use of undeclared identifier 'var_dictionary_message' pp::Var var_input = var_dictionary_message.Get("input"); ^ 2 errors generated. Makefile:22: recipe for target 'pnacl/Release/csound.o' failed make: *** [pnacl/Release/csound.o] Error 1 Ok, now I'm totally lost. Help? Forrest |
Date | 2015-05-22 06:21 |
From | Forrest Cahoon |
Subject | Re: [Cs-dev] Trouble compiling PNaCl code |
Attachments | None None |
I found there was a missing include (maybe it was separated out into its own file after this code was written?) I submitted an issue with a patch on github.On Thu, May 21, 2015 at 10:29 PM, Forrest Cahoon <forrest.cahoon@gmail.com> wrote:
|