Bug 380247 - libofx fails to build in MSVC 2015
Summary: libofx fails to build in MSVC 2015
Status: RESOLVED FIXED
Alias: None
Product: Craft
Classification: Developer tools
Component: Blueprints (show other bugs)
Version: stable
Platform: Microsoft Windows Microsoft Windows CE
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-27 07:54 UTC by mahueb55
Modified: 2017-05-28 15:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to be applied by craft (to be placed in <craft>/portage/win32libs/libofx/) (715 bytes, patch)
2017-05-27 07:54 UTC, mahueb55
Details
patch for the recipe itself (to be merged with <craft>/portage/win32libs/libofx/libofx.py) (1.05 KB, patch)
2017-05-27 07:56 UTC, mahueb55
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mahueb55 2017-05-27 07:54:44 UTC
Created attachment 105729 [details]
Patch to be applied by craft (to be placed in <craft>/portage/win32libs/libofx/)

libofx fails to build when MSVC2015 is used as the compiler because of undefined symbols in <libofx>/lib/ofx_utilities.cpp (please see trace below). The issue is caused by the usage of the globa "daylight" variable defined in <time.h>.  The time.h shipped with Visual Studio seems to define the global with a leading underscore ("_daylight"). I double checked in MSDN (https://msdn.microsoft.com/en-us/library/90s5c885(v=vs.140).aspx) and the same seems to be true for MSVC2010-2013 as well
Please find attached a patch for the libofx recipe.



R:\build\win32libs\libofx\work\libofx-0.9.10\lib\ofx_utilities.cpp(119): error C2065: "daylight": nichtdeklarierter Beze
ichner
R:\build\win32libs\libofx\work\libofx-0.9.10\lib\ofx_utilities.cpp(121): error C2065: "daylight": nichtdeklarierter Beze
ichner
R:\build\win32libs\libofx\work\libofx-0.9.10\lib\ofx_utilities.cpp(166): warning C4244: "=": Konvertierung von "double"
in "float", m”glicher Datenverlust
R:\build\win32libs\libofx\work\libofx-0.9.10\lib\ofx_utilities.cpp(177): warning C4805: "==": unsichere Kombination von
Typ "char" mit Typ "bool" in einer Operation
NMAKE : fatal error U1077: "C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"": Rückgabe-Code
 "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"": Rückgabe-Code
 "0x2"
Stop.
Craft encountered an error: make cmd: nmake /NOLOGO
Action: compile for win32libs/libofx FAILED
*** Craft update failed: update of win32libs/libofx failed after 0:00:12 ***
Comment 1 mahueb55 2017-05-27 07:56:05 UTC
Created attachment 105730 [details]
patch for the recipe itself (to be merged with <craft>/portage/win32libs/libofx/libofx.py)
Comment 2 Kevin Funk 2017-05-27 08:27:05 UTC
Thanks for the patch. Please use Phabricator to upload patches next time. I'll apply your submission.

See: https://community.kde.org/Get_Involved/development -- section "Submitting your first patch".
Comment 3 Kevin Funk 2017-05-27 08:34:26 UTC
Git commit 1d0da34536616e104c90835b1797ef325f96cf44 by Kevin Funk.
Committed on 27/05/2017 at 08:30.
Pushed by kfunk into branch 'master'.

Fix libofx package under MSVC

M  +3    -0    portage/win32libs/libofx/libofx.py
A  +15   -0    portage/win32libs/libofx/patch_daylight.diff

https://commits.kde.org/craft/1d0da34536616e104c90835b1797ef325f96cf44
Comment 4 mahueb55 2017-05-28 15:09:23 UTC
Thanks for the heads-up. Will use phabricator next time.