Skip to content

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

@nisargshah95

Description

@nisargshah95

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions