Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: devel

npth-0.90 build report

 

 

GnuPG devel RSS feed   Index | Next | Previous | View Threaded


beebe at math

May 8, 2012, 7:07 AM

Post #1 of 5 (438 views)
Permalink
npth-0.90 build report

This morning, I successfully built npth-0.90 on about 80% of the 25 or
so flavors of Unix in our test lab. There were, however, some
glitches that I could overcome, some machines on which a successful
build has not been possible, and one machine on which the build
succeeds, but the test fails.

When I attempted manual rebuilds after automated procedures failed,
I set PATH to a minimal list, such as /bin:/usr/bin.

Here is a summary of problems:

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

Solaris 10 (SPARC, x86, x86_64) and 11 (x86_64):

Undefined first referenced
symbol in file
accept ../src/.libs/libnpth.so
recvmsg ../src/.libs/libnpth.so
sendmsg ../src/.libs/libnpth.so
connect ../src/.libs/libnpth.so

Need LIBS=-lsocket to resolve symbols. With that addition,
the build completes and the tests pass.

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

OpenBSD 4.9 and 5.1 x86:

../src/.libs/libnpth.so.0.1: undefined reference to `pselect'

We keep a directory with the output of nm on all of the
libraries in the system, including those in the /usr/local
tree. None contains the symbol pselect.

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

MirBSD 10 x86:

../src/.libs/libnpth.so.0.1: undefined reference to `pselect'

As with its OpenBSD relatives, there is no pselect on this system.

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

GNU/Linux Fedora 14 x86:

A build with CC=cc succeeds, and passes the tests.

However, a build with CC=c99 fails like this:

c99 -DHAVE_CONFIG_H -I. -I.. -I../src -g -O2 -MT t-mutex.o -MD -MP -MF \
.deps/t-mutex.Tpo -c -o t-mutex.o t-mutex.c
In file included from t-mutex.c:1:0:
../src/npth.h:219:60: warning: 'struct timespec' declared inside parameter list
../src/npth.h:275:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'npth_rwlock_t'
../src/npth.h:280:39: error: expected ')' before '*' token
../src/npth.h:282:44: error: expected ')' before '*' token
../src/npth.h:286:39: error: expected ')' before '*' token
../src/npth.h:287:44: error: expected ')' before '*' token
../src/npth.h:303:17: warning: 'struct timespec' declared inside parameter list
../src/npth.h:347:17: warning: 'struct timespec' declared inside parameter list
../src/npth.h:361:32: warning: 'struct timespec' declared inside parameter list

On other systems, builds with CC=c99 failed as well, with reports like this:

../src/npth.h:219:60: warning: 'struct timespec' declared inside parameter list [enabled by default]
../src/npth.h:275:1: error: unknown type name 'pthread_rwlock_t'
../src/npth.h:283:22: warning: 'struct timespec' declared inside parameter list [enabled by default]
../src/npth.h:288:22: warning: 'struct timespec' declared inside parameter list [enabled by default]
../src/npth.h:303:17: warning: 'struct timespec' declared inside parameter list [enabled by default]
../src/npth.h:347:17: warning: 'struct timespec' declared inside parameter list [enabled by default]
../src/npth.h:361:32: warning: 'struct timespec' declared inside parameter list [enabled by default]

../src/npth.h:219: warning: "struct timespec" declared inside parameter list
../src/npth.h:275: error: parse error before "npth_rwlock_t"
../src/npth.h:275: warning: type defaults to `int' in declaration of `npth_rwlock_t'
../src/npth.h:275: warning: data definition has no type or storage class
../src/npth.h:280: error: parse error before '*' token
../src/npth.h:282: error: parse error before '*' token
../src/npth.h:286: error: parse error before '*' token
../src/npth.h:287: error: parse error before '*' token
../src/npth.h:303: warning: "struct timespec" declared inside parameter list
../src/npth.h:347: warning: "struct timespec" declared inside parameter list
../src/npth.h:361: warning: "struct timespec" declared inside parameter list

"npth.c", line 104: warning: implicit function declaration: usleep
"npth.c", line 154: undefined symbol: __FUNCTION__
"npth.c", line 154: warning: improper pointer/integer combination: arg #1
...many more like that...

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

Mac OS X PowerPC and x86_64:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT npth.lo \
-MD -MP -MF .deps/npth.Tpo -c npth.c -fno-common -DPIC -o .libs/npth.o
npth.c: In function 'npth_clock_gettime':
npth.c:594: error: 'CLOCK_REALTIME' undeclared (first use in this function)
npth.c:594: error: (Each undeclared identifier is reported only once
npth.c:594: error: for each function it appears in.)

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

GNU/Linux Gentoo SPARC:

Build succeeds, but test fails:

FAIL: t-mutex
======================================
1 of 1 test failed
Please report to gnupg-devel [at] gnupg
======================================

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

SGI IRIX 6.5 MIPS R10000:

