Repository navigation
Fix windows build - #2654
Fix windows build#2654
Conversation
michalvasko
left a comment
There was a problem hiding this comment.
Regarding the commit cmake BUGFIX build yangupdate from an OBJECT library, if the issue is only an old version of cmake, then please remove it. We were trying to get rid of multiple main targets and be left with only yang. There is another prepared PR that increases the required cmake version to 3.12.0. But many thanks for the other fixes!
|
Yes, updating the minimal CMake version should work, too, but I think that the minimal version in which this is fixed is very likely at least 3.15. In 3.21 they fixed a dependency ordering problem related to object libraries, so you want 3.21+. |
|
Thanks for the information, we will check what |
|
You're completely right, looks like CMake accepts it since 3.15, but it only works reliably since 3.21. In #2651 I kept the |
Once a value needed a dynamic buffer, e.g. because of an entity reference or an escape sequence, every following character was appended by copying bytes from the address of its decoded code point. The code point, however, holds the Unicode integer value, not raw bytes in the UTF-8 encoding. This happened to work (for ASCII) on LE systems. On BE, the first byte of that integer is always zero, so the value got cut off at the next character. Any characters > 0x7f were mangled. Copy the bytes from the input instead. The tests need a non-ASCII character after the reference or the escape. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The tests link the shared yang library, but Windows has no rpath. It finds a DLL only next to the executable or on PATH, and neither covers where yang.dll is built. The tests are built into tests/<config>/ while yang.dll ends up in <config>/, so all of the tests died on startup with STATUS_DLL_NOT_FOUND (0xc0000135), after the build itself had already been fixed. The DLLs of the dependencies were not a problem as vcpkg copies those by itself. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This entire test was being skipped on Windows. The only problematic part is actually the OpenConfig module because of its POSIX regular expression. This test was introduced by a fix for CESNET#2581, and the thing that's tested does not actually depend on the OpenConfig regex dialect. Let's not skip this entire test, and let's use an appropriate #ifdef for this. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
4a12a4c to
9c7028a
Compare
Done. I would be perfectly OK with you cherry-picking these commits as you see fit, btw. |
xml/json BUGFIX copy value characters from the input
Once a value needed a dynamic buffer, e.g. because of an entity reference or an escape sequence, every following character was appended by copying bytes from the address of its decoded code point. The code point, however, holds the Unicode integer value, not raw bytes in the UTF-8 encoding.
This happened to work (for ASCII) on LE systems. On BE, the first byte of that integer is always zero, so the value got cut off at the next character. Any characters
> 0x7fwere mangled.Copy the bytes from the input instead. The tests need a non-ASCII character after the reference or the escape.
cmake BUGFIX build yangupdate from an OBJECT library
The yang_update library needs the internal symbols that libyang does not export, so it links the library's objects directly. But
$<TARGET_OBJECTS:>is meant forOBJECTlibraries only. New CMake versions are lenient about that, the 3.10 in the i386/ubuntu container of the 32-bit CI job is not and fails the configuration with "Objects of target "yang" referenced but is not an OBJECT library". The job has been red sinceyangobjwas removed in 8ed0dbd.Build libyang from a separate
OBJECTlibrary again and take the objects from there. This is done for the static library as well, so that the objects are available regardless ofBUILD_SHARED_LIBS.tests BUGFIX Windows load
yang.dllnext to the testsThe tests link the shared yang library, but Windows has no rpath. It finds a DLL only next to the executable or on PATH, and neither covers where yang.dll is built. The tests are built into tests// while yang.dll ends up in /, so all of the tests died on startup with
STATUS_DLL_NOT_FOUND(0xc0000135), after the build itself had already been fixed. The DLLs of the dependencies were not a problem as vcpkg copies those by itself.tests BUGFIX skip only the POSIX regex part of tpdf_reuse on Windows
This entire test was being skipped on Windows. The only problematic part is actually the OpenConfig module because of its POSIX regular expression. This test was introduced by a fix for #2581, and the thing that's tested does not actually depend on the OpenConfig regex dialect.
Let's not skip this entire test, and let's use an appropriate #ifdef for this.