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

failure with older glibc #30

Closed
billehunt opened this issue Oct 23, 2012 · 11 comments
Closed

failure with older glibc #30

billehunt opened this issue Oct 23, 2012 · 11 comments

Comments

@billehunt
Copy link

Hey,

Awesome project; really love it!

More of an fyi, but under Fedora 13, I couldn't run the precompiled version; it complained "GLIBC_2.14 not found". Compiling locally works great.

I have many "yes, please"s to add to other feature requests; will add them there.

@heavydawson
Copy link

+1 for this. Trying to run the pre-compiled binary on CentOS 5.8 results in the GLIBC error above. Haven't tried a local compile just yet.

@stedolan
Copy link
Contributor

The libc API (or at least, the bits that jq uses) hasn't changed in more than 20 years, and still glibc manages to break compatibility between minor versions :(

I don't have a box with a sufficiently old glibc to build against to hand at the moment, so for now building from source is your best bet. The release tarball and git master (at the moment) have generated parsers, etc. checked in so all you need to build is make and gcc.

I'll have another look at this when packaging for more current systems is figured out :)

@Downchuck
Copy link

Same situation with CentOS 6.3 machines.

@mvsantos
Copy link

+1 Can't run the binary nor build from source when running CentOS 6.3 because it runs on glibc 2.12

foo]$ jq -v
jq: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by jq)

@HarryR
Copy link

HarryR commented Nov 23, 2012

Why can't you build it from source on CentOS 6.3?

@mvsantos
Copy link

@HarryR maybe it's something with my own environment

Here's what I've got

[builder@lb src]$ whoami
builder
[builder@lb src]$ id builder
uid=502(builder) gid=502(builder) groups=502(builder),501(sudoers)
[builder@lb src]$ sudo grep sudoers /etc/sudoers
## which machines (the sudoers file can be shared between multiple
%sudoers ALL=(ALL) ALL

[builder@lb src]$ pwd
/usr/local/src
[builder@lb src]$ ls -ld jq
drwxr-xr-x 3 builder builder 4096 Nov 24 00:57 jq
[builder@lb src]$ cd jq
[builder@lb jq]$ make
sed 's/.*/#define JQ_VERSION "&"/' VERSION > version.gen.h
make: *** [version.gen.h] Error 1
[builder@lb jq]$ sudo make
sed 's/.*/#define JQ_VERSION "&"/' VERSION > version.gen.h
make: *** [version.gen.h] Error 1
[builder@lb jq]$ 

@stedolan
Copy link
Contributor

stedolan commented Dec 3, 2012

That's a bit strange, it looks like you're running into a different issue when building. Can you run the

sed 's/.*/#define JQ_VERSION "&"/' VERSION > version.gen.h

line in a shell on its own? Do you have write permissions here? What does ls -l give?

@mvsantos
Copy link

mvsantos commented Dec 3, 2012

tl;dr don't know if related, but had just updated kernel-* and NOT rebooted yet when tried to build jq. After reboot build works.

I had full permissions to the jq src directory but not to its parent directory, I mean
/usr/local/src => 755 ("root" owned)
/usr/local/src/jq => 755 ("builder" owned)

My machine was up for just over 3 months and I had just run a bunch of updates including kernel-* when I tried building jq immediately after all those updates - without rebooting the machine.
After the build of jq failed I rebooted the machine to apply the kernel and etc.. but didn't try building jq again until now.
Anyways, it now builds just fine and the resulting jq bin works as described.

Sorry for the delay on the feedback.
Great tool btw!

@stedolan
Copy link
Contributor

OK, figured this one out a bit. It seems a recentish change to memcpy in glibc broke things (http://lwn.net/Articles/414467/), and so the glibc guys bumped the symbol version for memcpy, which means that binaries that were built with a new glibc aren't backwards compatible if they call memcpy.

The Debian project removed that change, so binaries built with Debian glibc don't seem to have the GLIBC_2.14 dependency. I'll be releasing a new version of jq fairly soon, with binaries that shouldn't have this issue.

@stedolan
Copy link
Contributor

jq-1.2 was just released, the binaries should work on older systems now. Anyone with one of those lying around want to try?

@jkleint
Copy link
Contributor

jkleint commented Dec 31, 2012

I can confirm that the jq 1.2 binary works with CentOS 5.8 64-bit (glibc 2.5).

I can also confirm that jq rocks -- thank you very much for this!

@stedolan stedolan closed this as completed Jan 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants