-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
jq on Linux On Power Big Endian #791
Comments
@chmod666org - Thanks to @slapresta I'll retract my comments, but if at all possible, I'd suggest you compile from source. |
@pkoppstein Note the first one has |
Without access to the system in question it's hard to say, but what you
Also, what does this do:
? Hopefully it hangs the same way. Also, what about this:
? The hang is most likely to be occurring in It might be useful to look at the pre-processed version of jv_dtoa.c:
so we have a better idea of what's going on. |
Maybe we should have an option to use sscanf() and snprintf() for dealing with double<->string conversion, but the result wouldn't parse all JSON texts. |
Hi all, @nicowilliams I've also tried with a version compiled by myself on Linux On Power (BE) and the issue is the same. Once again thanks. |
Hi all, here is the gdb output gdb --args jq .foo fGNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1) |
@chmod666org What does the ABI on your system say for C doubles? Are they 64-bit IEEE754? And if so, are they big- or little-endian? If they aren't 64-bit IEEE754 doubles, is there a compiler option to get 64-bit IEEE754 doubles? EDIT: 20e6292 isn't wrong, I just read it wrong. |
..can you tell me how to check that ? I'm sorry I'm not a developper and don't really know how to check it. |
@chmod666org What does |
@nicowilliams Linux powervchost 2.6.32-431.el6.ppc64 #1 SMP Sun Nov 10 22:17:43 EST 2013 ppc64 ppc64 ppc64 GNU/Linux |
Endianness is the same for integers as for floating point types on ppc64. |
This is easily reproduced on x86 by adding this in jv_dtoa.c:
then running
|
It's an issue on 32 and 64 bit PowerPC Macs as well, although Macports compiled jq on both systems for ppc7400 (32 bit). |
Did anybody find a solution for this? I'm trying to run jq on AIX and I think it's having the same issue |
Basically, I have no time for this at this time. It's very hairy code that I haven't yet understood. Realistically, I won't manage to debug this for a few months given my current schedule. Maybe someone can take a look? @wtlangford ? @stedolan ? |
I fixed it by removing |
On Thu, Jun 18, 2015 at 04:09:33PM -0700, Luke Nelson wrote:
That does it? Fine, I'll push a fix then. Thanks! |
Would that be the host='powerpc-apple-darwin9.8.0' line from config.log? |
@khepler Yes, that. I also need one for AIX. |
Though it's probably enough to match powerpc-*. |
That would match my powerpc-apple-darwin8.11.0 too. :) And hopefully
the linux partitions as well, which I believe is
'powerpc-unknown-linux' (that's from memory and shouldn't be trusted).
|
jq -n 42 fails on all big endian systems i've tested with the same error. most likely, it's the big integer library, which makes lots of bitwise operator assumptions. maybe "https://gist.github.com/bloopletech/338338"? |
What versions and architectures did you test? jq 1.5 works on the big endian system I just tested. |
Hi,
I'm using a compiled version of jq on Linux on Power (RHEL 6.5)
Something like that is working great
echo '{"foo": "42", "bar": "less interesting data"}' | jq .foo
"42"
If json "leaf" is not behing double quote jq stay stucked
echo '{"foo": 42, "bar": "less interesting data"}' | jq .foo
STUCK HERE
All precompiled versions found on the web have the same issue. Try the same syntax on X86_64 is working like a charm.
Does anybody have an idea ?
Thank you.
B - chmod666.org
The text was updated successfully, but these errors were encountered: