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 `mempool_del' #18

Open
JinBoZi opened this issue Dec 16, 2019 · 7 comments
Open

undefined reference to `mempool_del' #18

JinBoZi opened this issue Dec 16, 2019 · 7 comments

Comments

@JinBoZi
Copy link

JinBoZi commented Dec 16, 2019

when I make libibverbs-1.2.1mlnx1,I I ran into this problem,I hope can get your help,thanks!

CCLD examples/ibv_devices
./src/.libs/libibverbs.so: undefined reference to `mempool_del'
./src/.libs/libibverbs.so: undefined reference to `mempool_insert'
./src/.libs/libibverbs.so: undefined reference to `mempool_create'
./src/.libs/libibverbs.so: undefined reference to `mempool_get'

my OS is ubuntu18.04 server,the docker container also is ubuntu18.04,download from http://hub-mirror.c.163.com
The driver is MLNX_OFED_LINUX-4.7-1.0.0.1-ubuntu18.04-x86_64

your build-client.sh just have make and make install,but there is not Makefile under the folder.so,I need to ./autogen.sh and ./configure --prefix=/usr/ --libdir=/usr/lib/ --sysconfdir=/etc/ .I will encounter many other problem,but I have slove.This problem I can't slove,so I have to ask for your help.Thanks your help!

@bobzhuyb
Copy link
Contributor

bobzhuyb commented Dec 16, 2019

https://github.com/microsoft/Freeflow/tree/master/libmempool
Can you make the code in this folder and make sure the .so is in your library path?

@JinBoZi
Copy link
Author

JinBoZi commented Dec 16, 2019

https://github.com/microsoft/Freeflow/tree/master/libmempool
Can you make the code in this folder and make sure the .so is in your library path?

image
Thanks your help! I think i have make libmempool and cp it to my library path

@JinBoZi
Copy link
Author

JinBoZi commented Dec 16, 2019

https://github.com/microsoft/Freeflow/tree/master/libmempool
Can you make the code in this folder and make sure the .so is in your library path?

This two file may have some help to you.
stdout.docx
Makefile.txt

@bobzhuyb
Copy link
Contributor

bobzhuyb commented Dec 16, 2019

The error happens during CCLD (instead of runtime), so I don't think LD_LIBRARY_PATH matters. You need to make sure the .so is in gcc search path, or you specify it in the Makefile for examples/ibv_devices, like -L for gcc, or specify LIBRARY_PATH (which may pollute your compilation though). Also, it seems to me that your main target ./src/.libs/libibverbs.so has been built already. So, maybe you can ignore the error of building examples..

@JinBoZi
Copy link
Author

JinBoZi commented Dec 16, 2019

Thanks for your advice
1.make sure the .so is in gcc search path
I use cmd : cpp -v /dev/null -o /dev/null,find the /usr/include is gcc search path.so,I cp /usr/lib/libmempool.so /usr/include/ . But it is don't work.
2.specify LIBRARY_PATH
I try to export LIBRARY_PATH=/usr/lib. It is also don't work.
3.How to specify it in the Makefile?

I want to ignore the error of building examples.But how can I make install libibverbs-1.2.1mlnx1?And it seems that librdmacm-1.1.0mlnx need libibverbs.so.

The error happens during CCLD (instead of runtime), so I don't think LD_LIBRARY_PATH matters. You need to make sure the .so is in gcc search path, or you specify it in the Makefile for examples/ibv_devices, like -L for gcc, or specify LIBRARY_PATH (which may pollute your compilation though). Also, it seems to me that your main target ./src/.libs/libibverbs.so has been built already. So, maybe you can ignore the error of building examples..

@JinBoZi
Copy link
Author

JinBoZi commented Dec 17, 2019

The error happens during CCLD (instead of runtime), so I don't think LD_LIBRARY_PATH matters. You need to make sure the .so is in gcc search path, or you specify it in the Makefile for examples/ibv_devices, like -L for gcc, or specify LIBRARY_PATH (which may pollute your compilation though). Also, it seems to me that your main target ./src/.libs/libibverbs.so has been built already. So, maybe you can ignore the error of building examples..

can you give me some other suggestion?I want to ignore the error of building examples.so,I make the librdmacm-1.1.0mlnx,but encounter new problem:
configure: error: ibv_cmd_open_xrcd() not found. librdmacm requires libibverbs 1.1.8 or later.

@planetA
Copy link

planetA commented Jan 6, 2021

@JinBoZi

Try adding this to every configure:

./configure --prefix=/usr LIBS="-lmempool -lrt"

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

No branches or pull requests

3 participants