Skip to content

Conversation

philrz
Copy link

@philrz philrz commented Jan 15, 2021

Our Suricata build on Windows suffered some bit rot, as shown in this Action failure:

https://github.com/brimsec/build-suricata/runs/1704451655?check_suite_focus=true#step:8:1418

In diff'ing what changed since the last successful Windows build, one thing that stood out is that the Rust version grabbed via pacman -Su mingw-w64-x86_64-rust jumped from 1.43.0 to 1.48.0. Sure enough, the releases notes for 1.44.0 describes a change as "Rustc now correctly generates static libraries on Windows GNU targets with the .a extension, rather than the previous .lib" That led me to find OISF#5623 where the Suricata maintainers adapted to that change. I cherry-picked the two commits from that PR into this branch and made a companion build-suricata/fix-build-windows-lib branch that points to it, and you can see the successful build in this Actions run:

https://github.com/brimsec/build-suricata/runs/1705758315?check_suite_focus=true

philrz and others added 4 commits January 14, 2021 15:42
Moving the libs specified in LDFLAGS to LDADD put them into the
correct placement on in the link command.

(cherry picked from commit 10f639e)
Prior to Rust 1.44, Cargo would name static libs with the .lib
extension. 1.44 changes this extension to .a when running under
a GNU environment on Windows like msys to make it more similar
to other unix environments.

Now assume static library name to be the same on Windows and
unix, but rename the .lib if found to still support older
versions of Rust on Windows.

(cherry picked from commit f3c59ef)
@philrz philrz requested a review from henridf January 15, 2021 01:29
@philrz philrz self-assigned this Jan 15, 2021
@philrz philrz merged commit 61bde44 into brim-suricata-5.0.3 Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants