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

Can't recognize libjq1 being installed on the system #1

Closed
est31 opened this issue May 29, 2019 · 9 comments
Closed

Can't recognize libjq1 being installed on the system #1

est31 opened this issue May 29, 2019 · 9 comments

Comments

@est31
Copy link

est31 commented May 29, 2019

When I try to use this library, it doesn't seem to be able to recognize libqj1 installed on the system. Most likely because on my system it's called libjq1 not libjq.

@onelson
Copy link
Owner

onelson commented May 29, 2019

Could you share the type of system you're on?

@onelson
Copy link
Owner

onelson commented May 29, 2019

I can probably fake it by doing a docker build and just renaming the .so as a part of the build, but I'd rather know I've really fixed it for real.

@est31
Copy link
Author

est31 commented May 29, 2019

@onelson I'm using ubuntu. This is the list of files provided: https://packages.ubuntu.com/disco/amd64/libjq1/filelist

It's weird that pkg-config doesn't resolve the library correctly. My current guess it's the lib prefix.

@onelson
Copy link
Owner

onelson commented May 29, 2019

Okay thanks. I'll take a closer look. All our builds tend to happen on debian, but I don't think we've ever tried it on ubuntu. I'll prep a dockerfile and see what's what.

@est31
Copy link
Author

est31 commented May 29, 2019

Hmm I think I found the reason: there is no /usr/lib/x86_64-linux-gnu/pkgconfig/jq.pc file. Other libraries like libogg-dev ship with a corresponding .pc file: https://packages.ubuntu.com/disco/amd64/libogg-dev/filelist

Not sure why such a file isn't included but this is certainly the distro's fault not the fault of this crate.

@est31 est31 closed this as completed May 29, 2019
@onelson
Copy link
Owner

onelson commented May 29, 2019

Ah. Well, in that case, I'll aim to document this in the readme. Certainly, there are other ubuntu users out there who may run into this.

Thanks for doing the legwork.

@est31
Copy link
Author

est31 commented May 29, 2019

@onelson you say it works in debian? That's weird, as it's lacking the file as well: https://packages.debian.org/stretch/amd64/libjq-dev/filelist vs https://packages.ubuntu.com/disco/amd64/libjq-dev/filelist

@onelson
Copy link
Owner

onelson commented May 29, 2019

Yeah. We have only one service depending on this crate, but there are two docker builds, one for local dev (dynamic linking) and a multi-stage cross-builder (we link jq statically there and so build it from source).

The dynamic linking version (I'm checking the Dockerfile)... Yep.

RUN apt-get update \
    && apt-get install --no-install-recommends -y \
    libjq-dev libonig-dev libjq1 libonig4 \
    && rm -rf /var/lib/apt/lists/*

ENV JQ_LIB_DIR=/usr/lib/x86_64-linux-gnu

We set JQ_LIB_DIR to side-step pkg-config, I guess.

@SuperSandro2000
Copy link

jq/libjq has no pc file that why pkg-config will always fail.

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

3 participants