When I'm trying to send reference to two vectors like that:
void listenMsg(int socket, vector<string>&vector, vector<int>&size){
/../
}
void letsGo(int socket){
vector<string> v;
vector<int> size;
thread(listenMsg, socket, ref(v), ref(size)). detach();
}
compiler gives me an error:
/home/volenko/CLionProjects/tcp_second_try/main.cpp:258:51: error: ‘vector’ is not a type
void listenMsg(int socket, vector<string>&vector, vector<int>&size){
^~~~~~
/home/volenko/CLionProjects/tcp_second_try/main.cpp:258:57: error: expected ‘,’ or ‘...’ before ‘<’ token
void listenMsg(int socket, vector<string>&vector, vector<int>&size){
^
In file included from /home/volenko/CLionProjects/tcp_second_try/main.cpp:12:0:
/usr/include/c++/7/thread: In instantiation of ‘struct std::thread::_Invoker<std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >’:
/usr/include/c++/7/thread:127:22: required from ‘std::thread::thread(_Callable&&, _Args&& ...) [with _Callable = void (&)(int, std::vector<std::__cxx11::basic_string<char> >&, int); _Args = {int&, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > >}]’
/home/volenko/CLionProjects/tcp_second_try/main.cpp:455:47: required from here
/usr/include/c++/7/thread:240:2: error: no matching function for call to ‘std::thread::_Invoker<std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >::_M_invoke(std::thread::_Invoker<std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >::_Indices)’
operator()()
^~~~~~~~
/usr/include/c++/7/thread:231:4: note: candidate: template<long unsigned int ..._Ind> decltype (std::__invoke((_S_declval<_Ind>)()...)) std::thread::_Invoker<_Tuple>::_M_invoke(std::_Index_tuple<_Ind ...>) [with long unsigned int ..._Ind = {_Ind ...}; _Tuple = std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > >]
_M_invoke(_Index_tuple<_Ind...>)
^~~~~~~~~
/usr/include/c++/7/thread:231:4: note: template argument deduction/substitution failed:
/usr/include/c++/7/thread: In substitution of ‘template<long unsigned int ..._Ind> decltype (std::__invoke(_S_declval<_Ind>()...)) std::thread::_Invoker<std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >::_M_invoke<_Ind ...>(std::_Index_tuple<_Ind1 ...>) [with long unsigned int ..._Ind = {0, 1, 2, 3}]’:
/usr/include/c++/7/thread:240:2: required from ‘struct std::thread::_Invoker<std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >’
/usr/include/c++/7/thread:127:22: required from ‘std::thread::thread(_Callable&&, _Args&& ...) [with _Callable = void (&)(int, std::vector<std::__cxx11::basic_string<char> >&, int); _Args = {int&, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > >}]’
/home/volenko/CLionProjects/tcp_second_try/main.cpp:455:47: required from here
/usr/include/c++/7/thread:233:29: error: no matching function for call to ‘__invoke(std::__tuple_element_t<0, std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >, std::__tuple_element_t<1, std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >, std::__tuple_element_t<2, std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >, std::__tuple_element_t<3, std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >)’
-> decltype(std::__invoke(_S_declval<_Ind>()...))
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/tuple:41:0,
from /usr/include/c++/7/bits/unique_ptr.h:37,
from /usr/include/c++/7/memory:80,
from /usr/include/c++/7/thread:39,
from /home/volenko/CLionProjects/tcp_second_try/main.cpp:12:
/usr/include/c++/7/bits/invoke.h:89:5: note: candidate: template<class _Callable, class ... _Args> constexpr typename std::__invoke_result<_Functor, _ArgTypes>::type std::__invoke(_Callable&&, _Args&& ...)
__invoke(_Callable&& __fn, _Args&&... __args)
^~~~~~~~
/usr/include/c++/7/bits/invoke.h:89:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/invoke.h: In substitution of ‘template<class _Callable, class ... _Args> constexpr typename std::__invoke_result<_Functor, _ArgTypes>::type std::__invoke(_Callable&&, _Args&& ...) [with _Callable = void (*)(int, std::vector<std::__cxx11::basic_string<char> >&, int); _Args = {int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > >}]’:
/usr/include/c++/7/thread:233:29: required by substitution of ‘template<long unsigned int ..._Ind> decltype (std::__invoke(_S_declval<_Ind>()...)) std::thread::_Invoker<std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >::_M_invoke<_Ind ...>(std::_Index_tuple<_Ind1 ...>) [with long unsigned int ..._Ind = {0, 1, 2, 3}]’
/usr/include/c++/7/thread:240:2: required from ‘struct std::thread::_Invoker<std::tuple<void (*)(int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > > >’
/usr/include/c++/7/thread:127:22: required from ‘std::thread::thread(_Callable&&, _Args&& ...) [with _Callable = void (&)(int, std::vector<std::__cxx11::basic_string<char> >&, int); _Args = {int&, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > >}]’
/home/volenko/CLionProjects/tcp_second_try/main.cpp:455:47: required from here
/usr/include/c++/7/bits/invoke.h:89:5: error: no type named ‘type’ in ‘struct std::__invoke_result<void (*)(int, std::vector<std::__cxx11::basic_string<char> >&, int), int, std::reference_wrapper<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::reference_wrapper<std::vector<int, std::allocator<int> > > >’
but when I swap them like that:
void listenMsg(int socket, vector<int>&size, vector<string>&vector){
/../
}
void letsGo(int socket){
vector<string> v;
vector<int> size;
thread(listenMsg, socket, ref(size), ref(v)). detach();
}
compiler says nothing. I'm worried about some kind of leaks or even worse problems which I won't be able to notice. Can somebody explain what's going on?
Compiling with:
g++ -Wall -g -std=c++17 -pthread main.cpp
I don't know about why you do or do not get a compile-time error in those two cases, but v and size are local variables in your letsGo() function. They will be destroyed as soon as letsGo() returns. That will be approximately the same time as when your listenMsg() thread starts to run.
Related
I have a project that uses Boost, with CMake for the build system. The first time that I try to compile the ALL_BUILD after CMake generation, it fails while linking with a LNK2019 error and 2 LNK2001 errors - but if I make any modification to the CMakeLists.txt (even just adding a space) and compile again, it works just fine.
Here's my CMakeLists.txt (Updated):
project(OurProject)
set(CMAKE_MFC_FLAG 2)
file(GLOB_RECURSE sources
*.c
*.cpp
*.cc)
file(GLOB_RECURSE headers
*.h
*.hpp
*.inl)
file(GLOB_RECURSE resources
*.rc)
file(GLOB_RECURSE definitions
*.def)
set_source_files_properties(${resources} PROPERTIES LANGUAGE RC)
add_library(OurProject SHARED ${sources} ${headers} ${resources} ${definitions})
target_compile_options(OurProject
PRIVATE
-D_CRT_SECURE_NO_WARNINGS
-DNO_WARN_MBCS_MFC_DEPRECATION
)
find_package(Boost REQUIRED COMPONENTS filesystem thread regex)
add_subdirectory(../ourLib ourLib)
target_link_libraries(OurProject
PRIVATE
ourLib
Boost::regex
Boost::filesystem
Boost::thread
)
And these are the three errors it comes up with:
LNK2019 unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception#boost##YAXAEBVexception#std###Z) referenced in function "public: __cdecl boost::detail::shared_count::shared_count<class boost::io::basic_altstringbuf<char,struct std::char_traits<char>,class std::allocator<char> > *,class boost::io::basic_oaltstringstream<char,struct std::char_traits<char>,class std::allocator<char> >::No_Op>(class boost::io::basic_altstringbuf<char,struct std::char_traits<char>,class std::allocator<char> > *,class boost::io::basic_oaltstringstream<char,struct std::char_traits<char>,class std::allocator<char> >::No_Op)" (??$?0PEAV?$basic_altstringbuf#DU?$char_traits#D#std##V?$allocator#D#2##io#boost##VNo_Op#?$basic_oaltstringstream#DU?$char_traits#D#std##V?$allocator#D#2##12##shared_count#detail#boost##QEAA#PEAV?$basic_altstringbuf#DU?$char_traits#D#std##V?$allocator#D#2##io#2#VNo_Op#?$basic_oaltstringstream#DU?$char_traits#D#std##V?$allocator#D#2##42##Z)
LNK2001 unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception#boost##YAXAEBVexception#std###Z)
LNK2001 unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception#boost##YAXAEBVexception#std###Z)
Update 2: The CMakeLists of ourLib.
include_guard(GLOBAL)
project(ourLib)
set(CMAKE_MFC_FLAG 2)
add_library(ourLib
src/ourLibSource.cpp
include/ourLibHeader.h
)
target_include_directories(ourLib
PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_compile_options(ourLib
PUBLIC
-D_AFXDLL
-D_AFXEXT
PRIVATE
-D_CRT_SECURE_NO_WARNINGS
-DNO_WARN_MBCS_MFC_DEPRECATION
)
When building the following Android-NDK project I am getting dozens of undefined reference errors regarding missing standard library functions. I followed some basic examples of linking static libraries and restarted this project from scratch 3 times but I still can't find the issue. I am trying to use the lib_seal library that I compiled using -std=c++1z. (https://www.microsoft.com/en-us/research/project/simple-encrypted-arithmetic-library/).
The errors I am getting indicate the library is linked properly but according to many references online it cannot find -lstdc++ (One example recommending this is here: undefined reference to `std::ios_base::Init::Init()'). I have added this in my CMakeLists.txt under target_link_libraries, and I have tried editing the gradle file to include cppFlags = "-std=c++1z", "-std=c++11", "-lstdc++" etc. I have also tried adding arguments "-DANDROID_STL=c++_shared".
The following is from the closest I can seem to get this to compile and link:
CMakeLists.txt:
# Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.4.1)
add_library(lib_seal STATIC IMPORTED)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.
add_library( # Sets the name of the library.
native-lib
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
src/main/cpp/native-lib.cpp)
# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.
find_library( # Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log)
set_target_properties(lib_seal PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/libs/seal/${ANDROID_ABI}/lib/libseal.a)
target_include_directories(native-lib PRIVATE
${CMAKE_SOURCE_DIR}/libs/seal/${ANDROID_ABI}/include)
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries(native-lib
stdc++
lib_seal
${log-lib})
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.wyoumans.sealapp"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-std=c++1z"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
splits {
abi {
enable true
reset()
include "x86_64"
universalApk false
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
native-lib.cpp:
#include <jni.h>
#include <string>
#include "seal/seal.h"
extern "C" JNIEXPORT jstring JNICALL
Java_com_example_wyoumans_sealapp_MainActivity_stringFromJNI(
JNIEnv *env,
jobject /* this */) {
seal::EncryptionParameters params;
std::string hello = "Set params!";
return env->NewStringUTF(hello.c_str());
}
Error message:
Build command failed.
Error while executing process /home/wyoumans/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /home/wyoumans/AndroidStudioProjects/SEALApp/app/.externalNativeBuild/cmake/debug/x86_64 --target native-lib}
[1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
[2/2] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/x86_64/libnative-lib.so
FAILED: : && /home/wyoumans/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=x86_64-none-linux-android21 --gcc-toolchain=/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64 --sysroot=/home/wyoumans/Android/Sdk/ndk-bundle/sysroot -fPIC -isystem /home/wyoumans/Android/Sdk/ndk-bundle/sysroot/usr/include/x86_64-linux-android -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -std=c++11 -std=c++1z -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++ --sysroot /home/wyoumans/Android/Sdk/ndk-bundle/platforms/android-21/arch-x86_64 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -L/home/wyoumans/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86_64 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libnative-lib.so -o ../../../../build/intermediates/cmake/debug/obj/x86_64/libnative-lib.so CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -lstdc++ ../../../../libs/seal/x86_64/lib/libseal.a /home/wyoumans/Android/Sdk/ndk-bundle/platforms/android-21/arch-x86_64/usr/lib64/liblog.so -latomic -lm "/home/wyoumans/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_static.a" "/home/wyoumans/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++abi.a" && :
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::save(std::ostream&) const: error: undefined reference to 'std::ostream::write(char const*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::save(std::ostream&) const: error: undefined reference to 'std::ostream::write(char const*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::save(std::ostream&) const: error: undefined reference to 'std::ostream::write(char const*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::alias(int, int, unsigned long*): error: undefined reference to 'std::invalid_argument::invalid_argument(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::alias(int, int, unsigned long*): error: undefined reference to 'std::invalid_argument::invalid_argument(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::alias(int, int, unsigned long*): error: undefined reference to 'std::invalid_argument::invalid_argument(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::alias(int, int, unsigned long*): error: undefined reference to 'std::invalid_argument::invalid_argument(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::operator=(seal::BigPoly const&): error: undefined reference to 'std::out_of_range::out_of_range(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::operator=(seal::BigPoly const&): error: undefined reference to 'std::out_of_range::out_of_range(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::load(std::istream&): error: undefined reference to 'std::istream::read(char*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::load(std::istream&): error: undefined reference to 'std::istream::read(char*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::load(std::istream&): error: undefined reference to 'std::istream::read(char*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::BigPoly::load(std::istream&): error: undefined reference to 'std::istream::read(char*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function std::vector<seal::BigUInt, std::allocator<seal::BigUInt> >::_M_default_append(unsigned long): error: undefined reference to 'std::__throw_length_error(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&): error: undefined reference to 'std::__throw_length_error(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::ios_base::ios_base()'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::basic_ios<char, std::char_traits<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::basic_streambuf<char, std::char_traits<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::locale::locale()'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::basic_streambuf<char, std::char_traits<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::locale::~locale()'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'VTT for std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::basic_ios<char, std::char_traits<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::ios_base::~ios_base()'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::ostream::operator<<(int)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::basic_streambuf<char, std::char_traits<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::locale::~locale()'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'vtable for std::basic_ios<char, std::char_traits<char> >'
/home/wyoumans/Android/Sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: the vtable symbol may be undefined because the class is missing its key function
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::ios_base::~ios_base()'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::__throw_logic_error(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::__throw_logic_error(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::__throw_length_error(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function seal::util::poly_to_hex_string[abi:cxx11](unsigned long const*, int, int): error: undefined reference to 'std::__throw_length_error(char const*)'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function _GLOBAL__sub_I_bigpoly.cpp: error: undefined reference to 'std::ios_base::Init::Init()'
../../../../libs/seal/x86_64/lib/libseal.a(bigpoly.cpp.o):bigpoly.cpp:function _GLOBAL__sub_I_bigpoly.cpp: error: undefined reference to 'std::ios_base::Init::~Init()'
../../../../libs/seal/x86_64/lib/libseal.a(biguint.cpp.o):biguint.cpp:function seal::BigUInt::save(std::ostream&) const: error: undefined reference to 'std::ostream::write(char const*, long)'
../../../../libs/seal/x86_64/lib/libseal.a(biguint.cpp.o):biguint.cpp:function _GLOBAL__sub_I_biguint.cpp: error: undefined reference to 'std::ios_base::Init::Init()'
../../../../libs/seal/x86_64/lib/libseal.a(biguint.cpp.o):biguint.cpp:function _GLOBAL__sub_I_biguint.cpp: error: undefined reference to 'std::ios_base::Init::~Init()'
../../../../libs/seal/x86_64/lib/libseal.a(encryptionparams.cpp.o):encryptionparams.cpp:function _GLOBAL__sub_I_encryptionparams.cpp: error: undefined reference to 'std::ios_base::Init::Init()'
../../../../libs/seal/x86_64/lib/libseal.a(encryptionparams.cpp.o):encryptionparams.cpp:function _GLOBAL__sub_I_encryptionparams.cpp: error: undefined reference to 'std::ios_base::Init::~Init()'
../../../../libs/seal/x86_64/lib/libseal.a(smallmodulus.cpp.o):smallmodulus.cpp:function _GLOBAL__sub_I_smallmodulus.cpp: error: undefined reference to 'std::ios_base::Init::Init()'
../../../../libs/seal/x86_64/lib/libseal.a(smallmodulus.cpp.o):smallmodulus.cpp:function _GLOBAL__sub_I_smallmodulus.cpp: error: undefined reference to 'std::ios_base::Init::~Init()'
../../../../libs/seal/x86_64/lib/libseal.a(globals.cpp.o):globals.cpp:function std::map<int, std::vector<seal::SmallModulus, std::allocator<seal::SmallModulus> >, std::less<int>, std::allocator<std::pair<int const, std::vector<seal::SmallModulus, std::allocator<seal::SmallModulus> > > > >::map(std::initializer_list<std::pair<int const, std::vector<seal::SmallModulus, std::allocator<seal::SmallModulus> > > >, std::less<int> const&, std::allocator<std::pair<int const, std::vector<seal::SmallModulus, std::allocator<seal::SmallModulus> > > > const&): error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
../../../../libs/seal/x86_64/lib/libseal.a(globals.cpp.o):globals.cpp:function std::map<int, std::vector<seal::SmallModulus, std::allocator<seal::SmallModulus> >, std::less<int>, std::allocator<std::pair<int const, std::vector<seal::SmallModulus, std::allocator<seal::SmallModulus> > > > >::map(std::initializer_list<std::pair<int const, std::vector<seal::SmallModulus, std::allocator<seal::SmallModulus> > > >, std::less<int> const&, std::allocator<std::pair<int const, std::vector<seal::SmallModulus, std::allocator<seal::SmallModulus> > > > const&): error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
../../../../libs/seal/x86_64/lib/libseal.a(mempool.cpp.o):mempool.cpp:function seal::util::MemoryPoolMT::alloc_uint64_count() const [clone .localalias.53]: error: undefined reference to 'std::__throw_system_error(int)'
../../../../libs/seal/x86_64/lib/libseal.a(mempool.cpp.o):mempool.cpp:function seal::util::MemoryPoolMT::~MemoryPoolMT(): error: undefined reference to 'std::__throw_system_error(int)'
../../../../libs/seal/x86_64/lib/libseal.a(mempool.cpp.o):mempool.cpp:function seal::util::MemoryPoolMT::get_for_uint64_count(long): error: undefined reference to 'std::__throw_system_error(int)'
../../../../libs/seal/x86_64/lib/libseal.a(mempool.cpp.o):mempool.cpp:function seal::util::MemoryPoolMT::pool_count() const: error: undefined reference to 'std::__throw_system_error(int)'
../../../../libs/seal/x86_64/lib/libseal.a(uintarith.cpp.o):uintarith.cpp:function seal::util::divide_uint_uint_inplace(unsigned long*, seal::util::Modulus const&, int, unsigned long*, seal::util::MemoryPool&): error: undefined reference to 'std::__throw_bad_function_call()'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Just a couple notes: I need to use -std=c++1z to use the SEAL library (or -std=gnu++1z), and towards the end of the gradle file I am specifically allowing only x86_64 architecture since I don't want to worry about cross-compiling anything until I get this working.
It looks like libseal was built with an older NDK using GNU's libstdc++ (gnustl in NDK parlance). GNU's libstdc++ is no longer included in NDK r18. You need to either rebuild libseal with libc++ or downgrade your NDK.
Below errors happens in mac OS X 10.10, while trying to compile linux-made code in mac...
I located dlib as below, and it seems the compiler finds the dlib properly.
set (DLIB_INCLUDE_DIR "/usr/local/Cellar/dlib/19.15/include")
set (DLIB_LIB_DIR "/usr/local/Cellar/dlib/19.15/lib")
Is there any compatibility issue even using same dlib?
Undefined symbols for architecture x86_64:
"cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)", referenced from:
_main in main.cpp.o
"dlib::entropy_decoder_kernel_2::set_stream(std::basic_istream<char, std::char_traits<char> >&)", referenced from:
dlib::get_serialized_frontal_faces[abi:cxx11]() in libPoseExprLib.a(DlibWrapper.cpp.o)
"H5::H5Location::openDataSet(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const", referenced from:
readH5Dataset(H5::H5File const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libPoseExprLib.a(BaselFace.cpp.o)
"H5::Exception::getDetailMsg[abi:cxx11]() const", referenced from:
BaselFace::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .cold.29] in libPoseExprLib.a(BaselFace.cpp.o)
"dlib::base64::decode(std::basic_istream<char, std::char_traits<char> >&, std::basic_ostream<char, std::char_traits<char> >&) const", referenced from:
dlib::get_serialized_frontal_faces[abi:cxx11]() in libPoseExprLib.a(DlibWrapper.cpp.o)
"std::__1::__basic_string_common<true>::__throw_length_error() const", referenced from:
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str() const in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::locale::use_facet(std::__1::locale::id&) const", referenced from:
dlib::fatal_error::check_for_previous_fatal_errors() in libdlib.a(base64_kernel_1.cpp.o)
dlib::fatal_error::dlib_fatal_error_terminate() in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::ios_base::getloc() const", referenced from:
dlib::fatal_error::check_for_previous_fatal_errors() in libdlib.a(base64_kernel_1.cpp.o)
dlib::fatal_error::dlib_fatal_error_terminate() in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::resize(unsigned long, char)", referenced from:
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::overflow(int) in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::push_back(char)", referenced from:
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::overflow(int) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
dlib::error::error(dlib::error_type, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libdlib.a(base64_kernel_1.cpp.o)
dlib::error::error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)", referenced from:
dlib::fatal_error::check_for_previous_fatal_errors() in libdlib.a(base64_kernel_1.cpp.o)
dlib::fatal_error::dlib_fatal_error_terminate() in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()", referenced from:
dlib::fatal_error::check_for_previous_fatal_errors() in libdlib.a(base64_kernel_1.cpp.o)
dlib::fatal_error::dlib_fatal_error_terminate() in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(int)", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::sync()", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::imbue(std::__1::locale const&)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::uflow()", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::setbuf(char*, long)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::xsgetn(char*, long)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::xsputn(char const*, long)", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::showmanyc()", referenced from:
vtable for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::basic_streambuf()", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_streambuf<char, std::__1::char_traits<char> >::~basic_streambuf()", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_stringbuf() in libdlib.a(base64_kernel_1.cpp.o)
...
"std::__1::iostream_category()", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::cerr", referenced from:
dlib::fatal_error::check_for_previous_fatal_errors() in libdlib.a(base64_kernel_1.cpp.o)
dlib::fatal_error::dlib_fatal_error_terminate() in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::ctype<char>::id", referenced from:
dlib::fatal_error::check_for_previous_fatal_errors() in libdlib.a(base64_kernel_1.cpp.o)
dlib::fatal_error::dlib_fatal_error_terminate() in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::locale::~locale()", referenced from:
dlib::fatal_error::check_for_previous_fatal_errors() in libdlib.a(base64_kernel_1.cpp.o)
dlib::fatal_error::dlib_fatal_error_terminate() in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::ios_base::__set_badbit_and_consider_rethrow()", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::ios_base::init(void*)", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::ios_base::clear(unsigned int)", referenced from:
std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::ios_base::failure::failure(char const*, std::__1::error_code const&)", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::ios_base::failure::~failure()", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
"std::__1::basic_ios<char, std::__1::char_traits<char> >::~basic_ios()", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
virtual thunk to std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_ostringstream() in libdlib.a(base64_kernel_1.cpp.o)
"typeinfo for std::__1::basic_ostream<char, std::__1::char_traits<char> >", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
typeinfo for std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"typeinfo for std::__1::basic_streambuf<char, std::__1::char_traits<char> >", referenced from:
typeinfo for std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"typeinfo for std::__1::ios_base::failure", referenced from:
dlib::base64::encode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
dlib::base64::decode(std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const in libdlib.a(base64_kernel_1.cpp.o)
"virtual thunk to std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"virtual thunk to std::__1::basic_ostream<char, std::__1::char_traits<char> >::~basic_ostream()", referenced from:
construction vtable for std::__1::basic_ostream<char, std::__1::char_traits<char> >-in-std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> > in libdlib.a(base64_kernel_1.cpp.o)
"_dgesdd_", referenced from:
int dlib::lapack::gesdd<double, 0l, 2l, 2l, 0l, 0l, 1l, 2l, 0l, dlib::memory_manager_stateless_kernel_1<char> >(char, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 2l, 1l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 2l, 2l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&) in libPoseExprLib.a(DlibWrapper.cpp.o)
"_dgesvd_", referenced from:
int dlib::lapack::gesvd<double, 0l, 3l, 0l, 3l, 3l, 1l, 3l, 3l, dlib::memory_manager_stateless_kernel_1<char> >(char, char, dlib::matrix<double, 0l, 3l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 3l, 1l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 0l, 3l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 3l, 3l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&) in libPoseExprLib.a(DlibWrapper.cpp.o)
int dlib::lapack::gesvd<double, 3l, 0l, 3l, 0l, 0l, 1l, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char> >(char, char, dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 0l, 1l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 3l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&) in libPoseExprLib.a(DlibWrapper.cpp.o)
int dlib::lapack::gesvd<double, 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char> >(char, char, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&) in libPoseExprLib.a(DlibWrapper.cpp.o)
int dlib::lapack::gesvd<double, 0l, 2l, 2l, 0l, 0l, 1l, 2l, 0l, dlib::memory_manager_stateless_kernel_1<char> >(char, char, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 2l, 1l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 2l, 2l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&, dlib::matrix<double, 0l, 0l, dlib::memory_manager_stateless_kernel_1<char>, dlib::row_major_layout>&) in libPoseExprLib.a(DlibWrapper.cpp.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Whenever I compile my code, g++ returns this error message (this is just a segement. The rest is more of the same):
text.cpp:(.text+0x2b82): undefined reference to `parser(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccSFOyBc.o:text.cpp:(.text+0x2c3c): more undefined references to `parser(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' follow
/tmp/ccSFOyBc.o: In function `main':
text.cpp:(.text+0x2f02): undefined reference to `contains(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
text.cpp:(.text+0x30d2): undefined reference to `contains(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
Parser and contains are both functions I created that exist in the program. I heard this issue occurs when you do not link libraries or forgetting to link multiple files together, but I am only using one file (text.cpp) and have one library (-lncurses), and these errors occur with functions I have defined in the program.
I compile with g++ text.cpp -lncurses. I am using Fedora Linux 24 with the latest g++.
Snippet:
Functions in question:
void fight(vector<string> *i);
bool contains(vector<string> *v, string s);
bool parser(int a, string s);
void printinventory(vector<string> *i);
Contains:
bool contains(vector<string> v, string s)
{
for(unsigned int i=0; i < v.size(); i++)
{
if(v.at(i)==s)
{
return true;
break;
}
}
return false;
}
Function Calls (Both parser and contains are referenced in the first two lines of the error output at this location):
if(parser(6, stringinput) && contains(inventory, "Planck Plank") && currx == 0 && curry == 1 && currz == 2 && !planklaids) {
Any idea what this means?
I reference bool contains(vector<string> *v, string s); at the top but my function bool contains(vector<string> v, string s) does not take a pointer variable. Code was fixed when I made my function at the bottom have the parameters indicated at the top.
I have installed Cmake through brew and looked through the bug tracker and SO for other people with this issue and I haven't found anyone that has my issue. Here's the bug from the output:
Linking CXX shared library /Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so
ld: warning: ignoring file ../clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.3.7, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): ../clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.3.7
Undefined symbols for architecture x86_64:
"_clang_Comment_getKind", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_CompilationDatabase_dispose", referenced from:
YouCompleteMe::CompilationDatabase::~CompilationDatabase() in CompilationDatabase.cpp.obj
YouCompleteMe::CompilationDatabase::~CompilationDatabase() in CompilationDatabase.cpp.obj
"_clang_CompilationDatabase_fromDirectory", referenced from:
YouCompleteMe::CompilationDatabase::CompilationDatabase(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompilationDatabase_getCompileCommands", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommand_getArg", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommand_getDirectory", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommand_getNumArgs", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommands_dispose", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommands_getCommand", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_CompileCommands_getSize", referenced from:
YouCompleteMe::CompilationDatabase::GetCompilationInfoForFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CompilationDatabase.cpp.obj
"_clang_Cursor_getBriefCommentText", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_Cursor_getParsedComment", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_Cursor_getRawCommentText", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_Cursor_isNull", referenced from:
YouCompleteMe::CursorIsValid(CXCursor) in ClangUtils.cpp.obj
"_clang_FullComment_getAsXML", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_codeCompleteAt", referenced from:
YouCompleteMe::TranslationUnit::CandidatesForLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&) in TranslationUnit.cpp.obj
"_clang_createIndex", referenced from:
YouCompleteMe::ClangCompleter::ClangCompleter() in ClangCompleter.cpp.obj
YouCompleteMe::ClangCompleter::ClangCompleter() in ClangCompleter.cpp.obj
"_clang_defaultCodeCompleteOptions", referenced from:
YouCompleteMe::TranslationUnit::CandidatesForLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&) in TranslationUnit.cpp.obj
"_clang_defaultDiagnosticDisplayOptions", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_defaultEditingTranslationUnitOptions", referenced from:
YouCompleteMe::TranslationUnit::TranslationUnit(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, void*) in TranslationUnit.cpp.obj
"_clang_defaultReparseOptions", referenced from:
YouCompleteMe::TranslationUnit::TranslationUnit(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, void*) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::Reparse(std::__1::vector<CXUnsavedFile, std::__1::allocator<CXUnsavedFile> >&) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::Reparse(std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&) in TranslationUnit.cpp.obj
"_clang_disposeCodeCompleteResults", referenced from:
YouCompleteMe::TranslationUnit::CandidatesForLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&) in TranslationUnit.cpp.obj
"_clang_disposeDiagnostic", referenced from:
YouCompleteMe::TranslationUnit::UpdateLatestDiagnostics() in TranslationUnit.cpp.obj
"_clang_disposeIndex", referenced from:
YouCompleteMe::ClangCompleter::~ClangCompleter() in ClangCompleter.cpp.obj
YouCompleteMe::ClangCompleter::~ClangCompleter() in ClangCompleter.cpp.obj
"_clang_disposeString", referenced from:
YouCompleteMe::CXStringToString(CXString) in ClangUtils.cpp.obj
"_clang_disposeTokens", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_disposeTranslationUnit", referenced from:
YouCompleteMe::TranslationUnit::Destroy() in TranslationUnit.cpp.obj
"_clang_equalTypes", referenced from:
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_formatDiagnostic", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_getCString", referenced from:
YouCompleteMe::CXStringToString(CXString) in ClangUtils.cpp.obj
"_clang_getCanonicalCursor", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCanonicalType", referenced from:
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getChildDiagnostics", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_getClangVersion", referenced from:
YouCompleteMe::ClangVersion() in ClangUtils.cpp.obj
"_clang_getCompletionAvailability", referenced from:
YouCompleteMe::ToCompletionDataVector(CXCodeCompleteResults*) in ClangHelpers.cpp.obj
"_clang_getCompletionBriefComment", referenced from:
YouCompleteMe::CompletionData::CompletionData(CXCompletionResult const&) in CompletionData.cpp.obj
"_clang_getCompletionChunkCompletionString", referenced from:
YouCompleteMe::(anonymous namespace)::OptionalChunkToString(void*, unsigned int) in CompletionData.cpp.obj
"_clang_getCompletionChunkKind", referenced from:
YouCompleteMe::CompletionData::ExtractDataFromChunk(void*, unsigned int, bool&, bool&, bool&) in CompletionData.cpp.obj
YouCompleteMe::(anonymous namespace)::OptionalChunkToString(void*, unsigned int) in CompletionData.cpp.obj
"_clang_getCompletionChunkText", referenced from:
YouCompleteMe::CompletionData::ExtractDataFromChunk(void*, unsigned int, bool&, bool&, bool&) in CompletionData.cpp.obj
YouCompleteMe::(anonymous namespace)::OptionalChunkToString(void*, unsigned int) in CompletionData.cpp.obj
"_clang_getCursor", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetCursor(int, int) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
...
"_clang_getCursorDefinition", referenced from:
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorDisplayName", referenced from:
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorExtent", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getCursorKind", referenced from:
YouCompleteMe::CursorIsValid(CXCursor) in ClangUtils.cpp.obj
YouCompleteMe::CursorIsReference(CXCursor) in ClangUtils.cpp.obj
YouCompleteMe::CursorIsDeclaration(CXCursor) in ClangUtils.cpp.obj
"_clang_getCursorLocation", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorReferenced", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorSemanticParent", referenced from:
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getCursorSpelling", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
"_clang_getCursorType", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getDiagnostic", referenced from:
YouCompleteMe::TranslationUnit::UpdateLatestDiagnostics() in TranslationUnit.cpp.obj
"_clang_getDiagnosticFixIt", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticInSet", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticLocation", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticNumFixIts", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticNumRanges", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticRange", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticSeverity", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getDiagnosticSpelling", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getExpansionLocation", referenced from:
YouCompleteMe::Location::Location(CXSourceLocation const&) in ClangHelpers.cpp.obj
YouCompleteMe::Location::Location(CXSourceLocation const&) in Range.cpp.obj
YouCompleteMe::Location::Location(CXSourceLocation const&) in TranslationUnit.cpp.obj
"_clang_getFile", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetCursor(int, int) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getFileName", referenced from:
YouCompleteMe::CXFileToFilepath(void*) in ClangUtils.cpp.obj
"_clang_getLocation", referenced from:
YouCompleteMe::TranslationUnit::GetDeclarationLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetCursor(int, int) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDefinitionLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetEnclosingFunctionAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
YouCompleteMe::TranslationUnit::GetDocsForLocationInFile(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_getNullCursor", referenced from:
YouCompleteMe::TranslationUnit::GetCursor(int, int) in TranslationUnit.cpp.obj
"_clang_getNumCompletionChunks", referenced from:
YouCompleteMe::CompletionData::CompletionData(CXCompletionResult const&) in CompletionData.cpp.obj
YouCompleteMe::(anonymous namespace)::OptionalChunkToString(void*, unsigned int) in CompletionData.cpp.obj
"_clang_getNumDiagnostics", referenced from:
YouCompleteMe::TranslationUnit::UpdateLatestDiagnostics() in TranslationUnit.cpp.obj
"_clang_getNumDiagnosticsInSet", referenced from:
YouCompleteMe::(anonymous namespace)::FullDiagnosticText(void*) in ClangHelpers.cpp.obj
"_clang_getRangeEnd", referenced from:
YouCompleteMe::Range::Range(CXSourceRange const&) in Range.cpp.obj
"_clang_getRangeStart", referenced from:
YouCompleteMe::Range::Range(CXSourceRange const&) in Range.cpp.obj
"_clang_getTokenLocation", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getTokenSpelling", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
"_clang_getTypeSpelling", referenced from:
YouCompleteMe::DocumentationData::DocumentationData(CXCursor const&) in Documentation.cpp.obj
YouCompleteMe::TranslationUnit::GetTypeAtLocation(int, int, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, bool) in TranslationUnit.cpp.obj
"_clang_isDeclaration", referenced from:
YouCompleteMe::CursorIsDeclaration(CXCursor) in ClangUtils.cpp.obj
"_clang_isInvalid", referenced from:
YouCompleteMe::CursorIsValid(CXCursor) in ClangUtils.cpp.obj
"_clang_isReference", referenced from:
YouCompleteMe::CursorIsReference(CXCursor) in ClangUtils.cpp.obj
"_clang_parseTranslationUnit", referenced from:
YouCompleteMe::TranslationUnit::TranslationUnit(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::vector<UnsavedFile, std::__1::allocator<UnsavedFile> > const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, void*) in TranslationUnit.cpp.obj
"_clang_reparseTranslationUnit", referenced from:
YouCompleteMe::TranslationUnit::Reparse(std::__1::vector<CXUnsavedFile, std::__1::allocator<CXUnsavedFile> >&, unsigned int) in TranslationUnit.cpp.obj
"_clang_toggleCrashRecovery", referenced from:
YouCompleteMe::ClangCompleter::ClangCompleter() in ClangCompleter.cpp.obj
YouCompleteMe::ClangCompleter::ClangCompleter() in ClangCompleter.cpp.obj
"_clang_tokenize", referenced from:
YouCompleteMe::BuildDiagnostic(boost::shared_ptr<void>, CXTranslationUnitImpl*) in ClangHelpers.cpp.obj
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so] Error 1
make[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] Error 2
make[1]: *** [ycm/CMakeFiles/ycm_support_libs.dir/rule] Error 2
make: *** [ycm_support_libs] Error 2
Traceback (most recent call last):
File "/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 327, in <module>
Main()
File "/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 316, in Main
BuildYcmdLibs( args )
File "/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py", line 261, in BuildYcmdLibs
subprocess.check_call( build_command )
File "/Users/danni/miniconda/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'ycm_support_libs', '--', '-j', '8']' returned non-zero exit status 2
Traceback (most recent call last):
File "./install.py", line 32, in <module>
Main()
File "./install.py", line 21, in Main
subprocess.check_call( [ python_binary, build_file ] + sys.argv[1:] )
File "/Users/danni/miniconda/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/danni/miniconda/bin/python', '/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py', '--clang-completer']' returned non-zero exit status 1
I just installed the newest version of Vim and CMake via brew, can anybody help me make sense of this issue?
This looks like a bug in the YouCompleteMe setup process and it is good if you report it to their issue tracker.
What makes me think so:
1) Warning at the top of your output:
Linking CXX shared library
/Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so
ld: warning: ignoring file
../clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/lib/libclang.so.3.7,
file was built for unsupported file format
2) The relevant clang version detection is here (if I am not mistaken).
And it selects the wrong clang for download (one for Ubuntu 14.04).
The logic to select clang to download is: if "APPLE" variable is defined - get mac os version if it is windows - then win version otherwise for 64 bit system use "x86_64-linux-gnu-ubuntu-14.04".
Possible workarounds:
1) If you don't need C-family completion, use ./install.py without --clang-completer flag
2) You install proper clang version manually and tell YouCompleteMe to use it.
I didn't try it, but it the command to use installed clang seems to be ./install.py --clang-completer --system-libclang.
You may already have clang installed if you have XCode. Otherwise check the full installation guide in the YCM documentation.
3) Brute force - change the YCM source to fetch the correct version. This is not very good way to solve the problem, because you will need to remove your changes before updating YCM and put them back after update, but this way you can also confirm the bug in the setup process:
Open /Users/danni/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/CMakeLists.txt
Add set( APPLE TRUE ) at the top.
Run ./install.py --clang-completer again.
Note: I didn't actually try this method, but think that it could work. If something goes wrong, try to search for other 'CMakeLists.txt' files in the ycmd folder and add set( APPLE TRUE ) to them.