-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: provide official CMake variables + del fPIC if shared + fix system libs #4625
libxml2: provide official CMake variables + del fPIC if shared + fix system libs #4625
Conversation
a patch in _configure_autotools() with be executed twice with conan create -kb
if not self._is_msvc: | ||
if self.options.zlib or self.options.lzma or self.options.icu: | ||
self.build_requires("pkgconf/1.7.3") | ||
if tools.os_info.is_windows and not tools.get_env("CONAN_BASH_PATH"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msys2 is only needed for mingw or am I seeing this wrong? I have often mentioned that this change makes cross compiling on windows for android no longer possible and you install msys2 unnecessarily when using windows clang for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic was already there (and all recipes where autotools is used for mingw@windows) before this PR:
- all triplets will run
configure
except if Visual Studio compiler - you need a shell to run configure
- there is no shell on windows by default
- 1+2+3 => we need msys2 if build machine is windows and compiler is not Visual Studio
The reason why it fails for cross compilation doesn't come from this logic, but from conan or msys2 recipe which shouldn't fail in configure()
method of msys2 recipe when you cross compile from windows.
A workaround is to set CONAN_BASH_PATH
. Anyway you'll need a shell for this recipe if you don't use Visual Studio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic was already there
I don't know why cscript/configure.js is limited to VS only on Windows. Actually msys2 is not needed here at all, not even for MinGW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, it was removed in #2149. I would like to revert this modification but maybe not in this PR since it requires some effort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a typo
os.remove(os.path.join(self.package_folder, "lib", "libxml2_a_dll.lib")) | ||
os.remove(os.path.join(self.package_folder, "lib", "libxml2_a.lib" if self.options.shared else "libxml2.lib")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be simplified?
os.remove(os.path.join(self.package_folder, "lib", "libxml2_a_dll.lib")) | |
os.remove(os.path.join(self.package_folder, "lib", "libxml2_a.lib" if self.options.shared else "libxml2.lib")) | |
tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "libxml2*.lib") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. You remove both libxml2_a.lib
and libxml2.lib
. One must remain.
Co-authored-by: Chris Mc <[email protected]>
Specify library name and version: lib/1.0
conan-center hook activated.