byronmurg has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks

I've been using the fantastic Dancer framework to make a teeny REST API to do some trivial stuff on a remote sensor and it has been working superbly. I'm trying to stick to Dancer1 (not 2) as it's available on the Debian 7 repo.

However when I try to create an installation package using ExtUtils::Makemaker it's trying to run mkbootstrap() which fails as there's no way for it to compile the module to bytecode.

I really just want it to install my files into the relevant paths without compiling but I can see no way to stop this behaviour.

I've tried installing B::C and compiling manually in the hope that it'll just skip the stage when building cannot build the package from cpan. The issue seems to stem from discontinuation of perlcc.

Here's my output

byron@asmbox:~/asm-restapi$ make cp lib/asmapi.pm blib/lib/asmapi.pm Running Mkbootstrap for asmapi () chmod 644 "asmapi.bs" rm -f blib/arch/auto/asmapi/asmapi.so cc -shared -L/usr/local/lib -fstack-protector asmapi.o -o blib/arch/ +auto/asmapi/asmapi.so \ \ cc: error: asmapi.o: No such file or directory

Any ideas? Thanks in advanced

Replies are listed 'Best First'.
Re: Stop bootstrapping!
by Corion (Patriarch) on Mar 01, 2016 at 16:07 UTC

    Your diagnosis is wrong. Perl does not compile modules to bytecode and does not store it on disk as part of the module installation process.

    You will need to show more of the module and its installation process that fails for us to diagnose it. As it looks to me, the installation fails for the asmapi distribution, which doesn't exist on CPAN.

      Hi Corion

      Thanks for the quick response!

      My apologies I've been looking at this for weeks and I've just realized the problem. The issue is because there's a *.c file in the same directory (used for an SUID). ExtUtils must see this and assume that it's meant to be compiling some C despite there being no mention of the file in the Makefile.PL or MANIFEST

      I just deleted the C source and it remembered how to do perl.

      byron@asmbox:~/asm-restapi$ rm asmctl.c byron@asmbox:~/asm-restapi$ make cp lib/asmapi.pm blib/lib/asmapi.pm cp bin/asmapi.pl blib/script/asmapi.pl ... byron@asmbox:~/asm-restapi$ make distclean byron@asmbox:~/asm-restapi$ touch somthing.c byron@asmbox:~/asm-restapi$ make distclean && perl Makefile.PL byron@asmbox:~/asm-restapi$ make cp lib/asmapi.pm blib/lib/asmapi.pm Running Mkbootstrap for asmapi () chmod 644 "asmapi.bs" rm -f blib/arch/auto/asmapi/asmapi.so cc -shared -L/usr/local/lib -fstack-protector asmapi.o -o blib/arch/ +auto/asmapi/asmapi.so \ \ cc: error: asmapi.o: No such file or directory

      Doesn't mention this in the manual.

      Thanks anyway!