<div dir="ltr"><div><div><div>Well, if int64_t is generally found in ctdint, then something strange is going on. I will try to see what the situation is on other platforms when I get back to this, but since <br><br>1. cstdint was not properly included in CoinTypes.hpp,<br>2. ctdint *was* included when testing for the existence of int64_t, and<br></div>3. none of the builds were broken,<br><br></div>this would seem to indicate that int64_t is either not found at all on most platforms, i.e., cstdint is not found, or it is not found in cstdint. Either way would be strange.<br><br></div>Cheers,<br><br>Ted <br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 3, 2014 at 10:31 PM, Miles Lubin <span dir="ltr">&lt;<a href="mailto:miles.lubin@gmail.com" target="_blank">miles.lubin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">&lt;cstdint&gt; is the standard C++ header file for int64_t. Are there platforms we support where this header doesn&#39;t exist?</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 3, 2014 at 11:24 AM, Stefan Vigerske <span dir="ltr">&lt;<a href="mailto:stefan@math.hu-berlin.de" target="_blank">stefan@math.hu-berlin.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
defining and exporting COINUTILS_HAS_CINTTYPES and COINUTILS_HAS_INTTYPES_H and thus including the (c)inttypes(.h) header in CoinTypes.h sounds best to me.<br>
It&#39;s a bit complicated, as we already have HAVE_CINTTYPES and HAVE_INTTYPES_H, but it seems to be clean and safe.<br>
<br>
While doing so, you could then also introduce COINUTILS_HAS_CSTDINT :-).<br>
COINUTILS_HAS_STDINT_H was indeed added a year ago to fix some specific issues.<br>
<br>
Stefan<div><div><br>
<br>
<br>
On 10/03/2014 04:47 PM, Ted Ralphs wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi everyone,<br>
<br>
This e-mail is probably directed mostly at Stefan, but if anyone else has<br>
an opinion, feel free to weigh in.<br>
<br>
I&#39;m trying to build CoinAll with Visual Studio 9 (we still need to support<br>
it because of Python extensions) on a new laptop running Windows 8 that<br>
also has Visual Studio 12 installed (yes, I know I&#39;m asking for trouble).<br>
For reasons I cannot discern, the compiler is using a combination of the<br>
headers from both compiler versions (9 and 12), which may or may not be<br>
related to the issues I&#39;m seeing. In a nutshell, code that builds fine on<br>
my old laptop now fails to build with the exact same compiler.This has<br>
caused me to dig into some stuff that I found does not completely make<br>
sense to me.<br>
<br>
The problem arises from the check for the type int64_t in the configure<br>
script for CoinUtils, which is done as so.<br>
<br>
AC_CHECK_TYPE([int64_t],[<u></u>CoinInt64=int64_t ; CoinUInt64=uint64_t],[],[<br>
#ifdef HAVE_CINTTYPES<br>
# include &lt;cinttypes&gt;<br>
#else<br>
# ifdef HAVE_INTTYPES_H<br>
#  include &lt;inttypes.h&gt;<br>
# endif<br>
#endif<br>
])<br>
<br>
The type int64_t is found at configure time (I think in the header<br>
cintypes), but only because the inttypes headers have been manually<br>
included for the test. In CoinTypes.hpp, these headers are *not* currently<br>
included and thus, the type is not found at compile time, which leads to an<br>
error.<br>
<br>
Adding the same block of code from the test above to CoinTypes.hpp fixes<br>
the problem for CoinUtils, but building Cbc then fails because the symbols<br>
HAVE_CINTTYPES and HAVE_INTTYPES_H are not exported to config_coinutils.h.<br>
If I export the symbols<br>
<br>
COINUTILS_HAS_CINTTYPES<br>
COINUTILS_HAS_INTTYPES_H<br>
<br>
then everything is fine. I have no idea why this was working fine in the<br>
recent past and now it suddenly causes a problem or why everything is fine<br>
on Linux and OS X. I suppose that type must be found in a different header<br>
on those OS&#39;s.<br>
<br>
Now my questions:<br>
<br>
1. Another solution would be to check for the type int64_t without<br>
including the headers manually, which would then not require including them<br>
in CoinTypes.hpp. We would then just use long long instead of int64_t I<br>
suppose. I don&#39;t think this is the right solution, but I wanted to see if<br>
anyone had a different opinion.<br>
<br>
2. This all made me realize that we have a block like this in CoinTypes.hpp.<br>
<br>
#ifdef COINUTILS_HAS_STDINT_H<br>
#include &lt;stdint.h&gt;<br>
#endif<br>
<br>
Why do we only check for stdint.h and not cstdint (as we do with inttypes).<br>
With the Visual Studio build, it is finding cstdint, not stdint.h, but then<br>
not including it. Of course, this is not causing a problem at the moment,<br>
but should we also export COINUTILS_HAS_CSTDINT? I haven&#39;t checked for<br>
blame, but I&#39;m sure that code was inserted in there to solve some specific<br>
issue with finding types on some platform, but I guess that it would be<br>
more portable and correct if cstdint were also included when it&#39;s<br>
available.<br>
<br>
If you read this far, let me know what you think and sorry for the long and<br>
detailed mail!<br>
<br>
Cheers,<br>
<br>
Ted<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
BuildTools mailing list<br>
<a href="mailto:BuildTools@list.coin-or.org" target="_blank">BuildTools@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/buildtools" target="_blank">http://list.coin-or.org/<u></u>mailman/listinfo/buildtools</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
BuildTools mailing list<br>
<a href="mailto:BuildTools@list.coin-or.org" target="_blank">BuildTools@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/buildtools" target="_blank">http://list.coin-or.org/<u></u>mailman/listinfo/buildtools</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dr. Ted Ralphs<br>Associate Professor, Lehigh University<br>(610) 628-1280<br>ted &#39;at&#39; lehigh &#39;dot&#39; edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>
</div>