2bbb / node-abletonlink

node.js porting of ableton Link
MIT License
149 stars 16 forks source link

Installing in windows 10? #2

Closed CarloCattano closed 6 years ago

CarloCattano commented 7 years ago

Hey there . I would love to try this for my interactive multiplayer sound thingy.

Im using windows 10 , node v6.9.5. Followed all the steps , but when npm install inside de folder i get

"C:\node-abletonlink-master\libs\link\include\ableton/platforms/asio/AsioWrapper.hpp(60): fatal error C1083: Cannot open include file: 'asio.hpp': No such file or directory (compiling source file ..\src\nbind.cc) [C:\node-abletonlink-maste r\build\nbind.vcxproj]"

but the file is there , i had to manually download the lib/ contents from the link repo

2bbb commented 7 years ago

@CarloCattano what command did you do?

CarloCattano commented 7 years ago

Npm install Inside the folder witch I downloaded and decompress

El 3/9/2017 18:43, "ISHII 2bit" notifications@github.com escribió:

what command did you do?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/2bbb/node-abletonlink/issues/2#issuecomment-326816077, or mute the thread https://github.com/notifications/unsubscribe-auth/AQk0sphLFvCc1uUJCnRLQ-S-Gq0qu6ILks5setdOgaJpZM4PLMhY .

2bbb commented 7 years ago

hmmm...

did you do git submodule update --init --recursive?

CarloCattano commented 7 years ago

Still no luck @2bbb . I did the command you mentioned to a fresh clone of the repo . Before I mannually downloaded the link repo files . But still not working and giving this error after warnings

nbind.obj : error LNK2001: unresolved external symbol "protected: virtual void cdecl std::bad_cast::_Doraise(void)con st " (?_Doraise@bad_cast@std@@MEBAXXZ) [C:\node-abletonlink\build\nbind.vcxproj] nbind.obj : error LNK2001: unresolved external symbol "public: cdecl std::bad_cast::bad_cast(class std::bad_cast cons t &)" (??0bad_cast@std@@QEAA@AEBV01@@Z) [C:\node-abletonlink\build\nbind.vcxproj] nbind.obj : error LNK2019: unresolved external symbol "declspec(dllimport) public: cdecl std::bad_cast::bad_cast(ch ar const *)" (imp_??0bad_cast@std@@QEAA@PEBD@Z) referenced in function "public: class asio::ip::address_v4 __cdecl as io::ip::address::to_v4(void)const " (?to_v4@address@ip@asio@@QEBA?AVaddress_v4@23@XZ) [C:\node-abletonlink\build\nbind. vcxproj] nbind.obj : error LNK2019: unresolved external symbol "declspec(dllimport) public: virtual cdecl std::bad_cast::~ba d_cast(void)" (imp_??1bad_cast@std@@UEAA@XZ) referenced in function "public: virtual cdecl asio::ip::bad_address_ca st::~bad_address_cast(void)" (??1bad_address_cast@ip@asio@@UEAA@XZ) [C:\node-abletonlink\build\nbind.vcxproj] nbind.obj : error LNK2019: unresolved external symbol "declspec(dllimport) public: __cdecl std::bad_cast::bad_cast(cl ass std::bad_cast const &)" (imp_??0bad_cast@std@@QEAA@AEBV01@@Z) referenced in function "public: cdecl asio::ip::b ad_address_cast::bad_address_cast(class asio::ip::bad_address_cast const &)" (??0bad_address_cast@ip@asio@@QEAA@AEBV012 @@Z) [C:\node-abletonlink\build\nbind.vcxproj] C:\node-abletonlink\build\Release\nbind.node : fatal error LNK1120: 5 unresolved externals [C:\node-abletonlink\build\n bind.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\node-abletonlink gyp ERR! node -v v6.9.5 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! abletonlink@0.0.3 build: autogypi && node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the abletonlink@0.0.3 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\ProgramData\npm-cache_logs\2017-09-03T18_34_07_247Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! abletonlink@0.0.3 install: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the abletonlink@0.0.3 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\ProgramData\npm-cache_logs\2017-09-03T18_34_07_287Z-debug.log C:\node-abletonlink>

2bbb commented 7 years ago

can you install with npm install node-abletonlink?

CarloCattano commented 7 years ago

C:\Users\x>npm install abletonlink

abletonlink@0.0.3 install C:\Users\x\node_modules\abletonlink npm run build

abletonlink@0.0.3 build C:\Users\x\node_modules\abletonlink autogypi && node-gyp rebuild

C:\Users\x\node_modules\abletonlink>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) Los proyectos de esta solución se van a compilar de uno en uno. Para habilitar la compilación en paralelo, agregue el modificador "/m". Copying ../nbind/src/symbols.txt to Release\obj\nbind\symbols.txt 1 archivo(s) copiado(s). nbind.cc common.cc reflect.cc Buffer.cc Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:

