compiler chromium error in windows 10

373 views
Skip to first unread message

Cai Huan

unread,
Aug 27, 2016, 10:16:32 PM8/27/16
to Chromium-dev
chromium version is 52.0.2743.116 and the compiler report error like
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ninja: Entering directory `out\Debug'
[9394/14859] CXX obj\device\bluetooth\device_bluetooth.bluetooth_task_manager_win.obj
FAILED: obj/device/bluetooth/device_bluetooth.bluetooth_task_manager_win.obj
ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\cl.exe" /nolog
o /showIncludes /FC @obj\device\bluetooth\device_bluetooth.bluetooth_task_manager_win.obj.rsp /c ..\..\device\bluetooth\
bluetooth_task_manager_win.cc /Foobj\device\bluetooth\device_bluetooth.bluetooth_task_manager_win.obj /Fdobj\device\blue
tooth\device_bluetooth.cc.pdb
e:\chromium\52.0.2743.116\src\device\bluetooth\bluetooth_task_manager_win.cc(923): error C2664: 'HRESULT device::win::Bl
uetoothLowEnergyWrapper::RegisterGattEvents(base::FilePath &,BTH_LE_GATT_EVENT_TYPE,PVOID,PFNBLUETOOTH_GATT_EVENT_CALLBA
CK,PVOID,BLUETOOTH_GATT_EVENT_HANDLE *)': cannot convert argument 4 from 'void (__cdecl *)(BTH_LE_GATT_EVENT_TYPE,PVOID,
PVOID)' to 'PFNBLUETOOTH_GATT_EVENT_CALLBACK'
e:\chromium\52.0.2743.116\src\device\bluetooth\bluetooth_task_manager_win.cc(923): note: This conversion requires a rein
terpret_cast, a C-style cast or function-style cast
[9403/14859] CXX obj\device\bluetooth\device_bluetooth.bluetooth_socket_win.obj

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

after run ninja -C out\Debug content_shell command

Thiago Farina

unread,
Aug 28, 2016, 9:17:23 AM8/28/16
to cai.h...@gmail.com, Chromium-dev
I think this is probably most a matter of what version of Visual Studio you are using to try to build the project.

Which one do you have installed?
 


--
Thiago Farina

Cai Huan

unread,
Aug 28, 2016, 8:19:21 PM8/28/16
to Chromium-dev, cai.h...@gmail.com
Visual Studio 2015 community
install Visual C++, which will select three sub-categories including MFC
install Universal Windows Apps Development Tools > Tools
install Universal Windows Apps Development Tools > Windows 10 SDK (10.0.10586)

Cai Huan

unread,
Aug 28, 2016, 8:28:39 PM8/28/16
to Chromium-dev, cai.h...@gmail.com
OS version is windows 10 x64 10.0.14393 build 14393


On Sunday, August 28, 2016 at 9:17:23 PM UTC+8, Thiago Farina wrote:

Marshall Greenblatt

unread,
Aug 29, 2016, 7:29:51 AM8/29/16
to cai.h...@gmail.com, Chromium-dev
Are you building with VS2015 Update 3 and DEPOT_TOOLS_WIN_TOOLCHAIN=0? If so, you're likely running into http://crbug.com/634788 and http://crbug.com/627216#c10.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

Cai Huan

unread,
Aug 29, 2016, 8:00:55 AM8/29/16
to Chromium-dev, cai.h...@gmail.com
my visual studio version is
 visual studio community 2015
 version 14.0.25425.01 Update 3
i set DEPOT_TOOLS_WIN_TOOLCHAIN=0 in global enviroment
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Rafał Chłodnicki

unread,
Aug 29, 2016, 9:42:53 AM8/29/16
to cai.h...@gmail.com, Chromium-dev
Switching to older SDK should work as a workaround (before it's fixed in chromium).
This bluetooth declaration causes error in SDK 10.0.14393 but there are no problems with 10.0.10586.
You can switch to older SDK easily from VS installation dialog.

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

Nico Weber

unread,
Aug 29, 2016, 10:11:54 AM8/29/16
to Rafał Chłodnicki, cai.h...@gmail.com, Chromium-dev
On Mon, Aug 29, 2016 at 9:41 AM, Rafał Chłodnicki <rchlo...@opera.com> wrote:
Switching to older SDK should work as a workaround (before it's fixed in chromium).
This bluetooth declaration causes error in SDK 10.0.14393 but there are no problems with 10.0.10586.

Is there some define we could check for to make that file compile with both SDKs?

Bruce

unread,
Aug 29, 2016, 2:30:00 PM8/29/16
to Chromium-dev, rchlo...@opera.com, cai.h...@gmail.com
The only way I have found to detect what SDK version is being built with is to #include ntverp.h and then check VER_PRODUCTBUILD. However this define is 10011 for all Windows 10 SDKs, so that doesn't work.

You'd think that VER_PRODUCTBUILD_QFE from that same file could be used to distinguish SDK versions, but no. In fact, the 10586.0 and 14393.0 versions of that header file are identical. But that's okay because there are no breaking changes between SDK versions (except for this one).

I'm afraid that the only solution that I am aware of is to build with the supported SDK version which is currently 10586.0. One way to assist with that would be for someone (eventually me unless somebody else does it first) to implement a fix to crbug.com/634788, to allow setting the SDK version to be compiled with. Even that is tricky because in many/most machines there is only a single SDK installed.

I'm not sure how Microsoft expects developers to deal with this - upgrade the entire world to the 14393 SDK simultaneously?

My plan was to upgrade Chrome to the Update 3 compiler and then to the 14393 SDK, but the Update 3 compiler is hitting a few issues that have so far prevented the switch - see crbug.com/627216 for details.

I guess you could manually edit blutetoothleapis.h, but I can hardly recommend that solution.

Cai Huan

unread,
Sep 2, 2016, 11:04:07 PM9/2/16
to Chromium-dev, rchlo...@opera.com, cai.h...@gmail.com
thanks, I uninstall windows 10 14393 sdk and install 10.0.10586.0 again

mYoda

unread,
Sep 4, 2016, 11:12:51 AM9/4/16
to Chromium-dev, rchlo...@opera.com, cai.h...@gmail.com
hi. I just want to say that works fine with follow changes (you need to use function-style cast):

  HRESULT hr =
     win::BluetoothLowEnergyWrapper::GetInstance()->RegisterGattEvents(
         service_path, CharacteristicValueChangedEvent, &win_event_parameter,
         (PFNBLUETOOTH_GATT_EVENT_CALLBACK)&OnGetGattEventWin, user_event_handle, &win_event_handle);

works fine with all latest SDKs

yupeng zhang

unread,
Sep 4, 2016, 11:33:37 PM9/4/16
to Chromium-dev
Another Windows SDK related issue. Just uninstall and install it again.

在 2016年8月28日星期日 UTC+8上午10:16:32,Cai Huan写道:

Bruce Dawson

unread,
Sep 6, 2016, 2:38:27 PM9/6/16
to unive...@gmail.com, Chromium-dev
I've created a CL that fixes the callback function and adds a cast so that it will still compile with the Windows 10.0.10586 SDK:


Once that lands Chrome should build with either 10.0.10586 or 10.0.14393.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to a topic in the Google Groups "Chromium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-dev/wss2Z0CyMDs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-dev+unsubscribe@chromium.org.

Bruce Dawson

unread,
Sep 13, 2016, 3:50:19 PM9/13/16
to yupeng zhang, Chromium-dev
Chrome on Windows on the build machines now builds with VS 2015 Update 3. It still builds with the 10.0.10586 SDK but it should now build fine with the 10.0.14393 SDK (the bluetooth change landed).

So, if you are building Chrome with a locally installed Visual Studio I would recommend upgrading to VS 2015 Update 3. At some point we might officially move-to/require the 10.0.14393 SDK but for now we'll just support it.
Reply all
Reply to author
Forward
0 new messages