Bug 1993446

Summary: missing /usr/lib64 in LD_LIBRARY_PATH is preventing jiggawats t find its library
Product: [Fedora] Fedora Reporter: jiri vanek <jvanek>
Component: jigawattsAssignee: jiri vanek <jvanek>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: chf, jvanek, sgehwolf
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-16 08:18:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jiri vanek 2021-08-13 07:10:21 UTC
there is bug on aarch64 where /usr/lib64 is missing on LD_LIBRARY_PATH, it is known bug in JVM

You get:
removed directory '/mnt/ramdisk/jigawatts-smoke-test'
removed 'AfterHook.class'
removed 'BeforeHook.class'
removed 'RandomTest.class'
Exception in thread "main" java.lang.ExceptionInInitializerError
	at RandomTest.testRandomCheckpoint(RandomTest.java:65)
	at RandomTest.main(RandomTest.java:96)
Caused by: java.lang.RuntimeException: Jigawatts library not found!
	at org.openjdk.jigawatts.Jigawatts.loadLib(Jigawatts.java:167)
	at org.openjdk.jigawatts.Jigawatts.<clinit>(Jigawatts.java:172)


export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64

is fixing the issue.

Note that this is downstream issue, which packs .so file out of the jar
Is here for record, as the bug shoudl be actually fixed elsewhere, or jigawats must bundle the .so

Comment 1 jiri vanek 2021-08-15 08:05:55 UTC
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64

s/export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/-Djava.library.path=/usr/lib64

If jdk11 is beyond repair, we should `ln -s /usr/lib64/libJigawatts.so  /usr/lib/libJigawatts.so` to make it work more out of the box

Comment 2 jiri vanek 2021-08-15 08:10:01 UTC
(In reply to jiri vanek from comment #1)
> > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64
> 
> s/export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/-Djava.library.path=/usr/lib64
> 
> If jdk11 is beyond repair, we should `ln -s /usr/lib64/libJigawatts.so 
> /usr/lib/libJigawatts.so` to make it work more out of the box

If symlink on aarch64 will be done the > /usr/lib/libJigawatts.so.readme explaining state of things should be provided

Comment 3 jiri vanek 2021-08-15 08:12:42 UTC
Questions: Is jdk17 also affected? Will jdk11 ever get fixed?

Comment 4 Severin Gehwolf 2021-08-16 08:18:08 UTC
This is a duplicate of bug 1977671. It has a link to the upstream issue. It's fixed in JDK head/17/11 upstream.

*** This bug has been marked as a duplicate of bug 1977671 ***

Comment 5 Severin Gehwolf 2021-08-16 08:22:48 UTC
I'm curious, why are you still seeing this issue? It should be fixed in rawhide since java-11-openjdk-11.0.12.0.7-1.fc35. Do you have a link to a recent build that's failing?

Comment 6 Severin Gehwolf 2021-08-16 08:24:51 UTC
The workaround fix in jigawatts was:
https://src.fedoraproject.org/rpms/jigawatts/blob/rawhide/f/jigawatts.spec#_63