Installing the MCDB_File Perl module results in error
Shellfishgene opened this issue · comments
Hi,
I just tried to install MCDB_File via CPAN, on two different computers (Ubuntu and RedHat) I get this result:
(some stuff omitted)
gcc -pipe -o mcdb_makefmt.o -Wall -Winline -pedantic -ansi -O3 -g -m64 -D_FORTIFY_SOURCE=2 -fstack-protector -std=c99 -D_XOPEN_SOURCE=600 -pthread -D_THREAD_SAFE -fpic -c mcdb_makefmt.c
gcc -pipe -o mcdb_makefn.o -Wall -Winline -pedantic -ansi -O3 -g -m64 -D_FORTIFY_SOURCE=2 -fstack-protector -std=c99 -D_XOPEN_SOURCE=600 -pthread -D_THREAD_SAFE -fpic -c mcdb_makefn.c
gcc -pipe -o nointr.o -Wall -Winline -pedantic -ansi -O3 -g -m64 -D_FORTIFY_SOURCE=2 -fstack-protector -std=c99 -D_XOPEN_SOURCE=600 -pthread -D_THREAD_SAFE -fpic -c nointr.c
In file included from nointr.c:32:
/usr/include/x86_64-linux-gnu/sys/stat.h:361:31: error: array type has incomplete element type ‘struct timespec’
361 | const struct timespec __times[2],
| ^~~~~~~
make[1]: *** [Makefile:216: nointr.o] Error 1
make[1]: Leaving directory '/root/.cpan/build/MCDB_File-0.0106-0/mcdb'
make: *** [Makefile:1083: mcdb/libmcdb.a] Error 2
GSTRAUSS/MCDB_File-0.0106.tar.gz
/usr/bin/make -- NOT OK
I have no idea what I'm doing, but found from here https://bugs.gentoo.org/638786 that adding #include <time.h>
to nointr.c
solves the error.
Thanks for letting me know.
A system header such as sys/types.h
should include whatever system headers it needs. That's not a bug in nointr.c, but I'll look into a workaround. What versions of Ubuntu and RedHat are you using? What version of glibc do you have installed on those systems? I do not get an error when compiling the upstream source mcdb source code on Fedora 33, with glibc-2.32. I'll try to reproduce with the CPAN package.
make test POSIX_STD=-D_XOPEN_SOURCE=700
Looks like I need to release to MCDB_File with an updated mcdb.tar.gz. -D_XOPEN_SOURCE=700
has been in upstream mcdb since 2013.
I tried Red Hat Enterprise Linux release 8.2 and Ubuntu 20.04. LTS with glibc 2.28
and glibc 2.31-0ubuntu9.1
, respectively. Thanks!
It should build for you with this: make test POSIX_STD=-D_XOPEN_SOURCE=700
Thanks! It works.
I have one more issue, but I think it's related to our system, but maybe you have in idea: When I run my $mcdb_make = new MCDB_File::Make('t.mcdb') or die "create t.mcdb failed: $!\n";
it reports MCDB_File::Make failed: No space left on device
. This is a GPFS volume and there is a lot of space left, I can copy large files to it. I haven't gotten this error from any other program.
No space left on device
is a system error ENOSPC
mcdb uses mmap()
and related commands. That the 'm' in 'mcdb'.
Please strace -f
your command to see which system call returns ENOSPC
or 28
(on Linux with glibc), and share that. It is possible that GPFS does not support certain filesystem-related system calls employed by mcdb.