Review Request 125573: Fix Compilation of libgpg-error 1.12 with MSVC2015

Hannah von Reth vonreth at kde.org
Mon Oct 12 09:34:50 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125573/#review86699
-----------------------------------------------------------


Ok so the commit https://quickgit.kde.org/?p=emerge.git&a=blobdiff&h=931c4009cf09c63c5fb0ad478a2a54931f4e4d2a&hp=1c9262272c85c3b9bee2e52493707ba577dcc4c0&hb=10a33f9e0e5a8020a073d8e38f2316b343b8366a&f=portage%2Fwin32libs%2Fgpg-error%2Flibgpg-error-cmake-1.12.diff did break msvc and we need an if statement.
Could you please provide a solution with a -P for mingw and a -E for msvc?

- Hannah von Reth


On Okt. 9, 2015, 4:43 nachm., Michael Drueing wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125573/
> -----------------------------------------------------------
> 
> (Updated Okt. 9, 2015, 4:43 nachm.)
> 
> 
> Review request for kdewin.
> 
> 
> Repository: emerge
> 
> 
> Description
> -------
> 
> When emerging libgpg-error with the patch file as is (libgpg-error-cmake-1.12.diff), the build fails because the generated file `_mkerrorcodes.h` comes up empty. The problem is that CMakeLists.txt invokes the C preprocessor by calling `COMMAND ${ERR_COMPILER} -E -P ${BIN_DIR}/_mkerrcodes.h` ... and this won't work for MSVC: The -E switch is "preprocess to stdout" (correct) but it is immediately overridden by the "-P" switch which is "preprocess to file". And indeed, after emerge errors out, there is a file `_mkerrorcodes.i` with the preprocessed output.
> 
> There is another diff file, libgpg-error-cmake.diff, which is obviously only used for older versions of libgpg-error, which has the correct call to the compiler (only -E), and if the 1.12 diff file is changed accordingly, libgpg-error compiles.
> 
> I wanted to pass this through the reviewboard though because I don't know if that will break e.g. the mingw build on Windows...
> 
> 
> Diffs
> -----
> 
>   portage/win32libs/gpg-error/libgpg-error-cmake-1.12.diff 931c400 
> 
> Diff: https://git.reviewboard.kde.org/r/125573/diff/
> 
> 
> Testing
> -------
> 
> Compiles fine with the patch whereas it fails to compile without.
> Since the patch was obviously correct for at least one older version of libgpg-error (as evidenced by the fact that the other diff file includes the exact same patch) I'm pretty confident that this fix is okay here as well
> 
> 
> Thanks,
> 
> Michael Drueing
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-windows/attachments/20151012/453f847c/attachment.html>


More information about the Kde-windows mailing list