Repository navigation
ld: error: undefined hidden symbol: Perl_do_ncmp #2
Description
Activity
I came here confirm the issue with a similar error log:
gcc -c -I. -DSILENT_NO_TAINT_SUPPORT -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O3 -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -fPIC "-I/usr/local/booking-perl/5.42/lib/CORE" XS.c rm -f blib/arch/auto/Algorithm/Heapify/XS/XS.so LD_RUN_PATH="/usr/lib/pakket/5.42/libraries/active/lib:/usr/lib/pakket/5.42/libraries/active/lib64" gcc -shared -g1 -O3 -L/usr/local/lib -fstack-protector-strong XS.o -o blib/arch/auto/Algorithm/Heapify/XS/XS.so \ /opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: XS.o: in function `sift_up': XS.c:(.text+0x1f1): undefined reference to `Perl_do_ncmp' /opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: XS.o: in function `sift_down': XS.c:(.text+0x7f9): undefined reference to `Perl_do_ncmp' /opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: XS.c:(.text+0x811): undefined reference to `Perl_do_ncmp' /opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: blib/arch/auto/Algorithm/Heapify/XS/XS.so: hidden symbol `Perl_do_ncmp' isn't defined /opt/rh/gcc-toolset-12/root/usr/libexec/gcc/x86_64-redhat-linux/12/ld: final link failed: bad value collect2: error: ld returned 1 exit status make: *** [Makefile:481: blib/arch/auto/Algorithm/Heapify/XS/XS.so] Error 1If we look at line 1072 of
proto.hat perl5 commit 0351a629e71de127cbfd1b142e9eaa6069deabf5As we can see was updated in the diff but GitHub's deep linking doesn't seem to support the diff-view.
Sorry this is fixed now in v 5.0
FWIW, this really should not have been removed from core, I fixed this by copying the one from core, which doesn't make sense. Its actually a bit trick to make an efficient function for this, see Perl_do_ncmp()'s code.
FWIW, this really should not have been removed from core, I fixed this by copying the one from core, which doesn't make sense. Its actually a bit trick to make an efficient function for this, see Perl_do_ncmp()'s code.
@demerphq, thanks for the release! I've just build it on our systems!
For the general discussion about hidden functions, maybe you'll want to chime in the discussion on Perl/perl5#23918, especially these comments by @Leont (Perl/perl5#23918 (comment)) and @tonycoz (Perl/perl5#23918 (comment)).
5.43.8 adds sv_numcmp(), sv_numlt(), sv_numgt() etc that handle overloading correctly (more correctly than the 0.03 or 0.06 implementation here) - ticket to come
Fails to link with perl 5.38 and later: