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 symbol: crc32 #117

Open
aliekens opened this issue Jun 22, 2015 · 3 comments
Open

undefined symbol: crc32 #117

aliekens opened this issue Jun 22, 2015 · 3 comments

Comments

@aliekens
Copy link

After installing the Hermann gem on a clean Ubuntu LTS box, I get the following error when using Hermann from a simple producer test:

ruby: symbol lookup error: /home/HOME/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/hermann-0.24.1.dev/ext/hermann/hermann_lib.so: undefined symbol: crc32

Upon inspecting the hermann_lib.so file, I see no references to zlib (which should contain the crc32 symbol):

$ ldd /home/HOME/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/hermann-0.24.1.0/ext/hermann/hermann_lib.so
        linux-vdso.so.1 =>  (0x00007ffe71775000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd7bb514000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd7bb14f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd7bb96f000)

The only references to crc32 in this project are in the source code of librdkafka, which correctly includes zlib as a dependency:

$ ldd /home/HOME/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/hermann-0.24.1.0/ext/hermann/tmp/x86_64-linux-gnu/ports/librdkafka/0.8.6/librdkafka-0.8.6/src/librdkafka.so.1 
        linux-vdso.so.1 =>  (0x00007fff3f353000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f01fb45a000)
        libz.so.1 => /usr/local/lib/libz.so.1 (0x00007f01fb240000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f01fb037000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f01fac72000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f01fb8b2000)

I cannot replicate this problem on a my development Mac. Can someone help me pinpointing where the missing reference to crc32 may originate? Am I missing a dependency? Or did something go wrong in my build process (nothing seems to be wrong)?

@rtyler
Copy link
Member

rtyler commented Aug 24, 2015

@aliekens do you have a full stacktrace? I don't think I've ever seen that before; 100% of my development is on Linux so I'm somewhat surprised that you're seeing an error.

One interesting thing that I do see is that zlib is coming from /usr/local/lib instead of /usr/lib64 which is where I would expect it to be.

@rtyler
Copy link
Member

rtyler commented Sep 23, 2015

Bumping this thread, another question which migh tbe useful to answer is if LTS means 14.04 in this case?

@evanchaoli
Copy link

Try:
export LD_PRELOAD=/usr/lib64/libz.so

before run the ruby process.

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

No branches or pull requests

3 participants