Closed Bug 1611536 Opened 2 months ago Closed 2 months ago

Build failure with musl libc -- error: unknown type name 'int32_t'

Categories

(Core :: XPCOM, defect)

72 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: mforney, Assigned: mforney)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

Attempt to build firefox against musl libc.

Actual results:

The build failed since <stdint.h> was not included, causing errors about unknown type name 'int32_t'. The issue was observed on firefox 72.0.2, but also exists in the current trunk.

In file included from /src/pkgsrc/www/firefox/work/firefox-72.0.2/toolkit/components/remote/RemoteUtils.cpp:15:
/src/pkgsrc/www/firefox/work/firefox-72.0.2/toolkit/components/remote/RemoteUtils.h:9:28: error: unknown type name 'int32_t'
char* ConstructCommandLine(int32_t argc, char** argv,
^
/src/pkgsrc/www/firefox/work/firefox-72.0.2/toolkit/components/remote/RemoteUtils.cpp:44:28: error: unknown type name 'int32_t'
char* ConstructCommandLine(int32_t argc, char** argv,
^
/src/pkgsrc/www/firefox/work/firefox-72.0.2/toolkit/components/remote/RemoteUtils.cpp:58:3: error: unknown type name 'int32_t'
int32_t argvlen = strlen(cwdbuf);
^
/src/pkgsrc/www/firefox/work/firefox-72.0.2/toolkit/components/remote/RemoteUtils.cpp:60:5: error: unknown type name 'int32_t'
int32_t len = strlen(argv[i]);
^
/src/pkgsrc/www/firefox/work/firefox-72.0.2/toolkit/components/remote/RemoteUtils.cpp:68:8: error: use of undeclared identifier 'int32_t'
(int32_t*)malloc(argvlen + argc + 1 + sizeof(int32_t) * (argc + 1));
^
/src/pkgsrc/www/firefox/work/firefox-72.0.2/toolkit/components/remote/RemoteUtils.cpp:68:16: error: expected expression
(int32_t*)malloc(argvlen + argc + 1 + sizeof(int32_t) * (argc + 1));
^
6 errors generated.

Expected results:

The build should have completed successfully.

musl libc does not define these types through the other headers
included by this file, which causes a number of build errors:

error: unknown type name 'int32_t'
Assignee: nobody → mforney
Status: UNCONFIRMED → ASSIGNED
Component: Untriaged → XPCOM
Ever confirmed: true
Product: Firefox → Core
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1acc873aa118
Add stdint.h include for fixed-width integer types r=Ehsan
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.