Hello,

Around June 2018, there were few changes to the random module:
==
6979c258b  random_r: do not crash if state is unaligned
dc4b9a1f9  random_r: omit unnecessary include
137dda358  random, random_r: merge from glibc
==

After uprgading gnulib and re-building (towards a new release),
and when building on cygwin with a mingw compiler, I see the following
warnings and errors.

My code calls srandom() and random() and nothing changed in the code
since the previous released (which used gnulib circa March 2018, before
the module changes).

I'm still investigating things on my end, but if this rings a bell to
any one - any comments or suggestions are welcomed.

Thanks,
 - assaf



==
$ ./configure --host=x86_64-w64-mingw32 --disable-nls
$ make

[...]

depbase=`echo lib/random.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
x86_64-w64-mingw32-gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -Ilib -I./lib -Isrc -I./src -g -O2 -MT lib/random.o -MD -MP -MF $depbase.Tpo -c -o lib/random.o lib/random.c &&\
mv -f $depbase.Tpo $depbase.Po
lib/random.c: In function '__srandom':
lib/random.c:221:10: warning: implicit declaration of function '__srandom_r' [-Wimplicit-function-declaration]
   (void) __srandom_r (x, &unsafe_state);
          ^~~~~~~~~~~
lib/random.c: In function '__initstate':
lib/random.c:249:9: warning: implicit declaration of function '__initstate_r' [-Wimplicit-function-declaration]
   ret = __initstate_r (seed, arg_state, n, &unsafe_state);
         ^~~~~~~~~~~~~
lib/random.c: In function '__setstate':
lib/random.c:275:7: warning: implicit declaration of function '__setstate_r' [-Wimplicit-function-declaration]
   if (__setstate_r (arg_state, &unsafe_state) < 0)
       ^~~~~~~~~~~~
lib/random.c: In function '__random':
lib/random.c:303:10: warning: implicit declaration of function '__random_r' [-Wimplicit-function-declaration]
   (void) __random_r (&unsafe_state, &retval);
          ^~~~~~~~~~
depbase=`echo lib/random_r.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
x86_64-w64-mingw32-gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -Ilib -I./lib -Isrc -I./src -g -O2 -MT lib/random_r.o -MD -MP -MF $depbase.Tpo -c -o lib/random_r.o lib/random_r.c &&\
mv -f $depbase.Tpo $depbase.Po

[...]

/home/admin/pretest.2018-12-14.mR95hZ/datamash-1.3.9-62c5.gIRsqa/datamash-1.3.9-62c5/src/field-ops.c:479: undefined reference to `random'
src/datamash-field-ops.o: In function `init_random':
/home/admin/pretest.2018-12-14.mR95hZ/datamash-1.3.9-62c5.gIRsqa/datamash-1.3.9-62c5/src/field-ops.c:1035: undefined reference to `srandom'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2709: datamash.exe] Error 1
==

Reply via email to