Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

undefined reference to `nebula::ConnectionPool::init #115

Open
chenlinzhong opened this issue Mar 26, 2023 · 14 comments
Open

undefined reference to `nebula::ConnectionPool::init #115

chenlinzhong opened this issue Mar 26, 2023 · 14 comments
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected

Comments

@chenlinzhong
Copy link

when i try to compile the client some errors happend

[root@xafj-palo-rpm64 examples]# ll /usr/local/nebula/include/nebula/
total 24
drwxr-xr-x 2 root root 4096 Mar 26 08:09 client
drwxr-xr-x 2 root root 4096 Feb  6 06:04 common
drwxr-xr-x 2 root root 4096 Feb  6 06:04 graph
drwxr-xr-x 2 root root 4096 Mar 26 08:09 mclient
drwxr-xr-x 2 root root 4096 Mar 26 08:09 sclient
drwxr-xr-x 2 root root 4096 Feb  6 06:04 storage

[root@xafj-palo-rpm64 examples]# ll /usr/local/nebula/lib64
total 56092
-rwxr-xr-x 1 root root 12853496 Feb  6 06:04 libnebula_graph_client.so
-rwxr-xr-x 1 root root 20857576 Feb  6 06:04 libnebula_meta_client.so
-rwxr-xr-x 1 root root 23719896 Feb  6 06:04 libnebula_storage_client.so
[root@xafj-palo-rpm64 examples]# LIBRARY_PATH=/usr/local/nebula/lib64:$LIBRARY_PATH  g++ -std=c++11 SessionExample.cpp -I/usr/local/nebula/include  -lnebula_graph_client
/tmp/ccOd1hjO.o: In function `main':
SessionExample.cpp:(.text+0x253): undefined reference to `nebula::ConnectionPool::init(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> > > > const&, nebula::Config const&)'
SessionExample.cpp:(.text+0x33c): undefined reference to `nebula::ConnectionPool::getSession(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
SessionExample.cpp:(.text+0x3e7): undefined reference to `nebula::Session::execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
SessionExample.cpp:(.text+0x4ef): undefined reference to `nebula::Session::asyncExecute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void (nebula::ExecutionResponse&&)>)'
/tmp/ccOd1hjO.o: In function `nebula::operator<<(std::ostream&, nebula::Value const&)':
SessionExample.cpp:(.text._ZN6nebulalsERSoRKNS_5ValueE[_ZN6nebulalsERSoRKNS_5ValueE]+0x2f): undefined reference to `nebula::Value::toString[abi:cxx11]() const'
collect2: error: ld returned 1 exit status
@wey-gu
Copy link

wey-gu commented Mar 27, 2023

@Shylock-Hg could you please take a look at it?

@Shylock-Hg
Copy link
Contributor

Please show the compile options of nebual_graph_client library.

@chenlinzhong
Copy link
Author

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

@Shylock-Hg
Copy link
Contributor

Shylock-Hg commented Mar 27, 2023

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

@chenlinzhong
Copy link
Author

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el7.x86_64.rpm

@Shylock-Hg
Copy link
Contributor

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el7.x86_64.rpm

What's your version of OS?

@chenlinzhong
Copy link
Author

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el7.x86_64.rpm

What's your version of OS?

Linux 4.14.0_1-0-0-42 #1 SMP Tue Jul 20 16:37:22 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

@Shylock-Hg
Copy link
Contributor

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el7.x86_64.rpm

What's your version of OS?

Linux 4.14.0_1-0-0-42 #1 SMP Tue Jul 20 16:37:22 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

ok, you could try https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el8.x86_64.rpm

@chenlinzhong
Copy link
Author

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el7.x86_64.rpm

What's your version of OS?

Linux 4.14.0_1-0-0-42 #1 SMP Tue Jul 20 16:37:22 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

ok, you could try https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el8.x86_64.rpm
not ok
[root@xafj-palo-rpm64 ~]# rpm -ivh nebula-graph-client-3.4.0.el8.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.25)(64bit) is needed by nebula-graph-client-3.4.0-1.x86_64

@Shylock-Hg
Copy link
Contributor

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el7.x86_64.rpm

What's your version of OS?

Linux 4.14.0_1-0-0-42 #1 SMP Tue Jul 20 16:37:22 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

ok, you could try https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el8.x86_64.rpm
not ok
[root@xafj-palo-rpm64 ~]# rpm -ivh nebula-graph-client-3.4.0.el8.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.25)(64bit) is needed by nebula-graph-client-3.4.0-1.x86_64

Seems should build nebula-cpp in your environment, try cmake -DCMAKE_BUILD_TYPE=Release

@chenlinzhong
Copy link
Author

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el7.x86_64.rpm

What's your version of OS?

Linux 4.14.0_1-0-0-42 #1 SMP Tue Jul 20 16:37:22 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

ok, you could try https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el8.x86_64.rpm
not ok
[root@xafj-palo-rpm64 ~]# rpm -ivh nebula-graph-client-3.4.0.el8.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.25)(64bit) is needed by nebula-graph-client-3.4.0-1.x86_64

do you have docker images that include dependencys so that i can build nebula-cpp from source code directly

@chenlinzhong
Copy link
Author

Please show the compile options of nebual_graph_client library.

the nebual_graph_client was downloaded from nebula-cpp ,how can i get the compile options?

Which do you download?

https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el7.x86_64.rpm

What's your version of OS?

Linux 4.14.0_1-0-0-42 #1 SMP Tue Jul 20 16:37:22 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

ok, you could try https://github.com/vesoft-inc/nebula-cpp/releases/download/v3.4.0/nebula-graph-client-3.4.0.el8.x86_64.rpm
not ok
[root@xafj-palo-rpm64 ~]# rpm -ivh nebula-graph-client-3.4.0.el8.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.25)(64bit) is needed by nebula-graph-client-3.4.0-1.x86_64

Seems should build nebula-cpp in your environment, try cmake -DCMAKE_BUILD_TYPE=Release

i do this ,but not success, build nebula-third-party occur many errors

@wey-gu
Copy link

wey-gu commented Mar 27, 2023

Try with this image https://github.com/vesoft-inc/nebula-dev-docker

export TAG=centos8
docker run -ti \
  -v "$PWD":/home/nebula \
  -w /home/nebula \
  --name nebula_dev \
  vesoft/nebula-dev:$TAG \
  bash

all third-party things are ready there.

@wey-gu
Copy link

wey-gu commented Apr 4, 2023

@chenlinzhong I encountered this today on a CentOS 7 env that the rpm binary will suffer from issue of yours, too.

I then make instal it from the source to resolve it then.

We should fix the binary install issue @Shylock-Hg .

@wey-gu wey-gu added the type/bug Type: something is unexpected label Apr 4, 2023
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

3 participants