Bug 257378 - devel/electron12 fails to build on amd64 stable 13 using poudriere with error: static declaration of 'mempcpy' follows non-static declaration
Summary: devel/electron12 fails to build on amd64 stable 13 using poudriere with error...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Hiroki Tagato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-24 08:05 UTC by Robert Cina
Modified: 2021-09-19 08:02 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (tagattie)


Attachments
electron12 poudriere log of build failiure on amd64 stable 13 (424.57 KB, text/plain)
2021-07-24 08:05 UTC, Robert Cina
no flags Details
Patch based on Bug257352 for www/chromium (1.51 KB, patch)
2021-08-07 14:45 UTC, Tomoaki AOKI
no flags Details | Diff
Patch based on Bug257352 and Bug258271 for www/chromium (1.67 KB, patch)
2021-09-19 05:47 UTC, Tomoaki AOKI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Cina 2021-07-24 08:05:29 UTC
Created attachment 226650 [details]
electron12 poudriere log of build failiure on amd64 stable 13

The port devel/electron12 fails to build on amd64 stable 13 using poudriere with the following error:

static declaration of 'mempcpy' follows non-static declaration
static inline void *mempcpy(void *dst, const void *src, size_t n)
                    ^
/usr/include/string.h:70:7: note: previous declaration is here
void    *mempcpy(void * __restrict, const void * __restrict, size_t);
Comment 1 Robert Cina 2021-07-25 01:33:17 UTC
Just want to add this is related to the same error occurring for the Chromium build bug where mempcpy was added to base libc as shown below:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257352
Comment 2 Tomoaki AOKI 2021-08-07 14:45:18 UTC
Created attachment 227006 [details]
Patch based on Bug257352 for www/chromium

Does this patch work for you?
I myself cannot try due to dependency conflicts. (node, yarn,...)

This is based on patch for Bug 257352. [1]
Makefile part is modified to fit devel/electron12.
(And date and time of original files.)

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257352
Comment 3 Robert Cina 2021-08-07 16:14:55 UTC
Thanks. Will give this patch a try and report back on how it goes.
Comment 4 Robert Cina 2021-08-07 21:50:44 UTC
Electron seems to have built successfully here with this patch applied.
Thanks for the fix.
Comment 5 Tomoaki AOKI 2021-09-19 05:47:51 UTC
Created attachment 227998 [details]
Patch based on Bug257352 and Bug258271 for www/chromium

Avoid warning on previous patch while building Index for branches not yet MFC'ed mempcpy() addition.
Actually, merge previous patch and proposed fix for www/chromium on Bug258271, v2 patch by Felix.
Comment 6 Daniel Shafer 2021-09-19 05:52:02 UTC
So the patch fixed the build problem stated in the ticket, but curious if anyone got this further down the line:

../../sandbox/linux/suid/sandbox.c:12:10: fatal error: 'asm/unistd.h' file not found
#include <asm/unistd.h>
         ^~~~~~~~~~~~~~
Comment 7 Tomoaki AOKI 2021-09-19 07:11:07 UTC
(In reply to Daniel Shafer from comment #6)
As I wrote on past comment, I myself cannot build-test devel/electron12 due to dependency conflict. would need some other person to look in and fix. Sorry.

 *I remember that initial devel/electron* port was derived from www/chromium and
  found this PR, so ported the fix for www/chromium by hand.


But I "feel" it seems to be a lack of dependency.
For my case, /compat/linux/usr/include/asm/unistd.h was installed by package linux-c7-devtools-7.9.2009 and www/chromium builds fine at git 9e6695a71d64.

 *Build after commit git 17218fbbe799 is on-going just now.
Comment 8 Daniel Shafer 2021-09-19 08:02:12 UTC
(In reply to Tomoaki AOKI from comment #7)

So I added it as a dependency just to see, and it still wouldn't build.  Not sure much about this, if there is anything I can test I will be happy to do so.