New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 12 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Sep 2014
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Chrome build fails with Apple Mac OS X 10.9+ SDK: wifi API has changed

Reported by john.r.p...@gmail.com, Jun 30 2014 Back to list

Issue description

Chromium	38.0.2076.0 (Developer Build 280541) 
OS	Mac OS X 
Blink	537.36 (@177092)
JavaScript	V8 3.28.4.1
Flash	(Disabled)
User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2076.0 Safari/537.36
Command Line	/Users/x/Projects/google/chromium/src/out/Release/Chromium.app/Contents/MacOS/Chromium --enable-avfoundation --flag-switches-begin --flag-switches-end


What is the expected result?

I understand (https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-dev/y3uHP6YbbmQ) that it should be possible to compile chromium with the 10.9 SDK.

What happens instead?

With XCode 6 Beta 2 tools (which include the 10.9 and 10.10 SDKs), compilation fails. This is because the Wifi API has changed in the 10.9 SDK.  If I compile with the XCode 5.1.1 tools (10.8 SDK) chromium compiles OK, although some of the unit tests fail under Yosemite DP2. (I will file a separate bug for that.)

Please provide any additional information below. Attach a screenshot if
possible.

ninja -C out/Release unit_tests
ninja: Entering directory `out/Release'
[4668/18313] OBJCXX obj/components/wifi/wifi_component.wifi_service_mac.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/components/wifi/wifi_component.wifi_service_mac.o.d -DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=209387 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DCLD_DATA_FROM_STATIC -DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_MANAGED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DWIFI_IMPLEMENTATION -DLIBXML_STATIC -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -I../../third_party/libxml/mac/include -I../../third_party/libxml/src/include -I../../third_party/icu/source/common -isysroot /Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -O3 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch i386 -Wall -Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wheader-hygiene -Wno-c++11-narrowing -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-deprecated-register -Wno-selector-type-mismatch -std=gnu++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /Users/jrp/Projects/google/chromium/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -fno-strict-aliasing -Wobjc-missing-property-synthesis -fobjc-call-cxx-cdtors  -c ../../components/wifi/wifi_service_mac.mm -o obj/components/wifi/wifi_component.wifi_service_mac.o
../../components/wifi/wifi_service_mac.mm:101:42: error: unknown type name 'CWSecurityMode'; did you mean 'CWSecurity'?
  std::string SecurityFromCWSecurityMode(CWSecurityMode security) const;
                                         ^~~~~~~~~~~~~~
                                         CWSecurity
/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreWLAN.framework/Headers/CoreWLANTypes.h:156:19: note: 'CWSecurity' declared here
typedef NSInteger CWSecurity;
                  ^
../../components/wifi/wifi_service_mac.mm:404:28: error: use of undeclared identifier 'kCWSSIDDidChangeNotification'; did you mean 'CWSSIDDidChangeNotification'?
        addObserverForName:kCWSSIDDidChangeNotification
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           CWSSIDDidChangeNotification
/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreWLAN.framework/Headers/CoreWLANConstants.h:33:36: note: 'CWSSIDDidChangeNotification' declared here
FOUNDATION_EXTERN NSString * const CWSSIDDidChangeNotification NS_AVAILABLE_MAC(10_6);
                                   ^
../../components/wifi/wifi_service_mac.mm:509:19: error: unknown type name 'CWSecurityMode'; did you mean 'CWSecurity'?
      static_cast<CWSecurityMode>([[network securityMode] intValue]));
                  ^~~~~~~~~~~~~~
                  CWSecurity
/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreWLAN.framework/Headers/CoreWLANTypes.h:156:19: note: 'CWSecurity' declared here
typedef NSInteger CWSecurity;
                  ^
../../components/wifi/wifi_service_mac.mm:509:45: error: 'CWNetwork' may not respond to 'securityMode' [-Werror]
      static_cast<CWSecurityMode>([[network securityMode] intValue]));
                                    ~~~~~~~ ^
../../components/wifi/wifi_service_mac.mm:511:43: error: instance method '-rssi' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
  properties->signal_strength = [[network rssi] intValue];
                                          ^~~~
/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreWLAN.framework/Headers/CWNetwork.h:21:12: note: receiver is instance of class declared here
@interface CWNetwork : NSObject <NSCopying, NSSecureCoding> {
           ^
../../components/wifi/wifi_service_mac.mm:515:5: error: use of undeclared identifier 'CWSecurityMode'; did you mean 'kCWSecurityNone'?
    CWSecurityMode security) const {
    ^~~~~~~~~~~~~~
    kCWSecurityNone
/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/CoreWLAN.framework/Headers/CoreWLANTypes.h:143:2: note: 'kCWSecurityNone' declared here
        kCWSecurityNone                 = 0,
        ^
../../components/wifi/wifi_service_mac.mm:514:29: error: redefinition of 'SecurityFromCWSecurityMode' as different kind of symbol
std::string WiFiServiceMac::SecurityFromCWSecurityMode(
                            ^
../../components/wifi/wifi_service_mac.mm:101:15: note: previous definition is here
  std::string SecurityFromCWSecurityMode(CWSecurityMode security) const;
              ^
../../components/wifi/wifi_service_mac.mm:515:20: error: expected ')'
    CWSecurityMode security) const {
                   ^
../../components/wifi/wifi_service_mac.mm:514:55: note: to match this '('
std::string WiFiServiceMac::SecurityFromCWSecurityMode(
                                                      ^
../../components/wifi/wifi_service_mac.mm:515:29: error: expected ';' after top level declarator
    CWSecurityMode security) const {
                            ^
                            ;
../../components/wifi/wifi_service_mac.mm:515:36: error: expected unqualified-id
    CWSecurityMode security) const {
                                   ^
10 errors generated.

 

Comment 1 by meh...@chromium.org, Jun 30 2014

Labels: Build OS-Mac
Cc: pinkerton@chromium.org
Cc: mark@chromium.org erikc...@chromium.org andresantoso@chromium.org
 Issue 410210  has been merged into this issue.
Labels: Hotlist-Yosemite
Status: Untriaged
Xcode6 is going to ship pretty soon and doesn't include the 10.8SDK. We should fix this.

Comment 5 by jia...@opera.com, Sep 4 2014

Owner: jia...@opera.com
Status: Assigned
I can look into this, I have a WIP patch already.

Comment 6 by jia...@opera.com, Sep 4 2014

CL submitted as https://codereview.chromium.org/530193004/

Comment 7 by jia...@opera.com, Sep 4 2014

Status: Started
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 9 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6acb57597d5d18ab9d0e2954993863a8e2848774

commit 6acb57597d5d18ab9d0e2954993863a8e2848774
Author: jiangj <jiangj@opera.com>
Date: Tue Sep 09 09:56:25 2014

Fix wifi_component build with 10.9+ SDK

Use forward declaration to build on both 10.6 and 10.9 SDK and
runtime checking to make sure we don't call the wrong API.

BUG= 390212 

Review URL: https://codereview.chromium.org/530193004

Cr-Commit-Position: refs/heads/master@{#293911}

[modify] https://chromium.googlesource.com/chromium/src.git/+/6acb57597d5d18ab9d0e2954993863a8e2848774/base/mac/sdk_forward_declarations.h
[modify] https://chromium.googlesource.com/chromium/src.git/+/6acb57597d5d18ab9d0e2954993863a8e2848774/components/wifi/wifi_service_mac.mm

I think this CL may break OSX 8 compilation.
I get errors that look related to this now:

../../base/mac/sdk_forward_declarations.h:268:4: error: redefinition of enumerator 'kCWSecurityNone'
   kCWSecurityNone = 0,
   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreWLAN.framework/Headers/CoreWLANTypes.h:145:2: note: previous definition is here
        kCWSecurityNone                 = 0,

[...]
By OSX 8, I actually meant the 10.8 sdk.
Fixing that should just be a matter of moving the forward-declarations in base/mac/sdk_forward_declarations.h from the 10.9-guarded section into a 10.8-guarded section.

Comment 12 by jia...@opera.com, Sep 9 2014

Sorry, these were actually introduced in Lion (10.7), I will upload a follow up CL to fix this.

Comment 14 by samli@google.com, Sep 9 2014

This latest change (https://codereview.chromium.org/555163002)  appears to break my build using Xcode 5.1.1 and I'm using OSX 10.9.4.
What SDK are you using? Xcode version and OS version don't really come into play here.
MacOSX10.8.sdk

Comment 17 by jia...@opera.com, Sep 9 2014

salmi: I just tried compiling ToT with 10.8 SDK without getting any issue, can you please paste the errors you are getting?

Comment 18 by jia...@opera.com, Sep 9 2014

(samli, Sorry for the typo, it was autocorrection.)
Project Member

Comment 19 by bugdroid1@chromium.org, Sep 9 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/59c4ad104b6f03af9c9acffc0fd9a42707083390

commit 59c4ad104b6f03af9c9acffc0fd9a42707083390
Author: jiangj <jiangj@opera.com>
Date: Tue Sep 09 21:28:57 2014

Fix SDK forward declarations after CL 530193004

The APIs that need forward declarations were actually introduced in
OS X 10.7 SDK instead of 10.9 SDK, forward declare them in the wrong
place will cause build issue when using older SDKs like 10.7 or 10.8.

BUG= 390212 

Review URL: https://codereview.chromium.org/555163002

Cr-Commit-Position: refs/heads/master@{#294013}

[modify] https://chromium.googlesource.com/chromium/src.git/+/59c4ad104b6f03af9c9acffc0fd9a42707083390/base/mac/sdk_forward_declarations.h

Sorry, I got the revision numbers wrong. Looks like I was caught between the two changes. Compilation so far is working.

Comment 21 by jia...@opera.com, Sep 9 2014

Yup, there seems to be some delay between commit-bot notifies a change that has been committed and when it actually landed on master, I commented the same in the CL.

Comment 22 by jia...@opera.com, Sep 11 2014

Status: Fixed
Cc: ccameron@chromium.org
 Issue 392922  has been merged into this issue.

Sign in to add a comment