[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-windows
Subject:    Re: Review Request 125573: Fix Compilation of libgpg-error 1.12 with MSVC2015
From:       "Jeremy Whiting" <jpwhiting () kde ! org>
Date:       2015-10-12 11:41:41
Message-ID: 20151012114141.1403.85524 () mimi ! kde ! org
[Download RAW message or body]

--===============6171006271035883534==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit



> On Oct. 12, 2015, 3:34 a.m., Hannah von Reth wrote:
> > Ok so the commit \
> > https://quickgit.kde.org/?p=emerge.git&a=blobdiff&h=931c4009cf09c63c5fb0ad478a2a54 \
> > 931f4e4d2a&hp=1c9262272c85c3b9bee2e52493707ba577dcc4c0&hb=10a33f9e0e5a8020a073d8e3 \
> > 8f2316b343b8366a&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?

I hit the same issue yesterday here. Using MSVC 2015


- Jeremy


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


On Oct. 9, 2015, 10:43 a.m., Michael Drueing wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125573/
> -----------------------------------------------------------
> 
> (Updated Oct. 9, 2015, 10:43 a.m.)
> 
> 
> 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
> 
> 


--===============6171006271035883534==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/125573/">https://git.reviewboard.kde.org/r/125573/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On October 12th, 2015, 3:34 a.m. MDT, <b>Hannah \
von Reth</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Ok so the commit \
https://quickgit.kde.org/?p=emerge.git&amp;a=blobdiff&amp;h=931c4009cf09c63c5fb0ad478a \
2a54931f4e4d2a&amp;hp=1c9262272c85c3b9bee2e52493707ba577dcc4c0&amp;hb=10a33f9e0e5a8020 \
a073d8e38f2316b343b8366a&amp;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?</p></pre>  </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I hit \
the same issue yesterday here. Using MSVC 2015</p></pre> <br />










<p>- Jeremy</p>


<br />
<p>On October 9th, 2015, 10:43 a.m. MDT, Michael Drueing wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for kdewin.</div>
<div>By Michael Drueing.</div>


<p style="color: grey;"><i>Updated Oct. 9, 2015, 10:43 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
emerge
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">When emerging libgpg-error with the patch file as is \
(libgpg-error-cmake-1.12.diff), the build fails because the generated file <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">_mkerrorcodes.h</code> comes up empty. The problem is that \
CMakeLists.txt invokes the C preprocessor by calling <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">COMMAND ${ERR_COMPILER} -E -P ${BIN_DIR}/_mkerrcodes.h</code> ... 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 <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">_mkerrorcodes.i</code> with the preprocessed output.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">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...</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>portage/win32libs/gpg-error/libgpg-error-cmake-1.12.diff <span style="color: \
grey">(931c400)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/125573/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============6171006271035883534==--


[Attachment #3 (text/plain)]

_______________________________________________
Kde-windows mailing list
Kde-windows@kde.org
https://mail.kde.org/mailman/listinfo/kde-windows


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic