Skip to content
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

Fix build failures on MinGW during package CI #1452

Merged
merged 13 commits into from
Jun 21, 2024
Merged

Conversation

seladb
Copy link
Owner

@seladb seladb commented Jun 17, 2024

This PR addresses this issue: #1347

I'm not entirely sure how the MinGW build we have in the package workflow is different from the one we have in the build_and_test workflow (both have the same versions and are running on the same type of VM), but anyway I addressed the build failure and they all seem to pass now:
package: https://github.com/seladb/PcapPlusPlus/actions/runs/9577752848
build_and_test: https://github.com/seladb/PcapPlusPlus/actions/runs/9577752845

@seladb seladb changed the base branch from master to dev June 17, 2024 08:57
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.53%. Comparing base (6ee2639) to head (dbfee2a).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1452   +/-   ##
=======================================
  Coverage   82.53%   82.53%           
=======================================
  Files         171      171           
  Lines       22399    22399           
  Branches     8548     8548           
=======================================
  Hits        18487    18487           
+ Misses       3114     3108    -6     
- Partials      798      804    +6     
Flag Coverage Δ
alpine317 72.70% <ø> (ø)
fedora37 72.67% <ø> (-0.05%) ⬇️
macos-12 61.30% <ø> (ø)
macos-13 60.36% <ø> (ø)
macos-14 60.36% <ø> (ø)
macos-ventura 61.41% <ø> (-0.02%) ⬇️
mingw32 70.66% <ø> (-0.01%) ⬇️
mingw64 70.67% <ø> (+0.09%) ⬆️
npcap 83.82% <ø> (ø)
rhel93 72.68% <ø> (-0.05%) ⬇️
ubuntu1804 75.26% <ø> (ø)
ubuntu2004 73.69% <ø> (+<0.01%) ⬆️
ubuntu2204 72.54% <ø> (ø)
ubuntu2204-icpx 58.84% <ø> (-0.01%) ⬇️
unittest 82.53% <ø> (ø)
windows-2019 83.84% <ø> (ø)
windows-2022 83.84% <ø> (ø)
winpcap 83.81% <ø> (+<0.01%) ⬆️
xdp 60.22% <ø> (ø)
zstd 73.91% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -621,7 +621,6 @@ namespace pcpp
std::vector<uint8_t> Asn1IntegerRecord::encodeValue() const
{
std::vector<uint8_t> result;
result.reserve(m_ValueLength);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea why the compiler complains here, but I think it's fine to remove it:
https://github.com/seladb/PcapPlusPlus/actions/runs/9562329238/job/26358481698

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we ignore this line only for MinGW?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a compilation error so not sure we can ignore it, but I think removing it is ok, I don't foresee a big performance impact because of it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean ifndef MinGW or some similar syntax.
I think it's better to keep the reserve as it still works for other platforms.

Copy link
Owner Author

@seladb seladb Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried with __MIGW32__ / __MINGW64__, but it didn't work: https://github.com/seladb/PcapPlusPlus/actions/runs/9593015503/job/26452660814

Then I changed to __MINGW32_VERSION_MAJOR / __MINGW64_VERSION_MAJOR as we do here and it worked: https://github.com/seladb/PcapPlusPlus/actions/runs/9593255865

@seladb seladb changed the title Fix LightPcapNg build failure on MinGW Fix build failures on MinGW during package CI Jun 19, 2024
@seladb seladb marked this pull request as ready for review June 19, 2024 07:44
@tigercosmos
Copy link
Collaborator

@seladb last thing before merging, could you add a note for every place you made changes?
such as // PCPP patch
since it's a forked code, it will be easier to trace in the future.

@seladb
Copy link
Owner Author

seladb commented Jun 21, 2024

@seladb last thing before merging, could you add a note for every place you made changes? such as // PCPP patch since it's a forked code, it will be easier to trace in the future.

Done in commit dbfee2a

@seladb seladb merged commit 7ea5205 into dev Jun 21, 2024
40 checks passed
@seladb seladb deleted the fix-lightpcapng-build branch June 21, 2024 07:06
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.

2 participants