Closed Bug 1130709 Opened 7 years ago Closed 7 years ago

build fails with musl libc: __BEGIN_DECLS not defined in media/webrtc/signaling/src/sdp/sipcc

Categories

(Firefox Build System :: General, defect)

38 Branch
x86_64
Linux
defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: felix.janda, Assigned: felix.janda)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150207112030

Steps to reproduce:

Try to build on a musl libc based system (http://musl-libc.org)


Actual results:

Compile failure in media/webrtc/signaling/src/sdp/sipcc/cpr_string.h because of undefined __BEGIN_DECLS. The files media/webrtc/signaling/src/sdp/sipcc/cpr_*_types.h defines __BEGIN_DECLS, however don't seem to be included in media/webrtc/signaling/src/sdp/sipcc/cpr_types.h because SIP_OS_* is not defined.
Attached patch Proposed patchSplinter Review
The patch expands __BEGIN_DECLS and __END_DECLS in the 3 places where it is used and removes their definitions from cpr_*_types.h.

If the firefox build system does not export SIP_OS_*, the files cpr_*_types.h might actually be unused.
Component: Untriaged → Build Config
Attachment #8560854 - Flags: review?(docfaraday)
Comment on attachment 8560854 [details] [diff] [review]
Proposed patch

Review of attachment 8560854 [details] [diff] [review]:
-----------------------------------------------------------------

::: media/webrtc/signaling/src/sdp/sipcc/cpr_strings.h
@@ +7,3 @@
>  
>  #include "cpr_types.h"
>  

Let's keep the extern "C" stuff here. Otherwise ok.

Do you have try access? If not, I can do a try push once you have a new patch.
Attachment #8560854 - Flags: review?(docfaraday) → review-
Thanks for reviewing.

The rationale for leaving out the extern "C" in crp_strings.h is that this header contains only #defines (and no function declarations,...), which are not subject to name mangling.

I don't have try access. Thanks for offering to do a try push for me!
(In reply to Felix Janda from comment #3)
> Thanks for reviewing.
> 
> The rationale for leaving out the extern "C" in crp_strings.h is that this
> header contains only #defines (and no function declarations,...), which are
> not subject to name mangling.
> 
> I don't have try access. Thanks for offering to do a try push for me!

   Ahh, I was looking at cpr_string.h and not cpr_strings.h in dxr. My mistake.
Attachment #8560854 - Flags: review- → review+
https://hg.mozilla.org/mozilla-central/rev/3e7a3784e747
Assignee: nobody → felix.janda
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Mistakenly filed against Firefox 38 and should be instead 38 Branch. Sorry for the spam. dkl
Version: Firefox 38 → 38 Branch
Component: Build Config → General
Product: Firefox → Firefox Build System
Target Milestone: Firefox 40 → mozilla40
You need to log in before you can comment on or make changes to this bug.