Page MenuHome GnuPG

Cannot build gnupg-2.0.18 on AIX 6.1
Closed, ResolvedPublic

Description

As is you cannot build gnupg-2.0.18 on AIX 6.1. The problem is that the number
of file descriptors on AIX is high. FD_SETSIZE is 65534 and the value returned
by getrlimit is 2147483647. The work around is:
(1) Build "pth" using --with-fdsetsize=8192 (this is a pre-req for gnupg)
(2) Build "gnupg" prefixing each command with:

ulimit -H -n 8192; CC="gcc -DFD_SETSIZE=8192"
i.e. ulimit -H -n 8192; CC="gcc -DFD_SETSIZE=8192" ./configure
     ulimit -H -n 8192; CC="gcc -DFD_SETSIZE-8192" make

The "ulimit -H -n 8192" is required for the "t-exechelp" test to work because
it "seems" to end up in a loop. Value other than 8192 might also work.

Details

Version
2.0.18

Event Timeline

I am not sure whether I want to fix that. The problem is a Pth problem and we
will soon drop the requirement for Pth in favor of our new NPTH. NPTH uses
native threads (e.g. pthreads) but provides an API and semantics simialar to Pth.

I think the long loop in "t-exechelp" where it is uses the hard limit of
2147483647 in AIX 6.1 might be addressed so that it uses a reasonable
number (i.e. FD_SETSIZE) as a maximum. I don't know if using NPTH would
address that.

On Wed, Dec 7, 2011 at 10:45 AM, Werner Koch via BTS <gnupg@bugs.g10code.com

wrote:

Werner Koch <wk@gnupg.org> added the comment:

I am not sure whether I want to fix that. The problem is a Pth problem
and we
will soon drop the requirement for Pth in favor of our new NPTH. NPTH uses
native threads (e.g. pthreads) but provides an API and semantics simialar
to Pth.


status: unread -> chatting


g10 Code's BTS <gnupg@bugs.g10code.com>
<T1382>


We need to look into Pth to find a portable way for finding the used values for
--with=fdsetsize and use that as an upper limit.

Do you happen to know what sycconf (_SC_OPEN_MAX) returns on AIX? The current
code only uses sysconf if getrlimit failed. This seems to be the wrong
approach; I think using the minimum of values is better.

I ran a test and it returned 65534.

On Fri, Dec 9, 2011 at 6:03 AM, Werner Koch via BTS
<gnupg@bugs.g10code.com>wrote:

Werner Koch <wk@gnupg.org> added the comment:

We need to look into Pth to find a portable way for finding the used
values for
--with=fdsetsize and use that as an upper limit.

Do you happen to know what sycconf (_SC_OPEN_MAX) returns on AIX? The
current
code only uses sysconf if getrlimit failed. This seems to be the wrong
approach; I think using the minimum of values is better.


g10 Code's BTS <gnupg@bugs.g10code.com>
<T1382>


werner claimed this task.
werner added a project: Too Old.

Feel free to -re-opne if you experience the same problem with a current gnupg
version.