powerpc/181502: /usr/include/stdint.h 9.2-RC1/powerpc does not compile on powerpc32
white.heron at yahoo.com
white.heron at yahoo.com
Sat Aug 24 22:40:02 UTC 2013
The following reply was made to PR powerpc/181502; it has been noted by GNATS.
From: white.heron at yahoo.com
To: "keve at safe-mail.net" <keve at safe-mail.net>,
"freebsd-gnats-submit at FreeBSD.org" <freebsd-gnats-submit at 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 <keve at safe-mail.net>; <br>
<b>
<span style="font-weight:bold">To:</span>
</b>
<freebsd-gnats-submit at FreeBSD.org>; <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>>Number: 181502<BR>>Category: powerpc<BR>>Synopsis: /usr/include/stdint.h 9.2-RC1/powerpc does not compile on powerpc32<BR>>Confidential: no<BR>>Severity: non-critical<BR>>Priority: low<BR>>Responsible: freebsd-ppc<BR>>State: open<BR>>Quarter: <BR>>Keywords: <BR>>Date-Required:<BR>>Class: sw-bug<BR>>Submitter-Id: current-users<BR>>Arrival-Date: Sat Aug 24 13:20:00 UTC 2013<BR>>Closed-Date:<BR>>Last-Modified:<BR>>Originator: Keve Nagy<BR>>Release: FreeBSD 9.2-RC1/powerpc<BR>>Organization:<BR>N/A<BR>>Environment:<BR>FreeBSD
g4mini.homeoffice.internal 9.2-RC1 FreeBSD 9.2-RC1 #0 r253912: Sat Aug 3 18:51:06 UTC 2013 <a ymailto="mailto:root at snap.freebsd.org" href="javascript:return">root at snap.freebsd.org</a>:/usr/obj/powerpc.powerpc/usr/src/sys/GENERIC powerpc<BR>>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) && defined(UINT64_MAX) && (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) && defined(UINT64_MAX) &&
(UINTPTR_MAX == UINT64_MAX)<BR>#define __WORDSIZE 64<BR>#else<BR>#define __WORDSIZE 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 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> 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 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) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX)<BR>#define __WORDSIZE 64<BR>#else<BR>#define __WORDSIZE 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) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX)<BR>#define __WORDSIZE 64<BR>#else<BR>#define __WORDSIZE
32<BR>#endif<BR>***/<BR>#define __WORDSIZE 32<BR><BR>*** For reference ***<BR>I was attempting to build x11/gnome2-lite on a G4 Mac mini with 512MB memory.<BR>>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 >>Fix:<BR><BR><BR>>Release-Note:<BR>>Audit-Trail:<BR>>Unformatted:<BR>_______________________________________________<BR><a ymailto="mailto:freebsd-ppc at freebsd.org" href="javascript:return">freebsd-ppc at 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 at freebsd.org" href="javascript:return">freebsd-ppc-unsubscribe at freebsd.org</a>"<BR></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
--633453505-688454922-1377383632=:42894--
More information about the freebsd-ppc
mailing list