Closed
Bug 1204425
Opened 9 years ago
Closed 9 years ago
[B2G][Emulator] Failed to build emulator-kk / x86-kk on Mac OS X
Categories
(Firefox OS Graveyard :: Emulator, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: freesamael, Assigned: freesamael)
References
Details
Attachments
(1 file)
Error message: > external/qemu/telephony/android_modem.c: In function ‘format_inet_addr’: > external/qemu/telephony/android_modem.c:813: error: ‘struct in6_addr’ has no member named ‘s6_addr32’ > external/qemu/telephony/android_modem.c: In function ‘amodem_init_rmnets’: > external/qemu/telephony/android_modem.c:853: error: ‘struct in6_addr’ has no member named ‘s6_addr32’ > external/qemu/telephony/android_modem.c:854: error: ‘struct in6_addr’ has no member named ‘s6_addr32’ > external/qemu/telephony/android_modem.c:855: error: ‘struct in6_addr’ has no member named ‘s6_addr32’ > external/qemu/telephony/android_modem.c:859: error: ‘struct in6_addr’ has no member named ‘s6_addr32’ > external/qemu/telephony/android_modem.c:865: error: ‘struct in6_addr’ has no member named ‘s6_addr32’ Checked the definition of struct in6_addr on Mac (/usr/include/netinet6/in6.h) > struct in6_addr { > union { > __uint8_t __u6_addr8[16]; > __uint16_t __u6_addr16[8]; > __uint32_t __u6_addr32[4]; > } __u6_addr; /* 128-bit IP6 address */ > }; > #define s6_addr __u6_addr.__u6_addr8 In comparison the Linux version is: > #if __UAPI_DEF_IN6_ADDR > struct in6_addr { > union { > __u8 u6_addr8[16]; > #if __UAPI_DEF_IN6_ADDR_ALT > __be16 u6_addr16[8]; > __be32 u6_addr32[4]; > #endif > } in6_u; > #define s6_addr in6_u.u6_addr8 > #if __UAPI_DEF_IN6_ADDR_ALT > #define s6_addr16 in6_u.u6_addr16 > #define s6_addr32 in6_u.u6_addr32 > #endif > }; > #endif /* __UAPI_DEF_IN6_ADDR */ It looks to me we should use "s6_addr32" directly instead of "in6_addr.s6_addr32", and maybe we need this when the target is darwin: > #define s6_addr32 in6_u.__u6_addr32
Assignee | ||
Comment 1•9 years ago
|
||
Addition: According to the POSIX standard [1], the 8 bits variant is the only safe / portable option: > [IP6] [Option Start] The <netinet/in.h> header shall define the in6_addr structure that contains at least > the following member: > > uint8_t s6_addr[16] Suggest not to use the 32bits variant. [1] http://pubs.opengroup.org/onlinepubs/000095399/basedefs/netinet/in.h.html
Assignee | ||
Comment 2•9 years ago
|
||
Trying a quick fix. It boots but I have no idea how to test it... https://github.com/freesamael/platform_external_qemu/commit/8fe9a475d292cc5ec3a36ecb72155b4888dd74e0
Assignee | ||
Comment 3•9 years ago
|
||
try looks good: https://treeherder.allizom.org/#/jobs?repo=try&revision=fea612454a27
Assignee | ||
Comment 4•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → sawang
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8662161 [details] [review] Use s6_addr instead of s6_addr32. Hi Edgar, Would you help to review the pull request?
Attachment #8662161 -
Flags: review?(echen)
Comment 6•9 years ago
|
||
Comment on attachment 8662161 [details] [review] Use s6_addr instead of s6_addr32. r=me with the comments on github addressed. Thanks for the fix.
Attachment #8662161 -
Flags: review?(echen) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=88556cec9579
Assignee | ||
Comment 8•9 years ago
|
||
Got one harness failure https://treeherder.allizom.org/#/jobs?repo=try&revision=06d67c83e948 But the same error occurs without patch https://treeherder.allizom.org/#/jobs?repo=try&revision=b119969f6543
Assignee | ||
Comment 9•9 years ago
|
||
try passes: https://treeherder.allizom.org/#/jobs?repo=try&revision=51b634bcb2be
Comment 10•9 years ago
|
||
Thank you. b2g-kitkat: https://github.com/mozilla-b2g/platform_external_qemu/commit/b2773dbc3cb24e70cff2b05522e9c959250400ac
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•