zhangtaii / react-native-google-place-picker

React Native Wrapper of Google Place Picker for iOS + Android.
MIT License
185 stars 54 forks source link

Error when building ( symbol(s) not found for architecture x86_64 ) #3

Closed tdurand closed 8 years ago

tdurand commented 8 years ago

Hello,

Thanks for your work. I have an issue while trying to run your example:

git clone git@github.com:q6112345/react-native-google-place-picker.git
cd react-native-google-place-picker/example
npm install
cd ios 
pod install
cd ..
react-native run-ios

I get this error: symbol(s) not found for architecture x86_64

After some googling i found out i may be an issue with the compilation of C++ but was unable to solve it.

Undefined symbols for architecture x86_64: "std::1::next_prime(unsigned long)", referenced from: std::1::hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::rehash(unsigned long) in libReact.a(RCTJSCExecutor.o) "std::terminate()", referenced from: ___clang_callterminate in libReact.a(RCTJSCExecutor.o) "operator delete", referenced from: -[RCTJSCExecutor dealloc] in libReact.a(RCTJSCExecutor.o) executeRandomAccessModule(RCTJSCExecutor, unsigned int, unsigned long, unsigned long) in libReact.a(RCTJSCExecutor.o) readRAMBundle(std::1::unique_ptr<sFILE, int (_)(sFILE)>, RandomAccessBundleData&) in libReact.a(RCTJSCExecutor.o) RandomAccessBundleData::~RandomAccessBundleData() in libReact.a(RCTJSCExecutor.o) "operator delete(void)", referenced from: std::1::__hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::~hash_table() in libReact.a(RCTJSCExecutor.o) std::1::hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::deallocate(std::1::hash_node<std::1::hash_valuetype<unsigned long, unsigned long>, void>_) in libReact.a(RCTJSCExecutor.o) std::1::pair<std::1::__hash_iterator<std::1::hash_node<std::1::hash_valuetype<unsigned long, unsigned long>, void>_>, bool> std::1::hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::insert_unique<std::1::pair<unsigned long const, unsigned long> const&>(std::1::pair<unsigned long const, unsigned long> const&&&) in libReact.a(RCTJSCExecutor.o) std::1::unique_ptr<std::1::hash_node<std::1::hash_valuetype<unsigned long, unsigned long>, void>, std::1::hash_node_destructor<std::1::allocator<std::1::hash_node<std::1::hash_valuetype<unsigned long, unsigned long>, void> > > > std::1::hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::construct_node<std::1::pair<unsigned long const, unsigned long> const&>(std::1::pair<unsigned long const, unsigned long> const&&&) in libReact.a(RCTJSCExecutor.o) std::1::hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::rehash(unsigned long) in libReact.a(RCTJSCExecutor.o) std::1::hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::erase(std::1::hash_const_iterator<std::1::__hash_node<std::1::hash_valuetype<unsigned long, unsigned long>, void>>) in libReact.a(RCTJSCExecutor.o) "operator new[](unsigned long)", referenced from: executeRandomAccessModule(RCTJSCExecutor, unsigned int, unsigned long, unsigned long) in libReact.a(RCTJSCExecutor.o) readRAMBundle(std::__1::unique_ptr<sFILE, int (_)(sFILE_)>, RandomAccessBundleData&) in libReact.a(RCTJSCExecutor.o) "operator new(unsigned long)", referenced from: std::__1::unique_ptr<std::1::hash_node<std::1::hash_valuetype<unsigned long, unsigned long>, void>, std::1::hash_node_destructor<std::1::allocator<std::1::hash_node<std::1::hash_valuetype<unsigned long, unsigned long>, void> > > > std::1::hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::construct_node<std::1::pair<unsigned long const, unsigned long> const&>(std::1::pair<unsigned long const, unsigned long> const&&&) in libReact.a(RCTJSCExecutor.o) std::1::hash_table<std::1::hash_value_type<unsigned long, unsigned long>, std::1::unordered_map_hasher<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::hash, true>, std::1::unordered_map_equal<unsigned long, std::1::hash_value_type<unsigned long, unsigned long>, std::1::equal_to, true>, std::1::allocator<std::1::hash_value_type<unsigned long, unsigned long> > >::rehash(unsigned long) in libReact.a(RCTJSCExecutor.o) "_cxa_begincatch", referenced from: clang_call_terminate in libReact.a(RCTJSCExecutor.o) "___gxx_personalityv0", referenced from: -[RCTJavaScriptContext initWithJSContext:onThread:] in libReact.a(RCTJSCExecutor.o) -[RCTJavaScriptContext init] in libReact.a(RCTJSCExecutor.o) -[RCTJavaScriptContext invalidate] in libReact.a(RCTJSCExecutor.o) -[RCTJSCExecutor errorForJSError:] in libReact.a(RCTJSCExecutor.o) RCTNSErrorFromJSError(RCTJSCWrapper, OpaqueJSContext const, OpaqueJSValue const) in libReact.a(RCTJSCExecutor.o) +[RCTJSCExecutor runRunLoopThread] in libReact.a(RCTJSCExecutor.o) -[RCTJSCExecutor setBridge:] in libReact.a(RCTJSCExecutor.o) ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

\ BUILD FAILED **

zhangtaii commented 8 years ago

Try ⌘⌥⇧K, or select Product > (Hold ⌥ Key) and select Clean Build Folder, , if it not helps, you can check facebook/react-native#8880 to get more idea.

tdurand commented 8 years ago

Thanks, this did fix it: https://github.com/facebook/react-native/issues/8880#issuecomment-236994554