On Fri, Feb 09, 2024, Christoph Berg wrote:
> Re: Adrien Nader
> > I think the most recent version of that script would be in my
> > repository: https://salsa.debian.org/adrien-n/armhf-time_t/
> 
> Hi Adrien,
> 
> I actually got the script running, I think. I pushed a few
> https://salsa.debian.org/vorlon/armhf-time_t/-/merge_requests/132 that
> have not been merged yet, though.

Nice! Watch out though if you don't use a container: the script can
change your system. You also need to run it on armhf to have the correct
machine definitions.

Steve's repository and mine have diverged because it takes time to
review and merge. I plan to get them in sync next week, at which point I
will be able to look at these changes and integrate them.

> I guess when it says "Compatibility: 100%", everything is ok? I got
> that on libpq-dev.

There are two ABI tests: one for LFS and one for time_t (64-bit time_t
on 32-bit arches implies LFS with glibc).

Once you have the dumps, you should diff that with diff_package.sh
"$foo" and it will report on stdout whether the package is LFS- or
time_t-sensitive. Additionally, a few files will be created, among which:
- compat_reports/libpq-dev/lfs_to_time_t/compat_report.html
- compat_reports/libpq-dev/base_to_lfs/compat_report.html

On libpq-dev, I see that there is no LFS effect (abi-compliance-checker
reports 100% compat) but there is a time_t one.

Looking at the HTML reports, the cause is:

  pqWaitTimed ( int forRead, int forWrite, PGconn* conn, long finish_time )

The ABI is therefore time_t-dependant. With an insider POV, you can
maybe find reasons this doesn't matter; that's not something I can do
however.

> What I'm completely missing is an overview which *source* packages are
> affected. I really want to avoid having postgresql-16 included in this
> transition, and I am not yet sure if it's considered to be affected or
> not.

It was being included by default due to failing to build too. Since I've
made this work for libpq-query-dev (more on that below),
postgresql-server-dev-16 should be easier now but there are errors of
its own.

[it's being worked on; I don't have the results yet but I expect they
will cover at least the same ones as libpg-query-dev which I detail
below]

> > I'll probably give it a quick shot again today but I don't have much
> > time; unless errors are few and obvious, it's unlikely that I will make
> > much progress on it though.
> 
> On libpg-query-dev, the problem is that the script puts some
> windows-only headers into the include path that then shadow a system
> header that should actually be used:
> 
> The GCC parameters:
>   gcc -fdump-lang-raw -fkeep-inline-functions -c -x c++ -fpermissive -w 
> "/tmp/8yhLzFzeyA/dump1.h"  -I/usr/include/pg_query/postgres 
> -I/usr/include/pg_query/postgres/utils 
> -I/usr/include/pg_query/postgres/port/win32_msvc 
> -I/usr/include/pg_query/postgres/port/win32
> 
> In file included from 
> /usr/include/pg_query/postgres/port/win32/netinet/tcp.h:5,
>                  from /usr/include/pg_query/postgres/libpq/libpq-be.h:26,
>                  from /usr/include/pg_query/postgres/libpq/auth.h:17,
>                  from /tmp/8yhLzFzeyA/dump1.h:174:
> /usr/include/pg_query/postgres/port/win32/sys/socket.h:14:10: fatal error: 
> winsock2.h: No such file or directory
>    14 | #include <winsock2.h>
>       |          ^~~~~~~~~~~~
> compilation terminated.
> 
> 
> This -I/usr/include/pg_query/postgres/port/win32 should not be there.

I did the work on libpq-query-dev; there were quite a few things to
change.

The way the script works is by trying to build all headers from a given
package: this is why it tried to build files from port/win32.
In addition to that, abi-compliance-checker has a number of heuristics
which are not always helpful. This is why this -I flag was present.

Anyway, as I said and after many quirks, I got it to dump and diff: the
ABI of libpg-query-dev is affected by both LFS and time_t.

NB: I think a-c-c reports symbol changes as removal + addition

