vunb / node-fasttext

Nodejs binding for fasttext representation and classification.
MIT License
43 stars 14 forks source link

ld: 41 duplicate symbols for architecture x86_64, build fasttext error on Mac OSX #6

Closed vunb closed 6 years ago

vunb commented 6 years ago

Trying to build FastText wrapper on Mac OS X and get the following error message:

duplicate symbol __ZNK8fasttext8FastText7predictERNSt3__113basic_istreamIcNS1_11char_traitsIcEEEEiRNS1_6vectorINS1_4pairIfNS1_12basic_stringIcS4_NS1_9allocatorIcEEEEEENSA_ISD_EEEE in:
    Release/obj.target/fasttext/fastText/src/fasttext.o
    Release/obj.target/fasttext/src/fasttext.o
ld: 41 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/fasttext.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/travis/build/vunb/node-fasttext/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/Users/travis/.nvm/versions/node/v8.9.3/bin/node" "/Users/travis/build/vunb/node-fasttext/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/travis/build/vunb/node-fasttext/lib/binding/fasttext.node" "--module_name=fasttext" "--module_path=/Users/travis/build/vunb/node-fasttext/lib/binding"
gyp ERR! cwd /Users/travis/build/vunb/node-fasttext
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/Users/travis/.nvm/versions/node/v8.9.3/bin/node /Users/travis/build/vunb/node-fasttext/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/travis/build/vunb/node-fasttext/lib/binding/fasttext.node --module_name=fasttext --module_path=/Users/travis/build/vunb/node-fasttext/lib/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/travis/build/vunb/node-fasttext/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Darwin 16.7.0
node-pre-gyp ERR! command "/Users/travis/.nvm/versions/node/v8.9.3/bin/node" "/Users/travis/build/vunb/node-fasttext/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/travis/build/vunb/node-fasttext
node-pre-gyp ERR! node -v v8.9.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok 

Detail: https://travis-ci.org/vunb/node-fasttext/builds/316260050