Closed Bug 1391127 Opened 7 years ago Closed 7 years ago

Build error in Brotli: log2 not found in MinGW Build

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: tjr, Assigned: tjr)

References

(Blocks 1 open bug)

Details

(Whiteboard: [tor])

Attachments

(1 file)

> backward_references_hq.c:(.text+0x104): undefined reference to `log2'

I believe this is an upstream bug related to their #if here: https://github.com/google/brotli/blob/master/c/enc/fast_log.h#L131
Assignee: nobody → tom
I take it back, mingw does have log2, so I probably need to add a -lm or something somewhere...
Attachment #8898330 - Flags: review?(jfkthame)
Comment on attachment 8898330 [details]
Bug 1391127 Add -lm for brotli when compiling with gcc for Windows

https://reviewboard.mozilla.org/r/169678/#review174920

Seems OK to me, but as this is a moz.build thing, we should probably ask :glandium for the actual r+, in case there's some better way to do it...
Attachment #8898330 - Flags: review?(jfkthame) → review?(mh+mozilla)
Component: Networking: HTTP → Build Config
Comment on attachment 8898330 [details]
Bug 1391127 Add -lm for brotli when compiling with gcc for Windows

https://reviewboard.mozilla.org/r/169678/#review175252

::: modules/brotli/moz.build:57
(Diff revision 1)
>      'enc/static_dict.c',
>      'enc/utf8_util.c',
>      'tools/bro.c',
>  ]
>  
> -if CONFIG['OS_TARGET'] != 'WINNT':
> +if CONFIG['OS_TARGET'] != 'WINNT' or CONFIG['CC_TYPE'] == 'gcc':

err, in fact, CONFIG['OS_TARGET'] is wrong here too.
All in all the right test here would be CONFIG['HOST_CC_TYPE'] not in ('msvc', 'clang-cl')
Attachment #8898330 - Flags: review?(mh+mozilla)
Try run is okay (excepting broken buildbot).
Comment on attachment 8898330 [details]
Bug 1391127 Add -lm for brotli when compiling with gcc for Windows

https://reviewboard.mozilla.org/r/169678/#review176096
Attachment #8898330 - Flags: review?(mh+mozilla) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/45976ebf90f7
Add -lm for brotli when compiling with gcc for Windows r=glandium
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/45976ebf90f7
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: