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

What happened to libstdc++ statically linked builds? #17

Closed
399a36c3b7 opened this issue Oct 29, 2012 · 12 comments
Closed

What happened to libstdc++ statically linked builds? #17

399a36c3b7 opened this issue Oct 29, 2012 · 12 comments

Comments

@399a36c3b7
Copy link

Snappy won't work on some systems with following (and similar) configuration(s):

CentOS 5.5 (x86_64):
libstdc++-4.1.2-52.el5_8.1
glibc-2.5-81.el5_8.7

Previously, it was resolved here: http://code.google.com/p/snappy-java/issues/detail?id=12
by doing a build with statically libstdc++ linked and included snappy version.

And some of the older builds actually do work there, for example:
http://maven.xerial.org/repository/snapshot/org/xerial/snappy/snappy-java/1.0.1-rc5-SNAPSHOT/ .

@xerial
Copy link
Owner

xerial commented Oct 30, 2012

linking libstd++ has been temporary removed due to a compilation problem in Ubuntu.

I think using CentOS 5 for building snappy-java looks good for supporting wide-range of Linux distributions.
(including CentOS 5 to 6, Ubuntu etc.)

Here is a snapshot version that probably fixes this problem (compiled with statically linked libstdc++ in CentOS5):
https://oss.sonatype.org/content/repositories/snapshots/org/xerial/snappy/snappy-java/1.0.5-M4-SNAPSHOT/

@399a36c3b7
Copy link
Author

Yes, M4-SNAPSHOT loads fine, thanks!

@xerial
Copy link
Owner

xerial commented Feb 27, 2013

Integrated to 1.0.5 milestone

@xerial xerial closed this as completed Feb 28, 2013
@vikramkadi
Copy link

Hi Guys,

I m not sure if this is still working, but i m seeing the same issue again in 1.0.5.

thanks
Vikram

@xerial
Copy link
Owner

xerial commented Sep 5, 2013

Please use 1.1.0-M4, which has no dependency to libstdc++.

Here is the ldd result. It only has the dependencies to libc and libm and the other linux libraries.

$ ldd -v src/main/resources/org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so                                                                                                                                   [10:39:17 Sep 05 2013]
        linux-vdso.so.1 =>  (0x00007fff904ab000)
        libm.so.6 => /lib64/libm.so.6 (0x00002b5a0cbec000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b5a0ce70000)
        /lib64/ld-linux-x86-64.so.2 (0x00000031fbe00000)

        Version information:
        src/main/resources/org/xerial/snappy/native/Linux/x86_64/libsnappyjava.so:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
        /lib64/libm.so.6:
                libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
        /lib64/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2

@vikramkadi
Copy link

Thanks a lot xerial, it works perfectly.

@theduderog
Copy link

Hi @xerial,

I need a version of 1.0.5 with libstdc++ statically included. The link (https://oss.sonatype.org/content/repositories/snapshots/org/xerial/snappy/snappy-java/1.0.5-M4-SNAPSHOT/ ) that you gave above no longer has the jar.

Can you please point me to a 1.0.5 jar that is statically compiled or tell how you built that one?

Thanks!!!

@xerial
Copy link
Owner

xerial commented Sep 12, 2014

@theduderog
Please use 1.1.1.3, which uses libstdc++ embedded version for x86_64 native library.

@theduderog
Copy link

I tried substituting 1.1.1.3 for 1.0.5 in Kafka but it seems to cause the producer to hang. Is it generally safe to swap 1.1.x for 1.0.5 without any code changes?

Sent from my iPhone

On Sep 11, 2014, at 7:10 PM, "Taro L. Saito" notifications@github.com wrote:

@theduderog
Please use 1.1.1.3, which uses libstdc++ embedded version for x86_64 native library.


Reply to this email directly or view it on GitHub.

@xerial
Copy link
Owner

xerial commented Sep 12, 2014

API of snappy-java-1.1.1.3 and 1.0.5.x is compatible, but I'm not sure what causes the hang. If you have some error message, please report it in another ticket.

As a quick fix, I have just deployed 1.0.5.4, which embeds libstdc++ to the 1.0.5.3 version. This will be synchronized to Maven central within a hew hours.

@theduderog
Copy link

Awesome. Thank you! I'll give it a try.

On Thu, Sep 11, 2014 at 10:35 PM, Taro L. Saito notifications@github.com
wrote:

API of snappy-java-1.1.1.3 and 1.0.5.x is compatible, but I'm not sure
what causes the hang. If you have some error message, please report it in
another ticket.

As a quick fix, I have just deployed 1.0.5.4, which embeds libstdc++ to
the 1.0.5.3 version. This will be synchronized to Maven central within a
hew hours.


Reply to this email directly or view it on GitHub
#17 (comment).

@theduderog
Copy link

@xerial , thank you for the reply and the new jar. I investigated more and found that the producer error/hang was being caused by an error on the broker side. I needed to replace the snappy-java.jar file on the broker as well as the producer to get it working. Thanks again for your help.

hgschmie pushed a commit to hgschmie/prestodb that referenced this issue Sep 26, 2014
This fixes all problems seen with
xerial/snappy-java#17 on e.g. CentOS 5 by
replacing the included library version 1.0.5 with the latest version
as suggested by xerial.

This is proposed to go into Kafka proper, see
https://issues.apache.org/jira/browse/KAFKA-1369
dain pushed a commit to prestodb/presto that referenced this issue Sep 30, 2014
This fixes all problems seen with
xerial/snappy-java#17 on e.g. CentOS 5 by
replacing the included library version 1.0.5 with the latest version
as suggested by xerial.

This is proposed to go into Kafka proper, see
https://issues.apache.org/jira/browse/KAFKA-1369
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

4 participants