t/io/sem.t fails with perl-cross 0.9
Closed this issue · 10 comments
this test fails:
$ ./perl io/sem.t
1..7
ok 1 - acquired semaphore
semctl not implemented at io/sem.t line 50.
semctl not implemented at io/sem.t line 27.
my config.sh
contains
d_sem='define'
and my config.h
contains
#define HAS_SEM
Can you check the values for d_semctl_semid_ds and d_semctl_semun?
If both are undef, that's the reason why semctl is not built.
These values are hinted in cnf/hints/linux-gnu, otherwise they require runtime tests to check.
both undef
d_sem='define'
d_semctl='define'
d_semctl_semid_ds='undef'
d_semctl_semun='undef'
d_semget='define'
d_semop='define'
- perl 5.18.2 with perl-cross 0.8.5 gives the same config values
t/io/sem.t
is a new file in perl 5.20.0- perl 5.20.0 / linux gives usually these values :
d_sem='define'
d_semctl='define'
d_semctl_semid_ds='define'
d_semctl_semun='define'
d_semget='define'
d_semop='define'
For me, looks like the values in cnf/hints/linux-gnu
need to be fixed
Ok, agreed, hints updated.
with the head of perl-cross and perl-5.20.0, I still have in config.sh
d_sem='define'
d_semctl='define'
d_semctl_semid_ds='undef'
d_semctl_semun='undef'
d_semget='define'
d_semop='define'
the output of the configure contains
Checking which hints to use
using cnf/hints/default
using cnf/hints/linux
using cnf/hints/linux-gnu
But looks like, cnf/hints/linux-gnu
was not used.
By any chance, was that "Checking which hints to use" output from miniperl configure?
linux-gnu sets the values unconditionally, and there's nothing else to override them.
If possible, can you attach full config.log?
done in https://gist.github.com/fperrad/11d858d7dbc2009861e6
(config.log + config.sh)
Ok, I see it right away: the target is arm-buildroot-linux-gnueabi, which means it doesn't even try to load linux-gnu hints, it tries (nonexistant) linux-gnueabi instead.
A quick fix is to copy hints/linux-gnu to hints/linux-gnueabi
I'm trying to figure out how to handle it the right way.
I added this fix in http://git.buildroot.net/buildroot/tree/package/perl/perl.mk
define PERL_FIX_ISSUE3
(cd $(@D)/cnf/hints; cp linux-gnu linux-gnueabi)
endef
PERL_PRE_CONFIGURE_HOOKS += PERL_FIX_ISSUE3
config.sh
is correct and the test io/sem.t
pass.
Ok, that's good.
I moved those hints from "linux-gnu" to "linux", I thought union semun comes from libc but it turns out it's from kernel headers. So starting with the next version there should be no need in PERL_FIX_ISSUE3.