/bin/ksh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. \
-g -O2 -MT npth.lo -MD -MP -MF .deps/npth.Tpo -c -o npth.lo npth.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT npth.lo -MD -MP -MF \
.deps/npth.Tpo -c npth.c -DPIC -o .libs/npth.o
In file included from npth.c:40:
npth.h:342: error: syntax error before "socklen_t"
npth.h:343: error: syntax error before "socklen_t"
npth.c:479: error: syntax error before "socklen_t"
npth.c: In function `npth_connect':
npth.c:484: error: `s' undeclared (first use in this function)
npth.c:484: error: (Each undeclared identifier is reported only once
npth.c:484: error: for each function it appears in.)
npth.c:484: error: `addr' undeclared (first use in this function)
npth.c:484: error: `addrlen' undeclared (first use in this function)
npth.c: At top level:
npth.c:491: error: syntax error before "socklen_t"
npth.c: In function `npth_accept':
npth.c:496: error: `s' undeclared (first use in this function)
npth.c:496: error: `addr' undeclared (first use in this function)
npth.c:496: error: `addrlen' undeclared (first use in this function)

The type socklen_t is not defined in /usr/include/*.h or /usr/include/*/*.h
on this system.

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

-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe [at] math -
- 155 S 1400 E RM 233 beebe [at] acm beebe [at] computer -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


wk at gnupg

May 9, 2012, 1:42 AM

Post #2 of 5 (409 views)
Permalink
Re: npth-0.90 build report [In reply to]

On Tue, 8 May 2012 16:07, beebe [at] math said:
> This morning, I successfully built npth-0.90 on about 80% of the 25 or
> so flavors of Unix in our test lab. There were, however, some

Thanks for that quick testing.

The missing pselect on OpenBSD and derivatives is a pity. I wonder why
an OS claiming to head for best security does not support this
straightforward function which helps to avoid a race condition. I guess
we need to provide a replacement and warn that that it is open to race
conditions.

I'll look into the other problems.


Salam-Shalom,

Werner


--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


wk at gnupg

May 9, 2012, 11:53 AM

Post #3 of 5 (441 views)
Permalink
Re: npth-0.90 build report [In reply to]

On Tue, 8 May 2012 16:07, beebe [at] math said:

> OpenBSD 4.9 and 5.1 x86:
>
> ../src/.libs/libnpth.so.0.1: undefined reference to `pselect'

Fixed by using an emulation. At least it provides a guarantee that the
timeout value will not change. Setting the siganl mask is of course not
race free.

> MirBSD 10 x86:

Very likely also fixed.


> However, a build with CC=c99 fails like this:

Fixed. We need to add -D_POSIX_C_SOURCE=200112L when building the tests.

> "npth.c", line 104: warning: implicit function declaration: usleep
> "npth.c", line 154: undefined symbol: __FUNCTION__

Also fixed 0 I hope. In case it still gives error we can simply removfe
the debugging code.

> Mac OS X PowerPC and x86_64:
>
> npth.c:594: error: 'CLOCK_REALTIME' undeclared (first use in

I still need to look at it.

> GNU/Linux Gentoo SPARC:
>
> Build succeeds, but test fails:
>
> FAIL: t-mutex

The test program did not emit an exit code, thus it is possibly fixed
now.

> SGI IRIX 6.5 MIPS R10000:

> npth.h:342: error: syntax error before "socklen_t"

Fixed. But there may be other errors.

I like to write some regression tests before I do a new release. If you
want to test my fixes now, I can send you a tarball.


Shalom-Salam,

Werner


--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


lists at openorbit

May 11, 2012, 12:38 PM

Post #4 of 5 (404 views)
Permalink
Re: npth-0.90 build report [In reply to]

I decided to publish some code I wrote earlier at github. It implements clock_gettime for OS X / darwin. I kindly offer it using a dual GPL v2 or LGPL v3 or later license. This may be interesting for the npth library that failed building due to this function being missing on darwin.

It is available at https://github.com/kinslayer/darwin-posix-rt

If you want to can clean it up and make a patch with #ifdef __APPLE__ guards, would this be OK?


Kind regards,
Mattias


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


wk at gnupg

May 12, 2012, 1:19 AM

Post #5 of 5 (410 views)
Permalink
Re: npth-0.90 build report [In reply to]

On Fri, 11 May 2012 21:38, lists [at] openorbit said:
> I decided to publish some code I wrote earlier at github. It
> implements clock_gettime for OS X / darwin. I kindly offer it using a
> dual GPL v2 or LGPL v3 or later license. This may be interesting for

Thanks for that offer. However, I already implemented it using
gettimeofday:

int
npth_clock_gettime (struct timespec *ts)
{
#if defined(CLOCK_REALTIME) && HAVE_CLOCK_GETTIME
return clock_gettime (CLOCK_REALTIME, ts);
#elif HAVE_GETTIMEOFDAY
{
struct timeval tv;

if (gettimeofday (&tv, NULL))
return -1;
ts->tv_sec = tv.tv_sec;
ts->tv_nsec = tv.tv_usec * 1000;
return 0;
}
#else
/* FIXME: fall back on time() with seconds resolution. */
# error clock_gettime not available - please provide a fallback.
#endif
}

The gotcha was that HAVE_CLOCK_GETTIME alone was not sufficient, a test
for the CLOCK_REALTIME macro was also required. It would be better to
do the test for CLOCK_REALTIME while testing for clock_gettime, but
well, this was easier.


Salam-Shalom,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

GnuPG devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.