Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol lookup error #2

Open
gadybadger opened this issue Apr 1, 2013 · 13 comments
Open

Symbol lookup error #2

gadybadger opened this issue Apr 1, 2013 · 13 comments

Comments

@gadybadger
Copy link

So I cloned your repo, pushed it to a shiny new Heroku app, set the LD_LIBRARY_PATH config var, and when I run the app I get an application error and heroku logs tell me why:

node: symbol lookup error: /app/node_modules/mapnik/lib/_mapnik.node: undefined symbol: _ZN2v814ObjectTemplate11SetAccessorENS_6HandleINS_6StringEEEPFNS1_INS_5ValueEEENS_5LocalIS2_EERKNS_12AccessorInfoEEPFvS7_NS6_IS4_EESA_ES5_NS_13AccessControlENS_17PropertyAttributeE

Any idea why this is happening? Am I missing a step somewhere?

@springmeyer
Copy link

This is because you are using a different node version that the binary was compiled with. I can't recall what version I originally build the binary against - likely v0.6. What version of node are you targeting?

@gadybadger
Copy link
Author

Thanks for getting back to me on this. I didn't change anything from the original clone, and package.json specifies "engines": { "node": "0.6.x" }. And when I try to push that to Heroku, I get the following:

-----> Node.js app detected
-----> Resolving engine versions
       Using Node.js version: 0.6.20
       Using npm version: 1.2.15
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
       npm ERR! cb() never called!
       npm ERR! not ok code undefined
       npm ERR! cb() never called!
       npm ERR! not ok code 1
 !     Failed to install --production dependencies with npm
 !     Heroku push rejected, failed to compile Node.js app

To [email protected]:mapnik-tester.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:mapnik-tester.git'

After doing some research, I found out that this problem is fixed if you use Node version 0.8.x, so I changed to that version of the engine, push that to Heroku, and that's when I get the symbol lookup error (which you pointed out is due to the difference in versions of Node and the compiled binary). So basically the barrier to using this out-of-the-box is the above error when using 0.6.x. Please let me know if I can give you more info to troubleshoot, I would love to get this up and running.

@springmeyer
Copy link

Okay. If I were you I would try to find another workaround for that odd npm ERR! cb() never called! error that can allow you to avoid upgrading to node v0.8. If that is not possible, then I would take a look at targeting node v0.10.0. I plan to update the heroku binary but since node v0.10 is out I would prefer to do a build for that version.

@gadybadger
Copy link
Author

Cool, I'll see what I can come up with for the odd error and post results here.

On Mon, Apr 1, 2013 at 6:23 PM, Dane Springmeyer
[email protected]:

Okay. If I were you I would try to find another workaround for that odd npm
ERR! cb() never called! error that can allow you to avoid upgrading to
node v0.8. If that is not possible, then I would take a look at targeting
node v0.10.0. I plan to update the heroku binary but since node v0.10 is
out I would prefer to do a build for that version.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-15748198
.

@gadybadger
Copy link
Author

So unfortunately I haven't found any other workarounds. Targeting node v0.10.0 seems to be the way to go...

@springmeyer
Copy link

Okay, node v0.10.0 is very close - just some build tweaking to be done. Then the task is to provide precompiled binaries of libmapnik to build against, which is on my list. Let's track at mapnik/mapnik-packaging#73.

@gadybadger
Copy link
Author

Sounds good, let me know if I can help test.

@gadybadger
Copy link
Author

Hi @springmeyer and @bensheldon, this is an old thread, but I'm running into the need to run Node & Mapnik on Heroku again. What's considered the best way to do this now?

@springmeyer
Copy link

@gadybadger the official node-mapnik release I think will run fine on heroku now. Please try it and create an issue at https://github.com/mapnik/node-mapnik/issues if you have any trouble. Also see mapnik/node-mapnik#863 for details on running on lambda.

@gadybadger
Copy link
Author

@springmeyer, yep, it works like a charm on Heroku with the following:

  1. The following buildpacks:
https://github.com/heroku/heroku-buildpack-apt
https://github.com/heroku/heroku-buildpack-pgbouncer
heroku/nodejs

(pgbouncer so I can use Heroku's config vars to access the database connection info in the Node app)

  1. An Aptfile containing the following:
libc6
libgcc1
libstdc++6
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-4.8/gcc-4.8_4.8.4-2ubuntu1~14.04.3_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-4.8/libstdc%2B%2B6_4.8.4-2ubuntu1~14.04.3_amd64.deb
  1. A Procfile with web: bin/start-pgbouncer-stunnel node app.js.
  2. package.json with the following:
{
...  
  "dependencies": {
    "express": "2.5.x",
    "mapnik": "3.5.x"
  },
  "engines": {
    "node": "0.10.x",
    "npm": "2.11.2"
  }
}

Running on Lambda looks awesome, I will try that out.

@springmeyer
Copy link

@gadybadger could you try with node-mapnik 3.7.1? If it works, would be great to get these setup instructions into the node-mapnik wiki/docs.

@gadybadger
Copy link
Author

@springmeyer, node-mapnik v3.7.1 works fine as well. I'm happy to add to the wiki, just let me know where to put it.

@bensheldon
Copy link
Owner

@springmeyer Thank you for helping track this down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants