-
Notifications
You must be signed in to change notification settings - Fork 52
Fix 599 (Ubuntu 26.04 compat) by statically linking libxml2.so #605
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
Open
Patrick Nelson (plnelson)
wants to merge
2
commits into
main
Choose a base branch
from
panelson-microsoft-fix-599
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| NOTICES AND INFORMATION | ||
| Do Not Translate or Localize | ||
|
|
||
| This software incorporates material from third parties. | ||
| Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, | ||
| or you may send a check or money order for US $5.00, including the product name, | ||
| the open source component name, platform, and version number, to: | ||
|
|
||
| Source Code Compliance Team | ||
| Microsoft Corporation | ||
| One Microsoft Way | ||
| Redmond, WA 98052 | ||
| USA | ||
|
|
||
| Notwithstanding any other terms, you may reverse engineer this software to the extent | ||
| required to debug changes to any libraries licensed under the GNU Lesser General Public License. | ||
|
|
||
| libxml2 | ||
| ======= | ||
|
|
||
| Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved. | ||
| Copyright (C) The Libxml2 Contributors. | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
|
|
||
| # Require at least version 3.14 of CMake | ||
| cmake_minimum_required(VERSION 3.14) | ||
| # Require at least version 3.18 of CMake | ||
| cmake_minimum_required(VERSION 3.18) | ||
|
|
||
| IF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}" OR NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}") | ||
| message(FATAL_ERROR "Required property CMAKE_INSTALL_PREFIX not correctly defined.") | ||
|
|
@@ -233,6 +233,53 @@ function(generate_exports_file inputFilename versionName outputFilename) | |
| PROPERTIES GENERATED TRUE) | ||
| endfunction() | ||
|
|
||
| function(fetch_libxml2) | ||
| include(FetchContent) | ||
|
|
||
| set(BUILD_SHARED_LIBS OFF) | ||
| set(LIBXML2_WITH_C14N OFF) | ||
| set(LIBXML2_WITH_CATALOG OFF) | ||
| set(LIBXML2_WITH_DEBUG OFF) | ||
| set(LIBXML2_WITH_DOCS OFF) | ||
| set(LIBXML2_WITH_HTML OFF) | ||
| set(LIBXML2_WITH_HTTP OFF) | ||
| set(LIBXML2_WITH_ICU OFF) | ||
| set(LIBXML2_WITH_MODULES OFF) | ||
| set(LIBXML2_WITH_OUTPUT OFF) | ||
| set(LIBXML2_WITH_PATTERN OFF) | ||
| set(LIBXML2_WITH_PROGRAMS OFF) | ||
| set(LIBXML2_WITH_PYTHON OFF) | ||
| set(LIBXML2_WITH_READER OFF) | ||
| set(LIBXML2_WITH_REGEXPS OFF) | ||
| set(LIBXML2_WITH_RELAXNG OFF) | ||
| set(LIBXML2_WITH_SCHEMAS OFF) | ||
| set(LIBXML2_WITH_SCHEMATRON OFF) | ||
| set(LIBXML2_WITH_TESTS OFF) | ||
| set(LIBXML2_WITH_WRITER OFF) | ||
| set(LIBXML2_WITH_XINCLUDE OFF) | ||
| set(LIBXML2_WITH_XPATH OFF) | ||
| set(LIBXML2_WITH_XPTR OFF) | ||
| set(LIBXML2_WITH_ZLIB OFF) | ||
|
|
||
| FetchContent_Declare( | ||
| libxml2 | ||
| URL https://download.gnome.org/sources/libxml2/2.15/libxml2-2.15.3.tar.xz | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this be a netiso issue? |
||
| URL_HASH SHA256=78262a6e7ac170d6528ebfe2efccdf220191a5af6a6cd61ea4a9a9a5042c7a07 | ||
| ) | ||
| FetchContent_MakeAvailable(libxml2) | ||
|
|
||
| set_target_properties(LibXml2 PROPERTIES | ||
| C_VISIBILITY_PRESET hidden | ||
| VISIBILITY_INLINES_HIDDEN true | ||
| ) | ||
|
|
||
| if(CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
| target_link_options(LibXml2 INTERFACE | ||
| "LINKER:--exclude-libs,libxml2.a" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't entirely understand this exclusion |
||
| ) | ||
| endif() | ||
| endfunction() | ||
|
|
||
| macro (fetch_google_test) | ||
| include(FetchContent) | ||
| FetchContent_Declare( | ||
|
|
@@ -365,6 +412,8 @@ add_library_pal(coreclrpal true ${CORECLR_PAL_ROOT}/lib/${CMAKE_BUILD_TYPE}/libc | |
| add_library_pal(palrt true ${CORECLR_PAL_ROOT}/lib/${CMAKE_BUILD_TYPE}/libpalrt.a) | ||
| add_library_pal(corguids false ${CORECLR_PAL_ROOT}/lib/${CMAKE_BUILD_TYPE}/libcorguids.a) | ||
|
|
||
| fetch_libxml2() | ||
|
|
||
| add_subdirectory(unix/src) | ||
| add_subdirectory(unix/src/atl) | ||
| add_subdirectory(Common.Lib) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/unix/docker/context/components/libxml2/cgmanifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/component-detection-manifest.json", | ||
| "Registrations": [ | ||
| { | ||
| "Component": { | ||
| "Type": "other", | ||
| "other": { | ||
| "Name": "libxml2", | ||
| "Version": "2.15.3", | ||
| "DownloadUrl": "https://download.gnome.org/sources/libxml2/2.15/libxml2-2.15.3.tar.xz", | ||
| "SHA256CHECK": "78262a6e7ac170d6528ebfe2efccdf220191a5af6a6cd61ea4a9a9a5042c7a07" | ||
| } | ||
| }, | ||
| "DevelopmentDependency": false | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.