You can review the change summary below. Maybe some symbols are
internal-only, or not actually visible in normal usage, or definitions
of symbols that are not in the package's libs (could be libc for
instance: we can't map symbols from headers to shared objects shipped by
the corresponding library package).

Big wall of text below.

For time_t:

Problems with Data Types, Low Severity  1

     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

   struct_timespec.h
   [+] struct timespec  1

     Change                                                             Effect
   1 Type of field tv_sec has been changed from __time_t to __time64_t. 
Recompilation of a client program may be broken.

   [+] affected symbols: 4 (0.04%)
   timespec::__ct ( struct timespec const& p1 )
   1st parameter 'p1' (reference) has base type 'struct timespec'.
   timespec::__ct ( struct timespec& p1 )
   1st parameter 'p1' (reference) has base type 'struct timespec'.
   timespec::__ct ( )
   This constructor is from 'struct timespec' class.
   timespec::~__dt ( )
   This destructor is from 'struct timespec' class.

For LFS:

Added Symbols  9

     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

   fd.h
   FileFallocate ( File file, long long offset, long long amount, uint32 
wait_event_info )
   _Z13FileFallocateixxj

   FilePrefetch ( File file, long long offset, long long amount, uint32 
wait_event_info )
   _Z12FilePrefetchixxj

   FileRead ( File file, void* buffer, size_t amount, long long offset, uint32 
wait_event_info )
   _Z8FileReadiPvjxj

   FileTruncate ( File file, long long offset, uint32 wait_event_info )
   _Z12FileTruncateixj

   FileWrite ( File file, void const* buffer, size_t amount, long long offset, 
uint32 wait_event_info )
   _Z9FileWriteiPKvjxj

   FileWriteback ( File file, long long offset, long long nbytes, uint32 
wait_event_info )
   _Z13FileWritebackixxj

   FileZero ( File file, long long offset, long long amount, uint32 
wait_event_info )
   _Z8FileZeroixxj

   pg_flush_data ( int fd, long long offset, long long nbytes )
   _Z13pg_flush_dataixx

   pg_truncate ( char const* path, long long length )
   _Z11pg_truncatePKcx

   to the top

Removed Symbols  9

     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

   fd.h
   FileFallocate ( File file, long offset, long amount, uint32 wait_event_info )
   FilePrefetch ( File file, long offset, long amount, uint32 wait_event_info )
   FileRead ( File file, void* buffer, size_t amount, long offset, uint32 
wait_event_info )
   FileTruncate ( File file, long offset, uint32 wait_event_info )
   FileWrite ( File file, void const* buffer, size_t amount, long offset, 
uint32 wait_event_info )
   FileWriteback ( File file, long offset, long nbytes, uint32 wait_event_info )
   FileZero ( File file, long offset, long amount, uint32 wait_event_info )
   pg_flush_data ( int fd, long offset, long nbytes )
   pg_truncate ( char const* path, long length )
   to the top

Problems with Symbols, Medium Severity  9

     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

   fd.h
   [+] FileFallocate ( File file, long offset, long amount, uint32 
wait_event_info )  1
   [+] FilePrefetch ( File file, long offset, long amount, uint32 
wait_event_info )  1
   [+] FileRead ( File file, void* buffer, size_t amount, long offset, uint32 
wait_event_info )  1
   [+] FileTruncate ( File file, long offset, uint32 wait_event_info )  1
   [+] FileWrite ( File file, void const* buffer, size_t amount, long offset, 
uint32 wait_event_info )  1
   [+] FileWriteback ( File file, long offset, long nbytes, uint32 
wait_event_info )  1
   [+] FileZero ( File file, long offset, long amount, uint32 wait_event_info ) 
 1
   [+] pg_flush_data ( int fd, long offset, long nbytes )  1
   [+] pg_truncate ( char const* path, long length )  1
   to the top

Problems with Data Types, Low Severity  2

     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

   types.h
   [+] typedef ino_t  1
   [+] typedef off_t  1
   to the top

I will be sharing the results in a few hours: I do releases every few
days but not more frequently in order to not have everyone lost.

-- 
Adrien

Reply via email to