Skip to content

Linking issue while building memcached using gLLVM #66

@Mohannadcse

Description

@Mohannadcse

I'm using the scripts Makefile and Makefile_libevent from https://github.com/SRI-CSL/OCCAM-Benchmarks/tree/master/examples/portfolio/memcached to generate the bitcode of Memcached.
But I'm receiving the following error:

gclang  -g -O2 -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls  -L/workspaces/neck-identification/gllvmTry/install/libevent/lib  -Wl,-rpath,/workspaces/neck-identification/gllvmTry/install/libevent/lib -o memcached memcached-memcached.o memcached-hash.o memcached-jenkins_hash.o memcached-murmur3_hash.o memcached-slabs.o memcached-items.o memcached-assoc.o memcached-thread.o memcached-daemon.o memcached-stats.o memcached-util.o memcached-cache.o    -lpthread -levent 
memcached-hash.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
memcached-jenkins_hash.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
memcached-slabs.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
memcached-items.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
memcached-assoc.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
memcached-thread.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
memcached-daemon.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
memcached-stats.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
memcached-util.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: multiple definition of `hash'
memcached-memcached.o:/workspaces/neck-identification/gllvmTry/memcached-1.4.25/./hash.h:5: first defined here
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR:Failed to compile using given arguments:
clang [-g -O2 -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -L/workspaces/neck-identification/gllvmTry/install/libevent/lib -Wl,-rpath,/workspaces/neck-identification/gllvmTry/install/libevent/lib -o memcached memcached-memcached.o memcached-hash.o memcached-jenkins_hash.o memcached-murmur3_hash.o memcached-slabs.o memcached-items.o memcached-assoc.o memcached-thread.o memcached-daemon.o memcached-stats.o memcached-util.o memcached-cache.o -lpthread -levent]
exit status: exit status 1
Makefile:541: recipe for target 'memcached' failed
make[3]: *** [memcached] Error 1
make[3]: Leaving directory '/workspaces/neck-identification/gllvmTry/memcached-1.4.25'
Makefile:1034: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory '/workspaces/neck-identification/gllvmTry/memcached-1.4.25'
Makefile:1334: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/workspaces/neck-identification/gllvmTry/memcached-1.4.25'
Makefile:28: recipe for target '/workspaces/neck-identification/gllvmTry/install/memcached/bin/memcached' failed
make: *** [/workspaces/neck-identification/gllvmTry/install/memcached/bin/memcached] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions