Skip to content

[libxml2] Add iconv and charset linkage in vcpkg-cmake-wrapper on osx#11072

Merged
strega-nil merged 5 commits intomicrosoft:masterfrom
Neumann-A:fix_libxml2_static_linkage
May 18, 2020
Merged

[libxml2] Add iconv and charset linkage in vcpkg-cmake-wrapper on osx#11072
strega-nil merged 5 commits intomicrosoft:masterfrom
Neumann-A:fix_libxml2_static_linkage

Conversation

@Neumann-A
Copy link
Contributor

closes #11001
makes #10770 work on osx

find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib)
select_library_configurations(ICONV)
select_library_configurations(CHARSET)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this due to we might use system iconv or within vcpkg on different platforms?
So we don't use find_package(unofficial-iconv to find iconv here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I try to avoid unofficial packages. The correct way would probably be to have pkg-config for iconv here but thats not yet integrated into vcpkg.

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND LIBXML2_LIBRARIES m)
else()
list(APPEND LIBXML2_LIBRARIES ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES})
Copy link
Contributor

Choose a reason for hiding this comment

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

Is iconv only required on Windows and osx platform?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At least it looks like libxml is not linking against iconv on Linux or is linking against a shared version which does not require propagation. The correct fix would probably to make iconv build on all platforms and linking correctly against that.

@BillyONeal
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NancyLi1013
Copy link
Contributor

@Neumann-A
Could you please resolve the conflict?

…c_linkage

# Conflicts:
#	scripts/ci.baseline.txt
@NancyLi1013
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NancyLi1013 NancyLi1013 added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label May 14, 2020
@strega-nil
Copy link
Contributor

This looks great! Thanks @Neumann-A :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[libxml2] (OSX) Dependent ports fail due to missing iconv linkage

4 participants