Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2013 22:40:02 GMT
From:      white.heron@yahoo.com
To:        freebsd-ppc@FreeBSD.org
Subject:   RE: powerpc/181502: /usr/include/stdint.h 9.2-RC1/powerpc does not compile on powerpc32
Message-ID:  <201308242240.r7OMe2sc093729@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR powerpc/181502; it has been noted by GNATS.

From: white.heron@yahoo.com
To: "keve@safe-mail.net" <keve@safe-mail.net>,
  "freebsd-gnats-submit@FreeBSD.org" <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: RE: powerpc/181502: /usr/include/stdint.h 9.2-RC1/powerpc does not compile on powerpc32
Date: Sat, 24 Aug 2013 15:33:52 -0700 (PDT)

 --633453505-688454922-1377383632=:42894
 Content-Type: text/plain; charset=us-ascii
 
 Hye. I am having problem to read iphone 5 64gb storage via lightning cable to PowerBook g4 ubuntu oneiric .. Any advice ? The iPhone 5 run on top of arm processor while PowerBook g4 run PowerPC processor.<br/><br/><br/><br/>my.linkedin.com/pub/yb-tan-sri-dato-ir-adli-a-k-a-dell/44/64b/464/<br/>Sent from Yahoo! Mail for iPhone
 --633453505-688454922-1377383632=:42894
 Content-Type: text/html; charset=us-ascii
 
 <table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top">Hye. I am having problem to read iphone 5 64gb storage via lightning cable to PowerBook g4 ubuntu oneiric .. Any advice ? The iPhone 5 run on top of arm processor while PowerBook g4 run PowerPC processor.<br/><br/><br/><br/>my.linkedin.com/pub/yb-tan-sri-dato-ir-adli-a-k-a-dell/44/64b/464/<br/>Sent from Yahoo! Mail for iPhone</td></tr></table>            <div id="_origMsg_">
                 <div>
                     <br />
                     <div>
                         <div style="font-size:0.9em">
                             <hr size="1">
                             <b>
                                 <span style="font-weight:bold">From:</span>
                             </b>
                             Keve Nagy &lt;keve@safe-mail.net&gt;;                            <br>
                             <b>
                                 <span style="font-weight:bold">To:</span>
                             </b>
                              &lt;freebsd-gnats-submit@FreeBSD.org&gt;;                                                                                                     <br>
                             <b>
                                 <span style="font-weight:bold">Subject:</span>
                             </b>
                             powerpc/181502: /usr/include/stdint.h 9.2-RC1/powerpc does not compile on powerpc32                            <br>
                             <b>
                                 <span style="font-weight:bold">Sent:</span>
                             </b>
                             Sat, Aug 24, 2013 1:15:13 PM                            <br>
                         </div>
                             <br>
                             <table cellspacing="0" cellpadding="0" border="0">
                                 <tbody>
                                     <tr>
                                         <td valign="top"><BR>&gt;Number:&nbsp; &nbsp; &nbsp; &nbsp;  181502<BR>&gt;Category:&nbsp; &nbsp; &nbsp;  powerpc<BR>&gt;Synopsis:&nbsp; &nbsp; &nbsp;  /usr/include/stdint.h 9.2-RC1/powerpc does not compile on powerpc32<BR>&gt;Confidential:&nbsp;  no<BR>&gt;Severity:&nbsp; &nbsp; &nbsp;  non-critical<BR>&gt;Priority:&nbsp; &nbsp; &nbsp;  low<BR>&gt;Responsible:&nbsp; &nbsp; freebsd-ppc<BR>&gt;State:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; open<BR>&gt;Quarter:&nbsp; &nbsp;  &nbsp; &nbsp; <BR>&gt;Keywords:&nbsp; &nbsp; &nbsp;  <BR>&gt;Date-Required:<BR>&gt;Class:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sw-bug<BR>&gt;Submitter-Id:&nbsp;  current-users<BR>&gt;Arrival-Date:&nbsp;  Sat Aug 24 13:20:00 UTC 2013<BR>&gt;Closed-Date:<BR>&gt;Last-Modified:<BR>&gt;Originator:&nbsp; &nbsp;  Keve Nagy<BR>&gt;Release:&nbsp; &nbsp; &nbsp; &nbsp; FreeBSD 9.2-RC1/powerpc<BR>&gt;Organization:<BR>N/A<BR>&gt;Environment:<BR>FreeBSD
  g4mini.homeoffice.internal 9.2-RC1 FreeBSD 9.2-RC1 #0 r253912: Sat Aug&nbsp; 3 18:51:06 UTC 2013&nbsp; &nbsp;  <a ymailto="mailto:root@snap.freebsd.org" href="javascript:return">root@snap.freebsd.org</a>:/usr/obj/powerpc.powerpc/usr/src/sys/GENERIC&nbsp; powerpc<BR>&gt;Description:<BR>I thought you might want to know that icu-50.1.2 does not build on FreeBSD-9.2-RC1/powerpc.<BR>I believe this is a PowerPC ONLY issue, as the same code appears to build fine on i386 and amd64.<BR>I attempted to build x11/gno me2-lite from the ports, which failed building icu as a dependency.<BR><BR>I tracked the origin of the problem back to /usr/include/stdint.h, line 68.<BR>#if defined(UINTPTR_MAX) &amp;&amp; defined(UINT64_MAX) &amp;&amp; (UINTPTR_MAX == UINT64_MAX)<BR><BR>For reference, that line sits at the top of the block:<BR>/* GNU and Darwin define this and people seem to think it's portable */<BR>#if defined(UINTPTR_MAX) &amp;&amp; defined(UINT64_MAX) &amp;&amp;
  (UINTPTR_MAX == UINT64_MAX)<BR>#define __WORDSIZE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 64<BR>#else<BR>#define __WORDSIZE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32<BR>#endif<BR><BR>Compilation of icu stops with the error:<BR>/usr/include/stdint.h:68:68 error: missing binary operator before token "("<BR><BR>The particular source the compiler complains about looks perfectly correct. This is not a typo issue.<BR>I did some very basic testing to identify what is wrong.<BR>It looks that refe rring to the value of UINT64_MAX is what makes the compiler choke.<BR>At the time of compilation, both UINTPTR_MAX and UINT64_MAX appears to be in the "defined" state.<BR><BR>A line of:<BR>#if defined(UINT64_MAX)<BR>or a line of:<BR>#ifndef UINT64_MAX<BR>does not trigger an error.<BR>Neither does reassigning the value of UINT64_MAX to another variable/macro, like:<BR>#define __KEVE&nbsp; UINT64_MAX<BR><BR>However, testing against the value of
  UINT64_MAX<BR>#if (UINT64_MAX == 1)<BR> raises the above mentioned error.<BR>So does<BR>#if (UINT64_MAX != 2)<BR>and after assigning the value of UINT64_MAX to __KEVE as I showed above, testing against the value of __KEVE<BR>#if (__KEVE == 123)<BR>&nbsp; or<BR>#if (__KEVE != 6)<BR>also raises the same error.<BR><BR>I believe that on i386 and amd64 the code compiles fine because that block of code is ignored, probably due to the fact of UINT64_MAX or UINTPTR_MAX not being defined, hence the evaluation stop s before getting to the (UINTPTR_MAX == UINT64_MAX) portion at the end of the line.<BR><BR>This is how deep my capabilities allowed me to go. Someone smarter needs to take this over to identify the real origin of the error and fix it.<BR>Until then, the workaround I used is to comment-out the troublesome block and simply define __WORDSIZE. In my particular case, as I was building on powerpc32 on a G4 Mac mini, I just added this line:<BR>#define
  __WORDSIZE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32<BR><BR><BR>***WORKAROUND***<BR><BR>/usr/include/stdint.h, lines 67-72 as comes with FreeBSD-9.2-RC2/powerpc:<BR><BR>/* GNU and Darwin define this and people seem to think it's portable */<BR>#if defined(UINTPTR_MAX) &amp;&amp; defined(UINT64_MAX) &amp;&amp; (UINTPTR_MAX == UINT64_MAX)<BR>#define __WORDSIZE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 64<BR>#else<BR>#define __WORDSIZE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32<BR>#end if<BR><BR><BR>/usr/include/stdint.h, lines 67-75 after workaround applied:<BR><BR>/* GNU and Darwin define this and people seem to think it's portable */<BR>/*** commented out as it does not build on powerpc G4 Mac mini ***<BR>#if defined(UINTPTR_MAX) &amp;&amp; defined(UINT64_MAX) &amp;&amp; (UINTPTR_MAX == UINT64_MAX)<BR>#define __WORDSIZE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 64<BR>#else<BR>#define __WORDSIZE&nbsp; &nbsp; &nbsp; &nbsp;
  &nbsp; &nbsp; &nbsp; 32<BR>#endif<BR>***/<BR>#define __WORDSIZE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32<BR><BR>*** For reference ***<BR>I was attempting to build x11/gnome2-lite on a G4 Mac mini with 512MB memory.<BR>&gt;How-To-Repeat:<BR>Get a G4 Mac mini, iMac, iBook or PowerBook machine and try to build devel/icu from ports.<BR>cd /usr/ports/devel/icu<BR>make<BR><BR>Should apply to everything else that tries to include /usr/include/stdint.h, but devel/icu is the only thing I came accross.<BR >&gt;Fix:<BR><BR><BR>&gt;Release-Note:<BR>&gt;Audit-Trail:<BR>&gt;Unformatted:<BR>_______________________________________________<BR><a ymailto="mailto:freebsd-ppc@freebsd.org" href="javascript:return">freebsd-ppc@freebsd.org</a> mailing list<BR><a href="http://lists.freebsd.org/mailman/listinfo/freebsd-ppc" target=_blank >http://lists.freebsd.org/mailman/listinfo/freebsd-ppc</a><BR>To unsubscribe, send any mail to "<a
  ymailto="mailto:freebsd-ppc-unsubscribe@freebsd.org" href="javascript:return">freebsd-ppc-unsubscribe@freebsd.org</a>"<BR></td>
                                     </tr>
                                 </tbody>
                             </table>
                     </div>
                 </div>
             </div>
 
 --633453505-688454922-1377383632=:42894--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308242240.r7OMe2sc093729>