From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] cyrus-sasl in buildroot: makemd5 is wrongly cross-compiled
Date: Fri, 24 Jun 2011 14:52:03 +0200 [thread overview]
Message-ID: <4E048873.1090000@lucaceresoli.net> (raw)
In-Reply-To: <4E04828A.6030908@lucaceresoli.net>
Hi,
after having worked around the "apparent CFLAGS mismatch" problem, I hit
another cross-compilation error while trying to build cyrus-sasl in
buildroot:
$ make cyrus-sasl-dirclean
$ make cyrus-sasl 2>&1 | tee cyrus-sasl.log
[...]
/home/murray/devel/buildroot/output/host/usr/bin/ccache
/home/murray/devel/buildroot/output/host/usr/bin/arm-linux-gcc -Wall -W
-Os -pipe -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -o makemd5 makemd5.o -lresolv
rm -f md5global.h
./makemd5 md5global.h
/bin/bash: ./makemd5: cannot execute binary file
make[3]: *** [md5global.h] Error 126
[...]
The problem here is pretty clear: makemd5, which is meant to run on the
host,
has been cross-compiled instead:
$ file output/build/cyrus-sasl-2.1.24rc1/include/makemd5
output/build/cyrus-sasl-2.1.24rc1/include/makemd5: ELF 32-bit LSB
executable, ARM, version 1 (SYSV), dynamically linked (uses shared
libs), for GNU/Linux 2.6.31, not stripped
Attached is my patch to allow makemd5 to correctly (non-cross) compiled.
Basically, it consists in replacing $(CC) with $(HOSTCC) in cyrus-sasl's
include/Makefile.in.
Note that I'm not the first that faced this problem. My patch has been
inspired by:
http://tech.dir.groups.yahoo.com/group/nslu2-linux/message/4044?var=0
The build log is attached too.
Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyrus-sasl-makemd5.log.gz
Type: application/x-gzip
Size: 3477 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110624/6e781892/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyrus-sasl-hostcc.patch
Type: text/x-patch
Size: 1317 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110624/6e781892/attachment-0003.bin>
next prev parent reply other threads:[~2011-06-24 12:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 12:26 [Buildroot] Cross-compiling Cyrus in Buildroot Luca Ceresoli
2011-06-24 12:38 ` [Buildroot] cyrus-sasl in buildroot: apparent CFLAGS mismatch on saslauthd Luca Ceresoli
2011-06-24 12:52 ` Luca Ceresoli [this message]
2011-06-24 13:03 ` [Buildroot] cyrus-sasl in buildroot: installs files with "arm-linux-" prefix Luca Ceresoli
2011-08-23 13:06 ` Luca Ceresoli
2011-06-24 15:20 ` [Buildroot] cyrus-imapd in buildroot: imtest does not cross-compile correctly Luca Ceresoli
2011-06-24 16:27 ` [Buildroot] cyrus-imapd: static binaries are huge + choose binaries to install Luca Ceresoli
2011-08-23 13:30 ` [Buildroot] Cross-compiling Cyrus in Buildroot Luca Ceresoli
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=4E048873.1090000@lucaceresoli.net \
--to=luca@lucaceresoli.net \
--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