From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Tue, 12 Jul 2016 10:56:24 +0200 Subject: [Buildroot] perl XS modules In-Reply-To: <20160712101554.483fd170@gmail.com> References: <20160708095910.621ad48a@gmail.com> <20160708174043.3e1b7d11@free-electrons.com> <20160712101554.483fd170@gmail.com> Message-ID: <20160712105624.58817034@free-electrons.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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