Bug 279802 - devel/electron29: Fails to build due to alloca issue
Summary: devel/electron29: Fails to build due to alloca issue
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hiroki Tagato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-16 22:10 UTC by Naram Qashat
Modified: 2024-06-22 23:13 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Naram Qashat 2024-06-16 22:10:21 UTC
I believe this might affect all electron ports, but I tagged electron29 specifically because it was being built for vscode. It seems that the electron ports are suffering the same bug #279397 that affected chromium. Basically the alloca function through sqlite3 is failing.

Full build log for electron29 failing: https://poudriere.cyberbotx.com:8768/data/13amd64-default/2024-06-16_13h06m43s/logs/errors/electron29-29.4.2.log
Comment 1 Hiroki Tagato freebsd_committer freebsd_triage 2024-06-18 06:11:53 UTC
(In reply to Naram Qashat from comment #0)

Thanks for reporting the issue.

The official package builders are seeing the same error:
https://pkg-status.freebsd.org/beefy22/data/140amd64-default/e0861e7ef8ca/logs/electron29-29.4.2.log

I will check if the same fix for chromium is applicable to electron ports.
Comment 2 Hiroki Tagato freebsd_committer freebsd_triage 2024-06-22 23:06:38 UTC
I have confirmed that the same fix for chromium solves the problem. I will commit the fix shortly.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-06-22 23:12:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=65456c4820cabf881f62cb2d3048d792cf4c121d

commit 65456c4820cabf881f62cb2d3048d792cf4c121d
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2024-06-22 23:09:07 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2024-06-22 23:12:06 +0000

    devel/electron29: fix build error regarding alloca in sqlite

    The error was:
    In file included from ../../third_party/sqlite/sqlite3_shim.c:16:
    ../../third_party/sqlite/src/amalgamation/sqlite3.c:53602:21: warning: call to undeclared function 'alloca'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     53602 |     u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
           |                     ^
    ../../third_party/sqlite/src/amalgamation/sqlite3.c:20531:38: note: expanded from macro 'sqlite3StackAllocRaw'
     20531 | # define sqlite3StackAllocRaw(D,N)   alloca(N)
           |                                      ^
    ../../third_party/sqlite/src/amalgamation/sqlite3.c:53602:10: error: incompatible integer to pointer conversion initializing 'u32 *' (aka 'unsigned int *') with an expression of type 'int' [-Wint-conversion]
     53602 |     u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
           |          ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    PR:             279802
    Reported by:    Naram Qashat <cyberbotx@cyberbotx.com>
    Obtained from:  https://cgit.freebsd.org/ports/commit/?id=4ba66b974729b45f6c2418d87d7403ef2e7b474d

 .../patch-third__party_sqlite_src_amalgamation_sqlite3.c      | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Comment 4 Hiroki Tagato freebsd_committer freebsd_triage 2024-06-22 23:13:49 UTC
Committed, thanks!