perl-Curses breakage

After upgrading Leap 42.3 -> 15.0, scripts depending on perl-Curses started to fail. The error message is as follows:


Curses function `getbegyx` is not defined in your Curses library at ...

The error message is emitted by the perl package Curses::UI which was side-installed using cpanm. This package is pure perl and unchanged from 42.3. Inspecting the perl file corresponding to perl-Curses, it claims to define the function. Apparently, at runtime the curses c-library cannot be accessed.
Any help appreciated.

To follow up on my own post, I had a system that was upgraded from 42.3 -> 15.0. Still had perl-Curses dependent scripts working. After a re-install the scripts stopped working. I first thought that the cpanm stuff would have to be responsible but actually those versions were unchanged. The curses c-libraries had been bumped by the 42.3->15.0 upgrade so they should not be responsible either unless old versions were kept by the upgrade which I unfortunately cannot check as a HD died. I am puzzled at the moment.

When inspecting the build log of a cpanm install of the Curses package, the following functions are not found:


function 'getparyx' NOT found
function 'getbegyx' NOT found
function 'getmaxyx' NOT found

These functions were found under 42.3. Using nm -D on /lib64/libcursesw.so.6 those functions are nowhere to be found:


nm -D /lib64/libncursesw.so.6 | grep beg
0000000000012320 T getbegx
0000000000012330 T getbegy

neither on 42.3 nor on 15.0

getbegyx is defined as macro and for all I can tell has always been.

Yes, I found out in the meantime. The perl-package needs these as callable functions and jumps through some hoops to get them. I hacked up the source package to solve the problem. Unfortuantely, the patch cannot be upstreamed.

If you need the package, here is the patch


--- CursesFun_orig.c    2018-12-15 21:34:57.018164764 +0100
+++ CursesFun.c 2018-12-15 21:29:55.329072849 +0100
@@ -1089,7 +1089,8 @@
 XS(XS_Curses_getparyx)
 {
     dXSARGS;
-#ifdef C_GETPARYX
+//#ifdef C_GETPARYX
+#if 1
     c_countargs("getparyx", items, 2);
     {
     WINDOW *win = c_win ? c_sv2window(ST(0), 0) : stdscr;
@@ -1111,7 +1112,8 @@
 XS(XS_Curses_getbegyx)
 {
     dXSARGS;
-#ifdef C_GETBEGYX
+//#ifdef C_GETBEGYX
+#if 1
     c_countargs("getbegyx", items, 2);
     {
     WINDOW *win = c_win ? c_sv2window(ST(0), 0) : stdscr;
@@ -1133,7 +1135,8 @@
 XS(XS_Curses_getmaxyx)
 {
     dXSARGS;
-#ifdef C_GETMAXYX
+//#ifdef C_GETMAXYX
+#if    1
        c_countargs("getmaxyx", items, 2);
     {
     WINDOW *win = c_win ? c_sv2window(ST(0), 0) : stdscr;

Save above patch to Curses_patch. Download the perl package Curses from metacpan, unpack, cd to the directory.


patch CursesFun.c < Curses_patch
cpanm .

And you should be good to go for a local user.