Comments (9)
I am also having difficulty with jnr-posix, albeit with the jar that is distributed with jython. It seems that FileStat sometimes reports paths which are not a symlink as a symlink. Looking at OpenBSDFileStat.java I think the interface needs to be reviewed. For example:
- time_t is certainly not a signed 32 any more (as pointed out by Jeremy). You may need to do a sizeof check, as there will be many OpenBSD systems in the wild still running time32.
- On my amd64 system, a ino_t is an unsigned 64 (not a unsigned 32).
You may find that these types vary from arch to arch(?)
In other words, OpenBSD support needs some love.
from jnr-posix.
I confirm that the patch Jeremy posted, when applied to jnr-posix-2.4 (the version jython uses) fixes the problems I am seeing with symlinks/stat.
from jnr-posix.
@wmeissner Talking to @jeremyevans on irc he pointed out this only works OpenBSD >5.4, We should be able to conditionalize loading a second OpenBSD Libc right? Have you thought about this particular issue past 32/64 bit differences?
from jnr-posix.
We don't have to load a different lib, just define different structures, correct?
Worst case, when we detect OpenBSD, we can just look at the output from uname -r
, and use the new structs when we detect release > 5.4.
i.e. I'd rename the existing OpenBSD structs to OldOpenBSDFoo, and use them when uname -r
<= "5.4", otherwise use the new structs/calls.
from jnr-posix.
yeah that seems reasonable. thanks @wmeissner.
from jnr-posix.
Are you able to do something equivalent to sizeof on C?
On 9 Oct 2013 21:34, "Wayne Meissner" [email protected] wrote:
We don't have to load a different lib, just define different structures,
correct?Worst case, when we detect OpenBSD, we can just look at the output from uname
-r, and use the new structs when we detect release > 5.4.i.e. I'd rename the existing OpenBSD structs to OldOpenBSDFoo, and use
them when uname -r <= "5.4", otherwise use the new structs/calls.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-26006155
.
from jnr-posix.
Are you able to do something equivalent to sizeof on C?
No - we don't call the compiler at all during runtime linking. That will probably change in future versions of jnr-ffi (using clang), but it isn't an option right now (other than shelling out to the C compiler to compile a small C program that prints out all the sizes).
jnr-ffi does contain a table of common types, but the OpenBSD table was built for an older version of OpenBSD.
from jnr-posix.
Has there been any work done in this direction? The new puppetserver project is utilising jnr-posix and it fails to run, most likely due to this very issue.
from jnr-posix.
Fixed by #36.
from jnr-posix.
Related Issues (20)
- O_DIRECTORY does not fail on open()
- Error building `jnr-posix`on ppc64le platform HOT 17
- File system failures on Linux PPC HOT 9
- Provide a way to opt into searching the default image for symbols HOT 1
- Windows CI
- jnr.posix.POSIX.kill(long pid, int signal) fails on Windows HOT 2
- WindowsByHandleFileInformation private fields HOT 2
- Struct layout for `LinuxFileStatAARCH64` does not match that on Amazon Graviton2 nodes
- Update jnr-constants to get arch support HOT 2
- Update to JUnit5 and latest Maven Surefire Plugin
- Dup and free filename strings passed to posix_spawn_file_actions_addopen HOT 1
- does jnr-posix work on osx_arm64? HOT 1
- jnr.posix.LinuxPOSIXTest fails on Gentoo ppc64 HOT 1
- NativeClosureProxy - Callable is null HOT 3
- jnr-posix-3.1.16: Test failures seen on x86_64 HOT 7
- jnr-posix tests failed with GLIBC 2.36
- LinuxLibC interface is incompatible with musl libc HOT 2
- fstat is failed on Java 17 HOT 7
- Ask for Java 21 support for com.github.jnr : jnr-posix HOT 1
- bad dates in jnr/jnr-posix commits HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnr-posix.