Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

build error #73

Closed
jqtrde opened this issue Oct 26, 2013 · 20 comments
Closed

build error #73

jqtrde opened this issue Oct 26, 2013 · 20 comments

Comments

@jqtrde
Copy link

jqtrde commented Oct 26, 2013

osx: 10.9 node -v: 0.10.21 mapnik: 2.2.0

Ran through the source install steps as described here.

Getting the following error on node index.js

dyld: lazy symbol binding failed: Symbol not found: __ZN6mapnik16datasource_cache20register_datasourcesERKSs
  Referenced from: /Users/Jacques/bin/tm2/node_modules/mapnik/lib/_mapnik.node
  Expected in: dynamic lookup

dyld: Symbol not found: __ZN6mapnik16datasource_cache20register_datasourcesERKSs
  Referenced from: /Users/Jacques/bin/tm2/node_modules/mapnik/lib/_mapnik.node
  Expected in: dynamic lookup

[1]    71880 trace trap  node index.js

I'd happily just use one of the binaries, but https://tilemill.s3.amazonaws.com/index.html?path=dev/ just sits at loading... forever.

I want to make cool maps like AJ Ashton!

💌

@springmeyer
Copy link
Contributor

@jacquestardie - question: did you recompile mapnik after installing 10.9? Also reported at mapnik/node-mapnik#189. I'm looking into it (need to get 10.9 set up first myself).

@rclark
Copy link
Contributor

rclark commented Oct 31, 2013

I had the same issue yesterday on an entirely fresh 10.9 installation. For
my part npm install goes fine (once I installed xcode in its entirety),
but these errors are thrown when I try and run tm2.

On Thu, Oct 31, 2013 at 12:08 PM, Dane Springmeyer <notifications@github.com

wrote:

@jacquestardie https://github.com/jacquestardie - question: did you
recompile mapnik after installing 10.9? Also reported at
mapnik/node-mapnik#189 mapnik/node-mapnik#189.
I'm looking into it (need to get 10.9 set up first myself).


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

@springmeyer
Copy link
Contributor

The root of problem appears to be that while libmapnik is being properly linked to libc++ (when rebuilt on 10.9) node-mapnik still ending up linking to libstdc++. Linking to 2 different incompatible c++ standard libraries is not going to work. Node itself is also linking to libstdc++ (even when I compile from source on homebrew).

So, I have no viable workaround yet: will continue investigating tomorrow.

@springmeyer
Copy link
Contributor

Found a workaround:

rm -rf node_modules/
export CXXFLAGS="-mmacosx-version-min=10.9"
export CFLAGS="-mmacosx-version-min=10.9"
export LDFLAGS="-mmacosx-version-min=10.9"
npm install

@thomasgalambos
Copy link

It works, thank you!

@jqtrde
Copy link
Author

jqtrde commented Nov 1, 2013

works here too, thanks @springmeyer

@jqtrde jqtrde closed this as completed Nov 1, 2013
@springmeyer
Copy link
Contributor

@jacquestardie - glad the workaround fixed your source compile. However the binaries should work. Can you tell me which binary you tried and provide more detail about the hang? I just tested the latest one: http://tilemill.s3.amazonaws.com/dev/tm2-osx-2013-11-01-d734ec2.tar.gz. I needed to edit my security settings to be able to run the start.command, but otherwise things worked:
screen shot 2013-11-01 at 12 47 37 pm

@jqtrde
Copy link
Author

jqtrde commented Nov 1, 2013

Didn't actually get to try any of the binaries. https://tilemill.s3.amazonaws.com/index.html?path=dev/ just sits and hangs for me.

Can wait here 30m, and it'll just keep loading.... I've tried with different connections, always using Chrome.

@jqtrde
Copy link
Author

jqtrde commented Nov 1, 2013

Just tried Safari, opened immediately..

@springmeyer
Copy link
Contributor

ah, I see. cool, well can you try http://tilemill.s3.amazonaws.com/dev/tm2-osx-2013-11-01-d734ec2.tar.gz ? I'd also be interested if you can detect any differences in performance between the binary and your source compiled version, but no worries if you can't.

@jqtrde
Copy link
Author

jqtrde commented Nov 1, 2013

yep, grabbing it now

@jqtrde
Copy link
Author

jqtrde commented Nov 1, 2013

The binary is certainly more stable than what I compiled.

I get a segfault when I try to affect any of the options in the compiled version. In addition, the basemap itself doesn't render with the source build. Meanwhile, the binary works fine.

I'm hoping to get around to actually making and uploading a map later today, if I have any issues I'll post em up.

@springmeyer
Copy link
Contributor

@jacquestardie - thanks for the details. Regarding uploading: there is no support for uploading at this time.

@cappelaere
Copy link

Just add the same problem installing node-mapnik in a node.js app. Thank you for the workaround.
Pat.

@Pana
Copy link

Pana commented Nov 21, 2013

TKS, this works for me

@connor
Copy link

connor commented Jan 9, 2014

Workaround worked for me! Thanks @springmeyer

@springmeyer
Copy link
Contributor

@connor - great, thanks for the followup!

@zzolo
Copy link

zzolo commented Feb 12, 2014

I can confirm that the workaround that @springmeyer mentioned worked for me.
#73 (comment)

@springmeyer
Copy link
Contributor

Note: the final solution I arrived at to avoid this issue was mapnik/node-mapnik@e21503b. But overall this only ever a problem with source installed node-mapnik + externally compiled mapnik on 10.9 and luckily this is much more of a rare case now that node-mapnik ships with https://github.com/mapbox/node-pre-gyp binaries.

@andfinally
Copy link

Thanks! springmeyer's workaround worked for me too

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

No branches or pull requests

9 participants