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

update libsnappyjava.so for ppc64le to make it compat with rhel 7 #236

Merged
merged 2 commits into from
Nov 28, 2019

Conversation

josiahsams
Copy link
Contributor

This PR will address the issue reported in #220 for ppc64le arch.

The GLIBC 2.22 dependency is only due to the following ,

$ objdump -T ./libsnappyjava.so | grep GLIBC_2.22
0000000000000000      DF *UND*	0000000000000000  GLIBC_2.22  __tls_get_addr_opt

To circumvent this call, we can use linker flags --no-tls-optimize,--no-tls-get-addr-optimize to disable it.

The .so file attached to this PR is compiled with these flags and relevant changes are made with Makefile and its applicable only for ppcle64 arch.

Ref: https://stackoverflow.com/questions/58958084/disabling-tls-get-addr-opt-for-ppc

@xerial
Copy link
Owner

xerial commented Nov 27, 2019

@josiahsams Can we add this configuration to Makefile.common instead?

snappy-java/Makefile.common

Lines 111 to 120 in acaca7f

Linux-ppc64le_CXX := $(CROSS_PREFIX)g++
Linux-ppc64le_STRIP := $(CROSS_PREFIX)strip
ifeq ($(IBM_JDK_7),)
Linux-ppc64le_CXXFLAGS := -Ilib/inc_linux -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden -m64
else
Linux-ppc64le_CXXFLAGS := -include $(IBM_JDK_LIB)/jni_md.h -include $(IBM_JDK_LIB)/jniport.h -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -O2 -fPIC -m64
endif
Linux-ppc64le_LINKFLAGS := -shared -static-libgcc -static-libstdc++
Linux-ppc64le_LIBNAME := libsnappyjava.so
Linux-ppc64le_SNAPPY_FLAGS :=

@josiahsams
Copy link
Contributor Author

josiahsams commented Nov 28, 2019

@xerial , Moved the linker flags to Makefile.common.

This patch is also required for versions 1.1.7, 1.1.7.1, 1.1.7.2, 1.1.7.3 & master.

Thanks.

@xerial
Copy link
Owner

xerial commented Nov 28, 2019

Thanks. I'll just release 1.1.7.4 as 1.1.7.x are minor fixes over 1.1.7

@xerial xerial merged commit 8faa1d8 into xerial:master Nov 28, 2019
@jamesbroadhead
Copy link

Hi @xerial -

Do you have an intended release date for 1.1.7.4?
We'd like to upgrade to regain ppc64le support.
(apologies if I missed this somewhere)

Thank you -- James

@d0lphis
Copy link

d0lphis commented Feb 13, 2020

Hi @xerial,

There's a ticket from our side waiting for this fix, any update for the release date of 1.1.7.4?

Thanks

@HeartSaVioR
Copy link

Hello @xerial

we hit the issue on ppc64le + RHEL 7 and would like to upgrade to 1.1.7.4. Any update for the new release?

HeartSaVioR pushed a commit to HeartSaVioR/snappy-java that referenced this pull request Apr 26, 2020
…rial#236)

* update libsnappyjava.so for ppc64le to make it compat with rhel 7

* move linkflag to Makefile.common
@xerial
Copy link
Owner

xerial commented May 5, 2020

@HeartSaVioR Just released snappy-java 1.1.7.4 with this fix. Please try it.

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

Successfully merging this pull request may close these issues.

5 participants