Closed ls12styler closed 11 years ago
Hello, the error seems to appear with your linker (which seems to be ld
). I have never built this library on MacOS (or never anything else for that matter) so I won't be of much help. Make sure you installed the right libspotify version and installed it system-wide. If you just installed it, maybe your linker must update its cache. On my Ubuntu it's done with running ldconfig
, you could try that.
If you find a way to make installation of this module seamless on MacOS, please let me know so that I can include it.
I have plan to make npm install
download this in the future and link locally, but I'm not there yet.
It seems that installing libspotify via homebrew solved the above problem. It installed the latest version too! So I would recommend that for any users attempting to install on OS X.
After trying to run npm install again, everything seemed to be OK, however I got some warnings generated:
*snip*
npm http 304 https://registry.npmjs.org/uglify-js
> libspotify@0.2.2 install /Users/me/Github/node-libspotify
> node-gyp configure build
CXX(target) Release/obj.target/libspotify/src/album.o
CXX(target) Release/obj.target/libspotify/src/artist.o
CXX(target) Release/obj.target/libspotify/src/audio.o
CXX(target) Release/obj.target/libspotify/src/binding.o
CXX(target) Release/obj.target/libspotify/src/link.o
In file included from ../src/link.cc:21:
../src/playlistcallbacks.cc:105:39: warning: unused variable 'nsp_playlistcontainer_callbacks' [-Wunused-variable]
static sp_playlistcontainer_callbacks nsp_playlistcontainer_callbacks = {
^
1 warning generated.
CXX(target) Release/obj.target/libspotify/src/player.o
CXX(target) Release/obj.target/libspotify/src/search.o
CXX(target) Release/obj.target/libspotify/src/session.o
In file included from ../src/session.cc:20:
../src/playlistcallbacks.cc:234:30: warning: unused variable 'nsp_playlist_callbacks' [-Wunused-variable]
static sp_playlist_callbacks nsp_playlist_callbacks = {
^
1 warning generated.
CXX(target) Release/obj.target/libspotify/src/track.o
CXX(target) Release/obj.target/libspotify/src/playlist.o
In file included from ../src/playlist.cc:20:
../src/playlistcallbacks.cc:105:39: warning: unused variable 'nsp_playlistcontainer_callbacks' [-Wunused-variable]
static sp_playlistcontainer_callbacks nsp_playlistcontainer_callbacks = {
^
1 warning generated.
SOLINK_MODULE(target) Release/spotify.node
SOLINK_MODULE(target) Release/spotify.node: Finished
bindings@1.1.1 node_modules/bindings
format@0.1.4 node_modules/format
colors@0.6.2 node_modules/colors
i@0.3.2 node_modules/i
backoff@2.0.0 node_modules/backoff
trycatch@0.2.13 node_modules/trycatch
├── hookit@0.0.5
└── colors@0.5.1
nodeunit@0.7.4 node_modules/nodeunit
└── tap@0.4.4 (deep-equal@0.0.0, buffer-equal@0.0.0, slide@1.1.5, mkdirp@0.3.5, nopt@2.1.2, glob@3.2.6, difflet@0.2.6, runforcover@0.0.2)
Similar warnings are generated when running npm test, too, although tests seem to pass:
npm test
> libspotify@0.2.2 pretest /Users/me/Github/node-libspotify
> rm -rf /tmp/node-libspotify 2>/dev/null ; node-gyp clean >/dev/null && node-gyp configure --debug >/dev/null && node-gyp build >/dev/null
In file included from ../src/link.cc:21:
../src/playlistcallbacks.cc:105:39: warning: unused variable 'nsp_playlistcontainer_callbacks' [-Wunused-variable]
static sp_playlistcontainer_callbacks nsp_playlistcontainer_callbacks = {
^
1 warning generated.
In file included from ../src/session.cc:20:
../src/playlistcallbacks.cc:234:30: warning: unused variable 'nsp_playlist_callbacks' [-Wunused-variable]
static sp_playlist_callbacks nsp_playlist_callbacks = {
^
1 warning generated.
In file included from ../src/playlist.cc:20:
../src/playlistcallbacks.cc:105:39: warning: unused variable 'nsp_playlistcontainer_callbacks' [-Wunused-variable]
static sp_playlistcontainer_callbacks nsp_playlistcontainer_callbacks = {
^
1 warning generated.
> libspotify@0.2.2 test /Users/me/Github/node-libspotify
> nodeunit test/test-*
test-000-config.js
✔ testInstanciatingSessionWithNoArgumentThrows
yes, these are the exact same warnings because npm test
rebuilds the binary addon in debug mode. These are benine warnings (unsuned variables) but they should be addressed soon.
Please let me know how node-libspotify goes on MacOS. =)
Ah ok - thanks.
I'm sure I'll keep you updated on how it's going!
@Floby I am getting the same warnings when I try to push to Heroku (NB for my personal use - I'm aware that it uses my personal Spotify Key etc).
Do you know why? I'm new to Node and webDev so maybe this is a basic environments question. Appreciate any feedback!
You need to get the actual library from https://developer.spotify.com/technologies/libspotify/ and install it on your machine. Hopefully it should be as simple as
tar xzf <downloaded-tarball>
cd libspotify
./configure
sudo make install
On 9 January 2014 16:42, Tiernan Kennedy notifications@github.com wrote:
@Floby https://github.com/Floby I am getting the same warnings when I try to push to Heroku (NB for my personal use - I'm aware that it uses my personal Spotify Key etc).
Do you know why? I'm new to Node and webDev so maybe this is a basic environments question. Appreciate any feedback!
— Reply to this email directly or view it on GitHubhttps://github.com/Floby/node-libspotify/issues/34#issuecomment-31944013 .
Hey thanks for the quick response - I can actually run the library on my local machine - it's when I push to Heroku to host remotely I have a problem.
I'm thinking that I need to install Libspotify on the remote server?
You're absolutely right. Along with your app key.
On 9 January 2014 17:05, Tiernan Kennedy notifications@github.com wrote:
Hey thanks for the quick response - I can actually run the library on my local machine - it's when I push to Heroku to host remotely I have a problem.
I'm thinking that I need to install Libspotify on the remote server?
— Reply to this email directly or view it on GitHubhttps://github.com/Floby/node-libspotify/issues/34#issuecomment-31946772 .
OK thanks @Floby! If anyone has any insight on how to achieve that on Heroku I'm all ears!
I'll report back if I find anything
I'm not familiar with heroku. However, it seems to be just a virtual server provider?
If so, do you have CLI access?
Yeah @ls12styler exactly - it's handles Rails & Node apps pretty well with minimum setup.
From what I can tell there is some CLI access: https://devcenter.heroku.com/categories/command-line
Hi,
I don't know if I'm doing something wrong, but running
npm install
after cloning fails. The output I get is as follows:I'm guessing the error is "ld: library not found for -lspotify". However, I don't quite know what means. And I thought I'd managed to get libspotify installed. Could someone please inform me how check if it is?
Thanks