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

[LibXML2] Link LibXML2 Statically for Linux #1527

Merged
merged 2 commits into from
Jul 1, 2022

Conversation

kaydeearts
Copy link
Collaborator

Description

Due to a bug in the linux python wheels involving dynamically linking libxml2, discovered in #1525 , we'll be installing libxml2 externally through ExternalLibXML2.cmake and linking statically, just like we do in most Windows cases.
We will revisit this in the future and attempt to fix dynamic linking for linux.

Checklist:

  • I have followed the Contribution Guidelines
  • I have added test code and data to prove that my code functions correctly
  • I have verified that new and existing tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@skef
Copy link
Collaborator

skef commented Jun 29, 2022

Do we know this is a Linux problem as opposed to a wheel problem? If it's the latter we could just add an optional control (like checking an environment variable) to force static linking and then use that when building the wheels.

@kaydeearts kaydeearts marked this pull request as draft June 30, 2022 21:06
josh-hadley
josh-hadley previously approved these changes Jul 1, 2022
@kaydeearts kaydeearts marked this pull request as ready for review July 1, 2022 22:37
@kaydeearts kaydeearts merged commit 45cd8b9 into develop Jul 1, 2022
@kaydeearts kaydeearts deleted the kd-libxml2-static-link branch July 1, 2022 23:00
@sternenseemann
Copy link

Can this please be made configurable? When packaging afdko for nixpkgs we can provide libxml2 via the package manager and be confident that it'll be available at runtime as well. What we don't want is to download and link a random version of libxml2 in when building afdko.

sternenseemann added a commit to sternenseemann/nixpkgs that referenced this pull request Jul 2, 2022
@skef
Copy link
Collaborator

skef commented Jul 2, 2022

The Linux restriction in this release is likely temporary -- we needed to do something like this to resolve the libxml2 problems in the previous release. We will probably start to revisit the specifics week after next.

@skef
Copy link
Collaborator

skef commented Jan 11, 2023

@sternenseemann I added an environment variable to the root CMakeLists.txt that should allow you to force linking against the system LibXML2 on Linux. If you just set it to anything CMake should find it. Give it a shot on your distro and if it doesn't work file an issue against afdko and I'll look at it.

@sternenseemann
Copy link

@skef thanks that works & we are able to update to 3.9.2 now.

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

Successfully merging this pull request may close these issues.

4 participants