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

prevent pkg-config from finding unrelated system libraries #12590

Merged
merged 1 commit into from
Aug 13, 2015

Conversation

vtjnash
Copy link
Sponsor Member

@vtjnash vtjnash commented Aug 12, 2015

fix #12514

@tkelman tkelman added the building Build system, or building Julia or its dependencies label Aug 12, 2015
@tkelman
Copy link
Contributor

tkelman commented Aug 12, 2015

Hm, ref #10010, it looks like this fails to find openssl in multilib compilation of 32 bit linux from 64 bit linux. That's better than a build/link failure, but may make testing https + libgit2 on 32 bit linux a little hard in the future. I can't seem to figure out how to get apt-get to install libssl-dev:i386 without uninstalling build-essential on ubuntu 14.04, so maybe we should go with this change anyway.

@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Aug 12, 2015

yeah, its likely this would break distributions, which may actually want to be using pkg-config (and would thus force them to unset / unexport this variable). failing to find openssl may actually be good, since if we're building generic linux binaries, then we really only want to find libs that will actually be on all target machines.

@tkelman
Copy link
Contributor

tkelman commented Aug 12, 2015

Not quite. We bundle the openssl that is on the build machine. Ref #10763. No https on Linux without it, unfortunately. While there will almost always be a system version present on pretty much any Linux distribution, it's not guaranteed to be API or ABI compatible with the version we build libgit2 against on the buildbots. At least libgit2 can use native https on OS X and Windows.

@nalimilan do you need this pkg-config variable to be set while building julia? Will this trigger an rpmlint warning or anything?

@nalimilan
Copy link
Member

Am I correct that it will break USE_SYSTEM_LIBGIT2=1 if not unsetting PKG_CONFIG_LIBDIR manually? Why not make it conditional then?

@tkelman
Copy link
Contributor

tkelman commented Aug 12, 2015

How would this break USE_SYSTEM_LIBGIT2? Enabling that just means we don't build libgit2 and instead rely on ccall to find it somewhere on the path, pretty basic in this case.

@nalimilan
Copy link
Member

Ah, right, I forgot that we don't actually link to libgit2. So should be fine with me.

@@ -160,6 +160,9 @@ BUILD_LLDB = 0
# Path to cmake (override in Make.user if needed)
CMAKE ?= cmake

# Point pkg-config to only look at our libraries
export PKG_CONFIG_LIBDIR = $(JULIAHOME)/usr/lib/pkgconfig

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, never mind, I see that that answer references the export command in make; I never knew about this one.

vtjnash added a commit that referenced this pull request Aug 13, 2015
prevent pkg-config from finding unrelated system libraries
@vtjnash vtjnash merged commit bb4eddc into master Aug 13, 2015
@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Aug 13, 2015

let's try this for a bit. if it turns out we need some .pc file, we can add rules to copy in the right ones from the right sysroot.

@vtjnash vtjnash deleted the jn/cmake-pkg-config branch August 13, 2015 16:01
@nalimilan
Copy link
Member

Actually this does break when using USE_SYSTEM_LIBGIT2=0 USE_SYSTEM_SSH2=1. In that case libgit2's CMake script doesn't detect libssh2 using pkg-config, so SSH is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build error on mac osx (Julia 0.4 latest)
4 participants