views:

81

answers:

2

After moving my mod_perl site from Linux hosting to FreeBSD, I have this error in the logfile:

Your vendor has not defined POSIX macro SIGRTMIN, used at ../../lib/POSIX.pm (autosplit into ../../lib/auto/POSIX/SigRt/_init.al) line 993\n

The script just imports POSIX and utilizes some functions (ceil, etc)

How can I solve this issue ?

+3  A: 

Try importing only few (or none) routines from the module:

use POSIX ();
my $n = POSIX::ceil(1.1);

This used to work for me in the same circumstances, I don't know why :)

eugene y
This worked, thanks.
planetp
+4  A: 

FreeBSD is mostly POSIX-compliant. For example, it doesn't define SIGRTMIN and SIGRTMAX in its signal.h. We are warned against this in POSIX's documentation:

Furthermore, some evil vendors will claim 1003.1 compliance, but in fact are not so: they will not pass the PCTS (POSIX Compliance Test Suites). For example, one vendor may not define EDEADLK, or the semantics of the errno values set by open(2) might not be quite right. Perl does not attempt to verify POSIX compliance. That means you can currently successfully say "use POSIX", and then later in your program you find that your vendor has been lax and there's no usable ICANON macro after all. This could be construed to be a bug.

eugene y's solution might work as it will prevent auto exporting into your namespace, but be sure to prefix any calls to ceil and so on with POSIX::.

Pedro Silva