bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Dagobert Michelsen <dam@baltic-online.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: bug-gnulib@gnu.org, bug-bison@gnu.org
Subject: Re: Error compiling bison 3.4.2 on Solaris
Date: Tue, 15 Oct 2019 13:07:33 +0200	[thread overview]
Message-ID: <D718019B-2D23-495B-A2A6-14364C0FF3B8@baltic-online.de> (raw)
In-Reply-To: <0280814f-be23-4067-6771-a4f97e54ef43@cs.ucla.edu>

Hi Paul,

Am 15.10.2019 um 06:08 schrieb Paul Eggert <eggert@cs.ucla.edu>:
> On 10/14/19 1:32 AM, Dagobert Michelsen wrote:
>> I guess nowadays int is always 64 bit
> 
> No, it's 32 bits on that platform.
> 
>> I am trying to compile the most recent bison 3.4.2 on Solaris 10 Sparc and i386 with Sun Studio
>> and get the error
>>   CC       src/bison-state.o
>> "./lib/inttypes.h", line 61: #error: "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
>> cc: acomp failed for src/state.c
>> gmake[2]: *** [Makefile:7088: src/bison-state.o] Error 2
> 
> I'm not seeing that problem on Solaris 10 sparc with Oracle Developer Studio 12.6 (a.k.a. Sun Studio). I built Bison 3.4.2 as follows:
> 
> export PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/r/share1/src/developerstudio12.6/bin
> ./configure M4=/usr/sfw/bin/gm4
> 
> where the Oracle compiler was installed in /r/share1/src/developerstudio12.6. How did you build Bison?
> 
> Also, what's the output of 'cc -E' on the following input, when you use your compiler with the same flags that you used to build Bison?
> 
> #include <inttypes.h>
> #include <stdint.h>
> #include <limits.h>
> !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
> 
> For me, the output ends like this:
> 
> !( ( - 2147483647 - 1 ) ==  ( - 2147483647 - 1 ) &&  2147483647 ==  ( 2147483647 ))
> #ident "acomp: Studio 12.6 Sun C 5.15 SunOS_sparc 2017/05/30“

It seems to be a compiler issue:
Studio 12.6: works
Studio 12.5: works
Studio 12.4: works
Studio 12.3: broken with the error above
Studio 12.2: broken with the error above
Studio 12.1: broken with the error above
Studio 12: broken with the error above
GCC 5.5.0: works

The output for Studio 12 which shows the error returns

!( ( - 2147483647 - 1 ) ==  ( - 2147483647 - 1 ) &&  2147483647 ==  ( 2147483647 ))
#ident "acomp: Sun C 5.9 SunOS_i386 Patch 124868-15 2010/08/11“


I am a bit puzzled what has changed here, but Studio 12.3 is already quite old and I am not
sure if it worth further investigation, what do you think? For me it would be ok to just close
this issue but if you want I’ll gladly help further investigate this issue.



Best regards

  — Dago



  reply	other threads:[~2019-10-15 11:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14  8:32 Error compiling bison 3.4.2 on Solaris Dagobert Michelsen
2019-10-15  4:08 ` Paul Eggert
2019-10-15 11:07   ` Dagobert Michelsen [this message]
2019-10-15 20:04     ` Paul Eggert
2019-10-16 13:36       ` Dagobert Michelsen
2019-10-17 19:49         ` Paul Eggert
2019-10-18  4:52           ` Akim Demaille
2019-10-22 12:04           ` Dagobert Michelsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D718019B-2D23-495B-A2A6-14364C0FF3B8@baltic-online.de \
    --to=dam@baltic-online.de \
    --cc=bug-bison@gnu.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).