Skip to content

Conversation

@eli-schwartz
Copy link
Contributor

Three changes:

  • MSVC did not build, because the resource compiler (*.rc files) was not instructed where to find zstd.h
  • fix building the testsuite binaries on Windows, which doesn't have a separate libm
  • console UI fixes for the valgrind wrapper

It needs to know about the correct include directories on its own.
libm is not guaranteed to exist. POSIX requires the math functions to
exist, but doesn't require to have it be a standalone library.

On platforms where libm exists as a standalone library, it will always
be found by meson -- it is shipped with libc.

If it is not found, then we can safely assume the linker will make the
math functions available by default.

See https://mesonbuild.com/howtox.html#add-math-library-lm-portably

Fixes building with bin_tests=true on Windows.
While trying to raise an exception on failures, it instead raised an
exception for misusing the exception. CalledProcessError is only
supposed to be used when given a return code and a command, and it
prints:

Command '{cmd}' returned non-zero exit status {ret}

Passing an error message string instead, just errored out with:

TypeError: __init__() missing 1 required positional argument

Instead use the subprocess module's base error which does accept string
messages. Everything that used to error out, still errors out, but now
they do so with a slightly prettier console message.
@eli-schwartz
Copy link
Contributor Author

Aside: https://github.com/mesonbuild/wrapdb/actions/runs/1770447908 (This is after I backport the fixes.)

The build itself is green on meson+MSVC, but the test is red:

3/8 test-zstream-3           FAIL             3.94s   (exit status 3221225477 or signal 3221225349 SIGinvalid)

Currently the build errors out with:

```
ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.
```

While in theory this advice could be followed to get a better pip on
xenial, Meson has now deprecated python 3.6 support too, and the next
(unreleased) version requires python 3.7

There are a couple solutions to this:
- hold the version of pip, allow pip to only install 3.6-compatible
  versions of meson (effectively freezing meson going forward)
- install python 3.7 on xenial
- update to a 2-year-old image instead of a 4-year-old one

Option 3 is the simplest.
@eli-schwartz
Copy link
Contributor Author

Alright, let's try to actually fix that meson CI on travis...

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants