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

pkg-config doesn't work osx/darwin #24

Open
kohanyirobert opened this issue Oct 5, 2016 · 0 comments
Open

pkg-config doesn't work osx/darwin #24

kohanyirobert opened this issue Oct 5, 2016 · 0 comments
Labels

Comments

@kohanyirobert
Copy link

kohanyirobert commented Oct 5, 2016

I'm trying to build a CMake project which locates libs via pkg-config. Based on osxcross's pkg-config README I'm trying to instruct pkg-config where are the dependencies (I've already built those), however calling pkg-config doesn't seem to work (always returns exit code 1 or hangs).

$ docker run -it --rm -v $(pwd):/workdir -e CROSS_TRIPLE=x86_64-apple-darwin  multiarch/crossbuild
root@d50c00521f6d:/workdir# pkg-config
root@d50c00521f6d:/workdir# echo $?
1
root@d50c00521f6d:/workdir# pkg-config --version
root@d50c00521f6d:/workdir# echo $?
1
root@d50c00521f6d:/workdir# OSXCROSS_PKG_CONFIG_PATH=/tmp OSXCROSS_PKG_CONFIG_LIBDIR=/tmp pkg-config --libs gthread
...

The last command hangs, I think it's an infinite loop, but I'm not 100% sure.
(/tmp is used only for this snippet, it could be anything, doesn't make a difference, if OSXCROSS_PKG_CONFIG_LIBDIR or similar is defined the command hangs.)

I've created the issue here, because I think this problem is related to the fact there is some symlinking magic going on in the Dockerfile. I kinda understand it, but then it's a bit complicated. Sooo ... I think osxcross's "wrapper" script/binary/program calls itself over and over. That's why there's no ouput. Or maybe am wrong.

I've tried another Docker image of osxcross like this

$ docker run --rm --interactive --volume /Users/rkohanyi/git/glib-2.30.3:/glib apriorit/docker-osxcross-10.11:latest << EOF
OSXCROSS_PKG_CONFIG_PATH=/tmp OSXCROSS_PKG_CONFIG_LIBDIR=/tmp x86_64-apple-darwin15-pkg-config --libs sdl2
EOF
Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found

so osxcross seems to work at least.

Any idea?

@moul moul added the ready label Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants