Page MenuHomeFreeBSD

www/{*chromium,iridium}: Fix build after src snapshot 0c47b9c211
ClosedPublic

Authored by jrm on Jul 21 2024, 3:51 PM.
Tags
None
Referenced Files
F104946849: D46055.diff
Wed, Dec 11, 12:46 AM
Unknown Object (File)
Wed, Nov 20, 11:44 AM
Unknown Object (File)
Wed, Nov 20, 10:29 AM
Unknown Object (File)
Wed, Nov 20, 10:25 AM
Unknown Object (File)
Wed, Nov 20, 10:25 AM
Unknown Object (File)
Wed, Nov 20, 8:34 AM
Unknown Object (File)
Sun, Nov 17, 7:08 PM
Unknown Object (File)
Sun, Nov 17, 4:01 AM
Subscribers

Details

Summary

After src snapshot 0c47b9c211, the build began failing with:

../../third_party/nasm/include/compiler.h:249:21: error: static
declaration of 'mempcpy' follows non-static declaration

249 | static inline void *mempcpy(void *dst, const void *src, size_t n)
    |                     ^

/usr/include/string.h:71:8: note: previous declaration is here

71 | void    *(mempcpy)(void * __restrict, const void * __restrict, size_t);
   |           ^
  • Restore a default definition of HAVE_MEMPCPY to indicate that mempcpy(3) is available. It has been part of FreeBSD since 13.1.
  • Remove a patch used to detect mempcpy(3) in /usr/include/string.h. It is no longer necessary and does not detect the function after src snapshot 0c47b9c211.
Test Plan

Some tests are still running and will take days to complete on my build system. However, I think we are safe, given that the same changes have been applied to other ports that bundle nasm.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58753
Build 55641: arc lint + arc unit

Event Timeline

jrm requested review of this revision.Jul 21 2024, 3:51 PM
jrm created this revision.
jrm added a subscriber: kevans.

Also remove patch-third__party_nasm_BUILD.gn.

jrm retitled this revision from www/chromium and www/ungoogled-chromium: Fix build on main to www/chromium and www/ungoogled-chromium: Fix build.Jul 22 2024, 3:17 PM
jrm edited the summary of this revision. (Show Details)
jrm edited the test plan for this revision. (Show Details)

I'd rather much prefer third_party/nasm/BUILD.gn to be fixed. Also you are not adding HAVE_MEMPCPY , you are removing it.

I'd rather much prefer third_party/nasm/BUILD.gn to be fixed.

I can rework the regex and restore patch-third__party_nasm_BUILD.gn, but it seems unnecessary. Could you elaborate on why it's still useful? We are testing for something with a certain answer because all our systems have supported mempcpy() since 13.1. Moreover, all our other bundled nasm (multimedia/ringrtc, devel/electron*, www/qt6-webengine) have now removed the patch. It would be nice to have all these ports consistent.

Also you are not adding HAVE_MEMPCPY , you are removing it.

The unpatched third_party/nasm/config/config-linux.h has #define HAVE_MEMPCPY 1. I'm removing a part of our patch that removed #define HAVE_MEMPCPY 1, i.e., restoring upstream's default of including #define HAVE_MEMPCPY 1.

In D46055#1050502, @jrm wrote:

I'd rather much prefer third_party/nasm/BUILD.gn to be fixed.

I can rework the regex and restore patch-third__party_nasm_BUILD.gn, but it seems unnecessary. Could you elaborate on why it's still useful? We are testing for something with a certain answer because all our systems have supported mempcpy() since 13.1. Moreover, all our other bundled nasm (multimedia/ringrtc, devel/electron*, www/qt6-webengine) have now removed the patch. It would be nice to have all these ports consistent.

Also you are not adding HAVE_MEMPCPY , you are removing it.

The unpatched third_party/nasm/config/config-linux.h has #define HAVE_MEMPCPY 1. I'm removing a part of our patch that removed #define HAVE_MEMPCPY 1, i.e., restoring upstream's default of including #define HAVE_MEMPCPY 1.

Because the patches of *chromium are shared between *BSDs, and not all of them have mempcpy so detecting its availability is necessary. I can have a look into this later this week if you want me to.

jrm edited the summary of this revision. (Show Details)

Understood. Here is another attempt, which fixes the build on FreeBSD main and restores the detection of mempcpy in string.h.

jrm retitled this revision from www/chromium and www/ungoogled-chromium: Fix build to www/{*chromium,iridium}: Fix build after src snapshot 0c47b9c211.Jul 23 2024, 10:05 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 28 2024, 4:16 PM
This revision was automatically updated to reflect the committed changes.