npm ERR! A complete log of this run can be found in: npm ERR! C:\ProgramData\npm-cache_logs\2017-09-03T19_03_31_984Z-debug.log npm WARN Error: EPERM: operation not permitted, unlink 'C:\Users\x\node_modules\ansi-regex\package.json' npm WARN at Error (native) npm WARN { Error: EPERM: operation not permitted, unlink 'C:\Users\x\node_modules\ansi-regex\package.json' npm WARN at Error (native) npm WARN stack: 'Error: EPERM: operation not permitted, unlink \'C:\Users\x\node_modules\ansi-regex\package.json\'\n at Error (native)', npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'unlink', npm WARN path: 'C:\Users\x\node_modules\ansi-regex\package.json' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! abletonlink@0.0.3 install: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the abletonlink@0.0.3 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\ProgramData\npm-cache_logs\2017-09-03T19_03_43_644Z-debug.log

C:\Users\x>

CarloCattano commented 7 years ago

and when trying to : npm install abletonlink " there is a problem with the naming even tho i tried changing the folder name :

"C:\Users\x\Serverlink>npm install abletonlink npm ERR! code ENOSELF npm ERR! Refusing to install package with name "abletonlink" under a package npm ERR! also called "abletonlink". Did you name your project the same npm ERR! as the dependency you're installing? npm ERR! npm ERR! For more information, see: npm ERR! https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm

npm ERR! A complete log of this run can be found in: npm ERR! C:\ProgramData\npm-cache_logs\2017-09-03T19_35_46_307Z-debug.log"

2bbb commented 7 years ago

please change lines

from: https://github.com/2bbb/node-abletonlink/blob/master/binding.gyp#L21-L23

to:

            ['OS=="win"', {
                'defines': ['LINK_PLATFORM_WINDOWS=1', '_WIN32_WINNT=0x0501']
            }],

and try to build again.

CarloCattano commented 7 years ago

ok the windows version messagelog is gone now so that was helpfull , but still got these. Thanks a lot for giving a hand , its a rellay hard job to figure it out alone and i read that you dont know about windows much so sorry for all the text and the inconvenience, but hope that can be helpfull for more people

Creating library C:\nodesSjs\node-abletonlink\build\Release\nbind.lib and object C:\nodesSjs\node-abletonlink\buil d\Release\nbind.exp nbind.obj : error LNK2001: unresolved external symbol "protected: virtual void cdecl std::bad_cast::_Doraise(void)con st " (?_Doraise@bad_cast@std@@MEBAXXZ) [C:\nodesSjs\node-abletonlink\build\nbind.vcxproj] nbind.obj : error LNK2001: unresolved external symbol "public: cdecl std::bad_cast::bad_cast(class std::bad_cast cons t &)" (??0bad_cast@std@@QEAA@AEBV01@@Z) [C:\nodesSjs\node-abletonlink\build\nbind.vcxproj] nbind.obj : error LNK2019: unresolved external symbol "declspec(dllimport) public: cdecl std::bad_cast::bad_cast(ch ar const *)" (imp_??0bad_cast@std@@QEAA@PEBD@Z) referenced in function "public: class asio::ip::address_v4 __cdecl as io::ip::address::to_v4(void)const " (?to_v4@address@ip@asio@@QEBA?AVaddress_v4@23@XZ) [C:\nodesSjs\node-abletonlink\bui ld\nbind.vcxproj] nbind.obj : error LNK2019: unresolved external symbol "declspec(dllimport) public: virtual cdecl std::bad_cast::~ba d_cast(void)" (imp_??1bad_cast@std@@UEAA@XZ) referenced in function "public: virtual cdecl asio::ip::bad_address_ca st::~bad_address_cast(void)" (??1bad_address_cast@ip@asio@@UEAA@XZ) [C:\nodesSjs\node-abletonlink\build\nbind.vcxproj] nbind.obj : error LNK2019: unresolved external symbol "declspec(dllimport) public: __cdecl std::bad_cast::bad_cast(cl ass std::bad_cast const &)" (imp_??0bad_cast@std@@QEAA@AEBV01@@Z) referenced in function "public: cdecl asio::ip::b ad_address_cast::bad_address_cast(class asio::ip::bad_address_cast const &)" (??0bad_address_cast@ip@asio@@QEAA@AEBV012 @@Z) [C:\nodesSjs\node-abletonlink\build\nbind.vcxproj] C:\nodesSjs\node-abletonlink\build\Release\nbind.node : fatal error LNK1120: 5 unresolved externals [C:\nodesSjs\node-a bletonlink\build\nbind.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\nodesSjs\node-abletonlink gyp ERR! node -v v6.9.5 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! abletonlink@0.0.3 build: autogypi && node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the abletonlink@0.0.3 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\ProgramData\npm-cache_logs\2017-09-03T19_49_11_488Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! abletonlink@0.0.3 install: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the abletonlink@0.0.3 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\ProgramData\npm-cache_logs\2017-09-03T19_49_11_541Z-debug.log

2bbb commented 7 years ago

exactly. i don't have windows.

please you solve this problem and throw PR! 👍

CarloCattano commented 7 years ago

I will try my best. Im very new to server side with node.js and a complete noob about c++ dependencies etc . But my will is strong ( till I buy a Macbook pro for convenience)

CarloCattano commented 7 years ago

Changed " node-gyp configure --msvs_version=2017" tried "node-gyp configure --msvs_version=2015" Installed Windows 10 sdk , 2015 building tools. followed this steps too : https://github.com/nodejs/node-gyp/issues/802 No change so far the persisting problem seems to be around this lines : problem.txt

Couldn't find a working solution for the line: gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1

Getting some minor warnings too "nbind.cc(33): warning C4503" which is related to long characters filepaths

CarloCattano commented 6 years ago

I still get this errors after a fresh reinstall , and even on other machines .

..\src\nbind.cc(33): warning C4503: 'std::allocator<_Other>::construct': decorated name length exceeded, name was trunc ated [C:\Users\x\Desktop\node-abletonlink\build\nbind.vcxproj] with [ _Other=_Myimpl ] C:\Users\x\.node-gyp\6.11.3\Release\node.lib : fatal error LNK1127: library is corrupt [C:\Users\x\Desktop\node-ableton link\build\nbind.vcxproj]

CarloCattano commented 6 years ago

this looks like the main problem , I cant get my head around it

C:\Users\x.node-gyp\6.11.3\Release\node.lib : fatal error LNK1127: library is corrupt [C:\Users\x\Desktop\node-abletonlink\build\nbind.vcxproj]

merttoka commented 6 years ago

Hey, anyone found a solution to this? I have the same problem and I encountered all the error messages above. I am currently investigating the connection between the nbind and msvs 2015. I'll keep you posted.

Update: No chance. Started plans on detonating my windows machine tho...

CarloCattano commented 6 years ago

@merttoka I tried many times without succes , see the other issue posted by me . I succesfully compiled this into a raspberry pi server, but in windows 10 looks quite hard to get it working

2bbb commented 6 years ago

@CarloCattano @merttoka

i had try to make this passing build. please try:

npm install 2bbb/node-abletonlink#dev/fxxxin_windows10

if it failure to build then:

npm config set msvs_version 2015
npm install 2bbb/node-abletonlink#dev/fxxxin_windows10

if you success to build, please tell me. then i will merge this branch to master.

2bbb commented 6 years ago

i merged #6. please try with simply npm install abletonlink.

summary i researched: (maybe there are some of misunderstand in those)

node-gyp supported vs2017 but maybe there are some bugs or problem. i can't understand about this. versioning of VS is so difficult and complexity.

nbind doesn't support vs2017 yet. maybe it is bug or difference of interpretation about SFINAE or TMP of VC++ v141.

i don't know why we need to include malloca.h, but maybe it is needed.

i don't know why it occurs unresolved external symbol "protected: virtual void __cdecl std::bad_cast::_Doraise(void)con st ". is it problem under versioning of VS about lib? i decided to abandon exceptions on windows.

conclusion: maybe this will work on win10 now. but i recommend to use macOS or linux. let's throw away win10. 😉

CarloCattano commented 6 years ago

I will try ASAP and let you know. I tried now but didnt work . But could be because I uninstalled some dependencies of vs studio . Will read again the readme and install the building tools and all from 0

2018-02-19 7:44 GMT+01:00 ISHII 2bit notifications@github.com:

i merged #6 https://github.com/2bbb/node-abletonlink/pull/6. please try with simply npm install abletonlink.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/2bbb/node-abletonlink/issues/2#issuecomment-366601432, or mute the thread https://github.com/notifications/unsubscribe-auth/AQk0ssNkM9emZZF7TNy_n6Wp5yknbI8Bks5tWRhfgaJpZM4PLMhY .

CarloCattano commented 6 years ago

npm-debug.log Failed with all the methods , Direct npm and cloning with recrusive update . Here is the log of the failure. Would love to throw windows 10 away but is the most stable release so far for music production and the hardware is affordable . Funny that I got this working on my raspberry pi but cant manage to have it on my win computer

CarloCattano commented 6 years ago

SUCCESS!!!!!
Thanks a trillion ! now i can keep experimenting with networking and LINK !! I will soon try to integrate it with this https://github.com/CarloCattano/PopularSynth

sssssssaaaaaaaaaaaaaaaaa

CarloCattano commented 6 years ago

I was using the wrong version of node 6.x Upgrading to the latest version did the trick

2bbb commented 6 years ago

@CarloCattano great! :+1: but i have a question. what do "wrong version of node 6.x" means?

so, i didn't test with node v6.x. and will test.

thanks!

CarloCattano commented 6 years ago

I was triying to install and my node.js version was 6 or 4. Cant remember anymore since I switch enviroments pretty much . I updated node in my pi , but on the pc I forgot to do so . After trying this morning all the methods I realised that . I downloaded node -v 9 and worked at first shot! @2bbb thanks!!!

2bbb commented 6 years ago

@CarloCattano

i did test to install with node v6.13.0, and it got success. maybe you used v4.x. and this package doesn't support v4.x.

thanks.