Subject: Re: bug#17773: AIX build errors with coreutils-8.22

From: Pádraig Brady <[email-masked]>
Date: Fri, 13 Jun 2014 16:26:14 +0100

On 06/13/2014 02:38 PM, Michael Felt wrote:
> For the most part, the configure and build runs quite clean. There are few
> warnings about assignment of a char* to a const char*.
> 
> A few utils are missing the -lpthread library assignment:

So you needed to add -lpthread to csplit, expr, nl, tac and ptx.
The highest common factor there is use of the regex module.
Looking at that in gnulib I see this change:
  http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=55ba71f4
That change is fine I think and only means that threading
primitives will be used in the regex replacement _if_
your package is using threads, i.e. has referenced the threadlib gnulib module.
Now coreutils does not reference this module directly, only referencing
the separate and simpler pthread module.
However threadlib is referenced indirectly through the timer-time module.

A quick fix that might work for you, is to run configure with the --disable-threads option.
That shouldn't disable the multithreading in sort I think, but allow the build to proceed?

As for fixing this up, I might change the timer-time module to use the pthread module instead.
The timer-time issue was only noticed with glibc and hence pthreads anyway.

BTW Paul I see in the threadlib module, the addition of _REENTRANT
or _THREAD_SAFE defines on some platforms.
Should we be doing that also in the pthread module?

thanks,
Pádraig.