Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Absolute build paths in rootfs tarball
Date: Tue, 20 Oct 2015 17:18:09 +0200	[thread overview]
Message-ID: <20151020171809.28af37d8@free-electrons.com> (raw)
In-Reply-To: <CAJCNcEZNAu0pU3pCAhpcKv-a9VqZHG7wg3W+Ko089nVGZhuWjQ@mail.gmail.com>

Hello Gorka,

On Tue, 20 Oct 2015 15:30:19 +0200, Gorka Lertxundi wrote:

> I'm experiencing a weird issue, probably because a) i'm new to busybox & b)

I guess you're talking about "Buildroot", not "Busybox".

> i'm doing it wrong. But here it is:
> 
> - Using buildroot 2015.08.1.
> - I created an external toolchain using crosstool-ng.
> - Building it in Travis CI.
> - For now, testing my first full-packaged buildroot-based image with mono.
> 
> Everything builds up correctly except for one thing, it seems like when
> buildroot wants to use the full path it uses the host-based absolute path
> (builder path), and not the rootfs-based one.
> 
> Probably using this use-case it's much easier to explain:
> 
> - Travis CI builds everything in /home/travis
> - After everything is built, rootfs.tar contains a mono configuration file
> in /etc/mono/config which has references to custom native dll libraries.
> - I expect this file would contain relative paths (but that's another
> thing) but some of them use an absolute path like this:
>   - <dllmap dll="MonoPosixHelper"
> target="/home/travis/buildroot/output/host/usr/lib/libMonoPosixHelper.so"
> os="!windows" />
> 
> Do you known how could I avoid this behaviour, and use rootfs-based
> relative paths?

The "mono" packaging is relatively new, and does not have a lot of
users, so I am not too surprised that there are some remaining issues.

What you are seeing is a classical problem of cross-compilation:
leakage of paths/informations from the build environment into the
generated target code/files.

You need to look into how Mono generates this file to see what is the
appropriate solution to get proper paths. Of course, a brute force
solution is to change mono.mk to simply fixup those files at the end of
the Mono installation. But maybe there's a better solution than that,
and the only way to know is to look in more details at the Mono build
system.

I'm Cc'ing Angelo, who did the initial Mono packaging and several
updates to it. Maybe he will have some ideas.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-10-20 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 13:30 [Buildroot] Absolute build paths in rootfs tarball Gorka Lertxundi
2015-10-20 15:18 ` Thomas Petazzoni [this message]
2015-10-20 15:29   ` Gorka Lertxundi

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=20151020171809.28af37d8@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox