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

invalid ELF header (Possible cause: endianness mismatch) error for sigar jar on ppc64le. #133

Open
rashmi-ibm opened this issue Nov 27, 2019 · 7 comments

Comments

@rashmi-ibm
Copy link

Getting the below error when trying to use sigar jar on a ppc64le system during mvn build of the source project.

WARN 27-11 03:54:24,870 (SystemInfoFactory.java:initialize:311) -Native library not available on this platform: java.lang.reflect.InvocationTargetException:null -> org.hyperic.sigar.SigarException:/root/.m2/repository/org/hyperic/sigar/1.6.5.132-6/sigar-1.6.5.132-6.jar: /root/.m2/repository/org/hyperic/sigar/1.6.5.132-6/sigar-1.6.5.132-6.jar: invalid ELF header (Possible cause: endianness mismatch)

I was able to build sigar jar successfully on power. Need pointers on how this issue can be fixed.

@AlexYaruki
Copy link

AlexYaruki commented Nov 27, 2019 via email

@rashmi-ibm
Copy link
Author

I am trying to build the Rhq repository which internally uses sigar.

Below are the commands used to build the repo.

git clone https://github.com/rhq-project/rhq.git
cp rhq/etc/m2/settings.xml ~/.m2/
cd rhq
mvn clean -Ddbsetup -Penterprise,dev install

@rashmi-ibm
Copy link
Author

Can you pls point me to the documentation as to how I can use the ppc64le specific generated sigar jar.

I build sigar.jar successfully. Where do I specify the .so file

ls -1 sigar-bin/lib
history.xml
libsigar-ppc64le-linux.so
sigar.jar

@rashmi-ibm
Copy link
Author

I suspect the error I am getting is due to a mismatch thats happening in the sigar-dist zip file.

https://repository.jboss.org/nexus/content/groups/public/org/hyperic/sigar-dist/1.6.5.132-6/

The zip file contains platform specific so files and the power specific files are namely as shown below::
libsigar-ppc64-linux.so

on the current power machine when I run the build the so file that is generated is libsigar-ppc64le-linux.so

Any pointers how i can explicitly fix this out ???

@rashmi-ibm
Copy link
Author

I manually added the libsigar-ppc64le-linux.so in the sigar-dist/1.6.5.132-6/sigar-dist-1.6.5.132-6.zip file and tried to build the RHQ project.
The above sigar error went off with the above temporary fix.

Can you please help to add the libsigar-ppc64le-linux.so in the maven published version of sigar-dist.

@AlexYaruki
Copy link

AlexYaruki commented Nov 29, 2019 via email

@AlexYaruki
Copy link

You can always try binaries from sourceforge: https://sourceforge.net/projects/sigar/files/sigar/1.6/hyperic-sigar-1.6.4.zip/download

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

2 participants