[Buildroot] perl XS modules
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Tue Jul 12 08:56:24 UTC 2016
Hello,
On Tue, 12 Jul 2016 10:15:54 +0200, Arne Caspari wrote:
> Thank you very much for coming back to me. It is highly appreciated.
>
> I did not know about the scancpan-Script - this would have saved me a
> ton of work, literally since I just ported a package with very very
> many module dependencies (the Logitech Media Server) to buildroot. Ah
> well...
The scancpan script is mentioned in the Buildroot manual:
"""
So, this file and the Config.in can be generated by running the script
supports/scripts/scancpan Foo-Bar in the Buildroot directory (or in
the BR2_EXTERNAL directory). This script creates a Config.in file and
foo-bar.mk file for the requested package, and also recursively for
all dependencies specified by CPAN. You should still manually edit the
result. In particular, the following things should be checked.
"""
> I finally found the issue with the perl XS packages though: The perl
> MakeMaker module fails to generate a correct Makefile but instead
> messes up the configuration with the host-perl one. I kind of fixed the
> issue for me in a very hackish way by modifying the generated Makefile
> with the following script:
>
> define PERL_XML_PARSER_BUILD_CMDS
> sed "s~/usr/bin/gcc~$(TARGET_CC) -Os~" -i $(@D)/Makefile
> sed "s~/usr/bin/gcc~$(TARGET_CC) -Os~" -i $(@D)/Expat/Makefile
> sed "s~x86_64~$(KERNEL_ARCH)~" -i $(@D)/Expat/Makefile
> sed "s~host/usr/lib~staging/usr/lib~" -i $(@D)/Expat/Makefile
> $(MAKE) $(@D)/Makefile -C $(@D)
> endef
>
> The module loads correctly afterwards. Unfortunately I do not have any
> experience with perl or the MakeMaker module to come up with a less
> insane fix.
Again, could you give a Buildroot configuration, and a test scenario
that allows us to reproduce the issue ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list