Solaris compiler status - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Solaris compiler status
Date
Msg-id a0f817ee-fb86-483a-8a14-b6f7f5991b6e@eisentraut.org
Whole thread Raw
Responses Re: Solaris compiler status
Re: Solaris compiler status
Re: Solaris compiler status
Re: Solaris compiler status
List pgsql-hackers
I've been trying out the Solaris compiler (Oracle Developer Studio 12.6, 
on Solaris), mainly to test out some C11 support details.  Observations:

- That compiler has a certain known idiosyncratic way of dealing with 
some inline functions, which lead to commits such as 3e9ca526012 and 
discussions such as [0] (ironically the first thread you find when 
searching for "solaris compiler dead").  So people did use this at some 
point.  But this has been broken again since commit 4908c5872059.  So 
apparently, no one has used this compiler successfully since at least 
PG17.  (This issue is easy to fix with some #ifndef FRONTEND, as 
before.)  (The 32-bit build appears to have been uncompilable since 
commit c8b2ef05f48 in PG16.  This is fixed by 8-byte-datums-everywhere 
in master.)

[0]: 
https://www.postgresql.org/message-id/20180928150700.h4ikpnh2fibib2nn@alap3.anarazel.de

- At least in my installation (which is supposed to have all the latest 
versions), the compiler runs out memory when trying to compile gram.c, 
even without optimizations on.  (You can get past this by compiling that 
one file with gcc.)

- This compiler is not supported in Meson at all.  (meson setup run 
fails very early.)  I also don't see any recent relevant attempts in the 
Meson issue tracker.

- No buildfarm coverage since who knows when (possibly since [0]?).

- Hundreds of compiler warnings (They are not necessarily wrong, but it 
shows that no one has taken care to tune the warnings or the code in any 
way recently.)

- Shaky C11 support:

* I was trying to test the ICE_P() macro discovered by David Rowley [1] 
-- I doesn't work.  (It returns zero even for constants, so at least it 
fails in the right direction.)

[1]: 
https://www.postgresql.org/message-id/CAApHDvoOnd4PBNV0qyJVLmbWvWUjztzcMH5xY2AGp5Vov6XU3Q%40mail.gmail.com

* Strangely, the compiler claims to support __builtin_constant_p(), but 
our configure test for that fails for other mysterious weird reasons.

* This compiler rejects _Alignas() inside structure definitions, even 
though it appears to support pretty much everything else, so it seems 
kind of incomplete.

* It gives "typedef redeclared" warnings for my patch set [2], but I 
suppose there would be a way to turn those off via warning toggling options.

[2]: 
https://www.postgresql.org/message-id/flat/10d32190-f31b-40a5-b177-11db55597355@eisentraut.org

I mean, at least the AIX enthusiasts popped up right away when we broke 
their platform.  Here, it seems, truly no one cares.

So, can we declare that we don't support this compiler anymore?

(gcc is readily available and seems to work alright, so I'm not saying 
the OS is no longer viable.)




pgsql-hackers by date:

Previous
From: Alyona Vinter
Date:
Subject: Re: Timeline switching with partial WAL records can break replica recovery
Next
From: Michael Paquier
Date:
Subject: Re: Get rid of pgstat_count_backend_io_op*() functions