Netflix / dynomite

A generic dynamo implementation for different k-v storage engines
Apache License 2.0
4.2k stars 533 forks source link

fail to compile dynomite under ubuntu:24.04 with multiple definition of `C2G_InQ' error #826

Open ochinchina opened 2 months ago

ochinchina commented 2 months ago

compile dynomite with following commands copied from Dockerfile like below:

apt-get update && \
    export DEBIAN_FRONTEND=noninteractive && \
    apt-get install -y \
    autoconf \
    build-essential \
    dh-autoreconf \
    git \
    libssl-dev \
    libtool \
    software-properties-common \
    redis-server \
    tcl

git checkout -b compile origin/v0.8 \
    && autoreconf -fvi \
    && ./configure --enable-debug=log \
    && CFLAGS="-ggdb3 -O0" ./configure --enable-debug=full \
    && make \
    && make install

After running above command, we got error:

/usr/bin/ld: ../dyn_util.o:/dynomite/src/tools/../dyn_ring_queue.h:23: multiple definition of `C2G_InQ'; ../dyn_log.o:/dynomite/src/tools/../dyn_ring_queue.h:23: first defined here
/usr/bin/ld: ../dyn_util.o:/dynomite/src/tools/../dyn_ring_queue.h:29: multiple definition of `C2G_OutQ'; ../dyn_log.o:/dynomite/src/tools/../dyn_ring_queue.h:29: first defined here
/usr/bin/ld: ../dyn_array.o:/dynomite/src/tools/../dyn_ring_queue.h:23: multiple definition of `C2G_InQ'; ../dyn_log.o:/dynomite/src/tools/../dyn_ring_queue.h:23: first defined here
/usr/bin/ld: ../dyn_array.o:/dynomite/src/tools/../dyn_ring_queue.h:29: multiple definition of `C2G_OutQ'; ../dyn_log.o:/dynomite/src/tools/../dyn_ring_queue.h:29: first defined here
/usr/bin/ld: ../../src/hashkit/libhashkit.a(dyn_murmur.o):/dynomite/src/hashkit/../../src/dyn_ring_queue.h:23: multiple definition of `C2G_InQ'; ../dyn_log.o:/dynomite/src/tools/../dyn_ring_queue.h:23: first defined here
/usr/bin/ld: ../../src/hashkit/libhashkit.a(dyn_murmur.o):/dynomite/src/hashkit/../../src/dyn_ring_queue.h:29: multiple definition of `C2G_OutQ'; ../dyn_log.o:/dynomite/src/tools/../dyn_ring_queue.h:29: first defined here
collect2: error: ld returned 1 exit status
deathbybandaid commented 3 weeks ago

I've experienced this same thing. Hopefully there is a fix for this.

deathbybandaid commented 3 weeks ago

Looks like a solution was already found. The below PR makes it work!

https://github.com/Netflix/dynomite/pull/775/files