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

Using "../java" in system.c when looking for a shared library doesn't work on zOS #3392

Closed
groeges opened this issue Oct 22, 2018 · 12 comments
Closed

Comments

@groeges
Copy link
Contributor

groeges commented Oct 22, 2018

A change went in recently: #3176 to fix an issue with MacOS but this fix has broken the zOS builds. See issue: https://github.ibm.com/runtimes/openjdk-contribution/issues/631 for details of issue. This needs to be resolved in order to get the zOS builds working again.

@tajila
Copy link
Contributor

tajila commented Oct 23, 2018

Ill take a look at this

@groeges
Copy link
Contributor Author

groeges commented Nov 2, 2018

@tajila Any progress on this?

@tajila
Copy link
Contributor

tajila commented Nov 2, 2018

I have a PR eclipse/omr#3148

@pshipton
Copy link
Member

pshipton commented Nov 2, 2018

Does the original change to use ../ only work because it fails to find the library at that path and falls back to search the portlib directory?

@tajila
Copy link
Contributor

tajila commented Nov 2, 2018

@pshipton yes

@pshipton
Copy link
Member

pshipton commented Nov 2, 2018

@DanHeidinga is that really what you intended when you made the change?

@pshipton
Copy link
Member

pshipton commented Nov 2, 2018

I think I'm still missing something. If "../java" always fails on Mac, and the fallback makes it work, wouldn't just using "java" have been sufficient on the Mac, as it could also fail and then use the fallback?

@tajila
Copy link
Contributor

tajila commented Nov 2, 2018

I'm not sure what happens on mac, I never tried it there. But on xa64 ../java only works because of the fallback.

@pshipton
Copy link
Member

pshipton commented Nov 2, 2018

Perhaps I misunderstood. Does the fallback still use the ../java path, but from the portlib directory?

@DanHeidinga
Copy link
Member

Does the fallback still use the ../java path, but from the portlib directory?

Yes. it makes the path relative to the portlib directory as libjava.so is up one level from the compressed | default directories

@DanHeidinga
Copy link
Member

This may be a better approach for the openj9 code - #3535

Thought @tajila's OMR fix is a good thing to do as well to make the behaviour of the j9sl_open_shared_library consistent across platforms.

DanHeidinga added a commit to DanHeidinga/openj9 that referenced this issue Nov 5, 2018
Explicitly set the full path rather than relying on the "fallback" to the
same directory as libj9port.so to work around zOS behaviour difference.

issue: eclipse-openj9#3392

Signed-off-by: Dan Heidinga <daniel_heidinga@ca.ibm.com>
@pshipton
Copy link
Member

pshipton commented Nov 5, 2018

#3535 was reverted
#3542 fixes the problem.

@pshipton pshipton closed this as completed Nov 5, 2018
acrowthe pushed a commit to acrowthe/openj9 that referenced this issue Nov 5, 2018
Explicitly set the full path rather than relying on the "fallback" to the
same directory as libj9port.so to work around zOS behaviour difference.

issue: eclipse-openj9#3392

Signed-off-by: Dan Heidinga <daniel_heidinga@ca.ibm.com>
DanHeidinga added a commit to DanHeidinga/openj9 that referenced this issue Nov 13, 2018
Explicitly set the full path rather than relying on the "fallback" to the
same directory as libj9port.so to work around zOS behaviour difference.

Add an assert for this rather than a dynamic allocation as the likelihood
of ever needing to fallback to the allocation is so low the extra code
isn't worth writing (given it will never be tested)

issue: eclipse-openj9#3392
issue: eclipse-openj9#3609

Signed-off-by: Dan Heidinga <daniel_heidinga@ca.ibm.com>
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