From: Dan Moulding <dan.moulding@rackwareinc.com>
To: buildroot@busybox.net
Subject: [Buildroot] ccache directory not being created
Date: Thu, 20 Mar 2014 11:38:09 -0600 (MDT) [thread overview]
Message-ID: <1395337089.65339451@apps.rackspace.com> (raw)
Hello,
I have experienced a problem where, with ccache enabled, and the cache directory set to a subdirectory within the buildroot output directory, the build fails because ccache is trying to write files to the cache directory, but the cache directory doesn't exist. Well, more precisely, ccache will create the cache directory itself, but the cache directory's parent directory does not exist and ccache will not create that.
The error I get, during host-binutils 2.24 configuration, is:
checking for C compiler default output file name...
configure: error: in `/home/dmoulding/rwi1/cai/buildroot/output/build/host-binutils-2.24':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [/home/dmoulding/rwi1/cai/buildroot/output/build/host-binutils- 2.24/.stamp_configured] Error 77
Examining config.log I see this:
configure:4258: checking for C compiler default output file name
configure:4280: /home/dmoulding/rwi1/cai/buildroot/output/host/usr/bin/ccache /usr/lib64/ccache/gcc -O2 -I/home/dmoulding/rwi1/cai/buildroot/output/host/usr/include -I/home/dmoulding/rwi1/cai/buildroot/output/host/usr/include -L/home/dmoulding/rwi1/cai/buildroot/output/host/lib -L/home/dmoulding/rwi1/cai/buildroot/output/host/usr/lib -Wl,-rpath,/home/dmoulding/rwi1/cai/buildroot/output/host/usr/lib conftest.c >&5
ccache: failed to create /home/dmoulding/rwi1/cai/buildroot/output/build/toolchain-undefined/ccache-3.1.8/cache (No such file or directory)
configure:4284: $? = 1
configure:4321: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4327: error: in `/home/dmoulding/rwi1/cai/buildroot/output/build/host-binutils-2.24':
configure:4331: error: C compiler cannot create executables
See `config.log' for more details.
Note that ccache is complaining that it cannot create the "cache" directory (the parent directory does not exist).
Relevant Buildroot configuration:
BR2_CCACHE=y
BR2_CCACHE_DIR="$(TOOLCHAIN_DIR)/ccache-$(CCACHE_VERSION)/cache"
Looking way back in buildroot's history, I see that in 2010 (commit 17b66af), the way ccache is managed was reworked. Prior to this rework, the ccache makefile used to "mkdir -p" the cache directory. I don't see anywhere in the current revision where the equivalent is being done.
For now, I have patched my package/ccache/ccache.mk to add a hook that does the "mkdir -p" step. Is this the right way to solve this problem, or have I overlooked something else?
Cheers,
-- Dan
next reply other threads:[~2014-03-20 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-20 17:38 Dan Moulding [this message]
2014-03-20 19:56 ` [Buildroot] ccache directory not being created 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=1395337089.65339451@apps.rackspace.com \
--to=dan.moulding@rackwareinc.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