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

"-lrt" library not linked at the end while building pmwcas #26

Open
nisargshah95 opened this issue Nov 18, 2020 · 0 comments
Open

"-lrt" library not linked at the end while building pmwcas #26

nisargshah95 opened this issue Nov 18, 2020 · 0 comments

Comments

@nisargshah95
Copy link

When I try to run the bztree pibench wrapper with pibench, I get the following error from within pmwcas:
undefined reference 'shm_open'

It looks like while compiling pmwcas shared object, -lrt is linked at the beginning rather than at the end. For instance, this is the command run on my system to compile pmwcas:

/usr/bin/c++ -fPIC  -std=c++11 -O2 -g -DNDEBUG  -lpthread -lnuma -lrt -shared -Wl,-soname,libpmwcas.so -o libpmwcas.so CMakeFiles/pmwcas.dir/src/util/nvram.cc.o CMakeFiles/pmwcas.dir/src/util/status.cc.o CMakeFiles/pmwcas.dir/src/environment/environment.cc.o CMakeFiles/pmwcas.dir/src/common/allocator_internal.cc.o CMakeFiles/pmwcas.dir/src/common/pmwcas_internal.cc.o CMakeFiles/pmwcas.dir/src/common/environment_internal.cc.o CMakeFiles/pmwcas.dir/src/common/epoch.cc.o CMakeFiles/pmwcas.dir/src/mwcas/mwcas.cc.o CMakeFiles/pmwcas.dir/src/environment/environment_linux.cc.o  /usr/lib/x86_64-linux-gnu/libpmemobj.so 

If I move -lpthread -lnuma -lrt to the end and run the same command again the bztree pibench wrapper works fine. Maybe some fix is required in the CMakeLists.txt to link these libraries at the end rather than at the beginning.

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

1 participant