Skip Menu |

This queue is for tickets about the Alien-libtermkey CPAN distribution.

Report information
The Basics
Id: 105822
Status: open
Priority: 0/
Queue: Alien-libtermkey

People
Owner: Nobody in particular
Requestors: TEAM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.16
Fixed in: (no value)



Subject: Fails to install without curses.h, even if Alien::unibilium is installed
Current version seems to expect curses.h, but I thought with unbilium ncurses wasn't required? Configuring Alien-libtermkey-0.16 Running Build.PL Building bundled source Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Alien-libtermkey' version '0.16' -> OK Checking dependencies from MYMETA.json ... Checking if you have File::Basename 0 ... Yes (2.85) Checking if you have File::Path 2.07 ... Yes (2.09) Checking if you have File::Spec 0 ... Yes (3.56) Building Alien-libtermkey-0.16 Building Alien-libtermkey libtool --mode=compile --tag=CC gcc -Wall -std=c99 -o termkey.lo -c termkey.c libtool: compile: gcc -Wall -std=c99 -c termkey.c -fPIC -DPIC -o .libs/termkey.o libtool: compile: gcc -Wall -std=c99 -c termkey.c -o termkey.o >/dev/null 2>&1 libtool --mode=compile --tag=CC gcc -Wall -std=c99 -o driver-csi.lo -c driver-csi.c libtool: compile: gcc -Wall -std=c99 -c driver-csi.c -fPIC -DPIC -o .libs/driver-csi.o libtool: compile: gcc -Wall -std=c99 -c driver-csi.c -o driver-csi.o >/dev/null 2>&1 libtool --mode=compile --tag=CC gcc -Wall -std=c99 -o driver-ti.lo -c driver-ti.c libtool: compile: gcc -Wall -std=c99 -c driver-ti.c -fPIC -DPIC -o .libs/driver-ti.o driver-ti.c:10:21: fatal error: curses.h: No such file or directory # include <curses.h> ^ compilation terminated. make: *** [driver-ti.lo] Error 1 Unable to make - No such file or directory at inc/Alien/make/Module/Build.pm line 108. This is from 'cpanm Tickit' on a clean perl-5.22.0 on Ubuntu 14.04. Might be related to the way pkg-config files are only installed for the dist, i.e. 'pkg-config unibilium' doesn't find anything if it was installed via Alien::unibilium? # cpanm Alien::unibilium Alien::unibilium is up to date. (0.12) # cpanm Alien::libtermkey --> Working on Alien::libtermkey Fetching http://cpan.perlsite.co.uk/authors/id/P/PE/PEVANS/Alien-libtermkey-0.16.tar.gz ... OK Configuring Alien-libtermkey-0.16 ... OK Building and testing Alien-libtermkey-0.16 ... FAIL (and the failure in the log file is those lines reported above) cheers, Tom
Well, ignoring the unibilium part, it seems Build.PL isn't sufficiently able to complain early on about a lack of dependency: $ apt-get remove libncurses5-dev libncursesw5-dev libunibilium-dev libtermkey-dev $ perl Build.PL [runs OK] $ ./Build [complains at:] driver-ti.c:10:21: fatal error: curses.h: No such file or directory # include <curses.h> ^ compilation terminated. It should probably notice this at Build.PL time and abort. -- Paul Evans
On Sun Jul 12 08:39:18 2015, TEAM wrote: Show quoted text
> Current version seems to expect curses.h, but I thought with unbilium > ncurses wasn't required?
... Show quoted text
> Might be related to the way pkg-config files are only installed for > the dist, i.e. 'pkg-config unibilium' doesn't find anything if it was > installed via Alien::unibilium?
Yeeeesss... Turns out this is turning rather nontrivial. With a small amount of hackery, it's easy enough to make Alien::unibilium install a real .pc file that contains full paths within it, so it's usable by a real `pkg-config` directly. I have now down that. But, that won't get you very far on its own because the .pc file doesn't contain the RUNPATH setting, hence the extra trickery involved at https://metacpan.org/source/PEVANS/Alien-unibilium-0.12/lib/Alien/unibilium.pm#L92 A system-level `pkg-config` reading the .pc file won't see that, meaning that by the time it comes to "make test", the lack of RPATH means that trying to link libtermkey.so will never find a libunibilium.so, so the whole lot falls over. I don't know what is a good solution here. 1) We could further mangle the .pc file at build or install time to add the RPATH argument in 2) We could set LD_LIBRARY_PATH or LD_RUN_PATH for the duration of the 'make' invocations -- Paul Evans
For me, the current workaround on Debian-based systems is 'apt install libunibilium-dev'. However, this means that we're unlikely to see many cpantester results.