-
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 - cannot build with 'msvc' compiler #13511
libxml2 - cannot build with 'msvc' compiler #13511
Conversation
This comment has been minimized.
This comment has been minimized.
I added some code to the recipe to translate "dynamic + Release" runtime to "MD", and then tried to build. See log file attached, it is really weird that cl.exe complains about -dynamic but there is no mention on the cl.exe command line. So it looks like -dynamic is coming from conan itself during the calls? Or in the environment somehow? |
This comment has been minimized.
This comment has been minimized.
We still need to fixup msvc support, however after that: libxml2 upstream has CMake support now, although quote "mainly for Windows" The CMake file has been available since around 2.9.11 I think, so we could drop some old libxml2 versions and delete the MSVC part of the recipe. |
@paulharris I'm not sure why Would conan.tools.microsoft.msvc_runtime_flag help here? The DBus recipe has transitioned over time from Autotools to CMake to CMake for older versions and Meson for the latest version. I think adding CMake for the releases that support it wouldn't be a bad idea if it works well, even if it's only for Windows. Maybe |
Uh I think there is a misunderstanding:
Currently I've reverted back to building everything with the @SpaceIm pointed out this issue: conan-io/conan#12188 |
So, the problem still remains... Log files here: This one works, but with the old "Visual Studio" compiler definition This one fails with -dynamic parameter warnings, and link errors for test_package. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
(Note I have disabled msvc while this is debugged) I need some help with this... mingw acting weird. Works fine on Linux, but on mingw, all of the internal flags (like Here it is building on Proof:
I built it again on linux and windows-mingw with the same options and diff'd the build folder, attached is result. |
@madebr I hear you might be able to help? |
Wow that is a lot of attempts. Well, what if we switched to using its cmake builder? |
I converted all the I normally only convert the very simple strings, and if there is a simple string followed by a complex one that is symmetrical, I normally would leave them both as a .format() so you can read the code easier and compare simple-and-complex. Is there a general policy on this? What do you guys want to see? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: SpaceIm <[email protected]>
Co-authored-by: SpaceIm <[email protected]>
This comment has been minimized.
This comment has been minimized.
The CI gave me a weird error message, so I'm retrying. Not sure if it is a CI problem, or my problem...
|
This comment has been minimized.
This comment has been minimized.
Seems to cause issues on CI
Conan v1 pipelineAll green in build 29 (
|
@prince-chrismc heads-up: the technique of using Anyway, the recipe now passes :) Ready for review! |
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 is a huge lift, if there are small details then we can save them for a follow up PR - lets get this out and see the feedback
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.
LGTM
message("LIBXML2_FOUND: ${LIBXML2_FOUND}") | ||
message("LIBXML2_INCLUDE_DIR: ${LIBXML2_INCLUDE_DIR}") | ||
message("LIBXML2_INCLUDE_DIRS: ${LIBXML2_INCLUDE_DIRS}") | ||
message("LIBXML2_LIBRARIES: ${LIBXML2_LIBRARIES}") | ||
message("LIBXML2_LIBRARY: ${LIBXML2_LIBRARY}") | ||
message("LIBXML2_DEFINITIONS: ${LIBXML2_DEFINITIONS}") | ||
message("LIBXML2_VERSION_STRING: ${LIBXML2_VERSION_STRING}") |
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.
it's not a test
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.
It was there before, and things that use it as a module tend to want these defined,
so I was checking with these.
Happy for them to be removed in a future PR :)
I've read over and over that the "Visual Studio" compiler is going away in v2,
to be replaced with the "msvc" compiler.
So I thought I'd switch to "msvc" now while I was in Windows and upgrading to v2.
libxml2 won't build as it does this:
ie one fundamental difference in settings.yml for VS and msvc is the "runtime" specification.
There are LOTS of scripts that are assuming the runtime will equal either "MD" or "MT",
but there doesn't appear to be any guidance in the Migration documentation, or any checks in linter...
Is there any CI machines building for "msvc" ?
Attached is the build log for libxml2 for the "msvc" compiler, and "Visual Studio (vs)" compiler.
The main difference appears to me that the recipe calls cl.exe with /dynamic instead of /MD... and /dynamic is not understood.
I'm not sure what to do about this recipe, but surely we should be building and testing with the "msvc" compiler for the v2 migration now ?
build-vs.log
build-msvc2.log