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
F93112668: D46055.id141207.diff
Sat, Sep 7, 10:16 AM
Unknown Object (File)
Sun, Sep 1, 10:37 PM
Unknown Object (File)
Sun, Sep 1, 6:39 AM
Unknown Object (File)
Sun, Sep 1, 4:46 AM
Unknown Object (File)
Sat, Aug 31, 7:22 AM
Unknown Object (File)
Fri, Aug 23, 1:59 AM
Unknown Object (File)
Thu, Aug 22, 11:24 PM
Unknown Object (File)
Sun, Aug 18, 11:28 PM
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

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.