All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] perl XS modules
Date: Tue, 12 Jul 2016 10:56:24 +0200	[thread overview]
Message-ID: <20160712105624.58817034@free-electrons.com> (raw)
In-Reply-To: <20160712101554.483fd170@gmail.com>

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

  reply	other threads:[~2016-07-12  8:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08  7:59 [Buildroot] perl XS modules Arne Caspari
2016-07-08 15:40 ` Thomas Petazzoni
2016-07-12  8:00   ` François Perrad
2016-07-12  8:09     ` Thomas Petazzoni
2016-07-12  8:15     ` Arne Caspari
2016-07-12  8:56       ` Thomas Petazzoni [this message]
2016-07-12  9:04         ` Arne Caspari
2016-07-12  9:43           ` François Perrad
2016-07-12 10:16             ` Thomas Petazzoni
2016-07-12 11:05               ` François Perrad
2016-07-12 11:08                 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160712105624.58817034@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.