Re: [ccache] amd64 buildworld (FreeBSD 8.0p2) consistently fails with ccache

2010-05-12 Thread Joel Rosdahl
On 2010-05-11 01:38, Christer Edwards wrote:
 I've got another failure (same place) on 3.0pre1.Below are the details:
 
 I executed 'ccache make buildworld' at /usr/src.

Putting ccache before make doesn't gain anything (but doesn't do any
harm either, except that an error counter in ccache's statistics will be
increased).

 [...]
 [2010-05-10T17:30:38.825974 53291] Running preprocessor
 [2010-05-10T17:30:38.827775 53292] Executing
 /usr/obj/usr/src/tmp/usr/bin/cc -O2 -pipe
 -I/usr/src/lib/csu/i386-elf/../common
 -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99
 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
 -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
 -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
 -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
 -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c -E
 /usr/src/lib/csu/i386-elf/crt1.c
 [...]
 [2010-05-10T17:30:38.853797 53291] Running real compiler
 [2010-05-10T17:30:38.855228 53294] Executing
 /usr/obj/usr/src/tmp/usr/bin/cc -O2 -pipe
 -I/usr/src/lib/csu/i386-elf/../common
 -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99
 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W
 -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
 -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
 -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
 -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c -o
 /usr/.ccache/7/e/00e1bb753cccab0b3367e6287435a8-23935.o.tmp.mouzone.part.net.53291
 /usr/.ccache/tmp/crt1.tmp.mouzone.part.net.53291.i
 [2010-05-10T17:30:38.903089 53291] Compiler gave exit status 1
 [2010-05-10T17:30:38.903377 53291] Copying
 /usr/.ccache/7/e/00e1bb753cccab0b3367e6287435a8-23935.o.tmp.mouzone.part.net.53291
 to crt1.o (uncompressed)
 [2010-05-10T17:30:38.906771 53291] open error: No such file or directory

Nothing strange there, I'm afraid.

Just to make it clear: The build works without ccache, right?

Does it work to run the first command in the log above (after
Executing), redirect the output to crt1.i and then run the second
command with -o crt1.o crt1.i? If it doesn't work, it's probably a
compiler problem since it can't compile its own preprocessed output. A
workaround for that is to set CCACHE_CPP2 (preferably only when building
the troublesome file). If it works when you run the two commands
manually but not when ccache runs them, then I'm out of guesses.

By the way, I found another thread about the same problem here:
http://www.pubbs.net/200912/freebsd/12812-8-stable-broken-on-amd64.html

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] amd64 buildworld (FreeBSD 8.0p2) consistently fails with ccache [SOLVED]

2010-05-12 Thread Christer Edwards
On Wed, May 12, 2010 at 12:25 AM, Joel Rosdahl j...@rosdahl.net wrote:
 Just to make it clear: The build works without ccache, right?

It has always worked without ccache, yes.

I have solved the issue now. It was on my end. Generally when I
install FreeBSD I select the 'minimal' option and nothing more. Today,
in testing this, I looked more closely at what I could/should be
installing. One of the possible items is the '32bit runtime
compatibility libraries'. After ensuring this was installed I tried my
builds again. I have now successfully completed three builds and
recorded their results. I don't understand why the inclusion/exclusion
of this would cause the difference when building with ccache, but it
does work now. Below are the speed improvements (first pass, second
pass), using ccache 3.0pre1 on FreeBSD 8.0. 4cpu, 4G RAM:

--
 World build completed on Wed May 12 12:04:26 MDT 2010
--
real44m2.754s
user80m5.733s
sys 55m59.135s
--
 Kernel build for MOUZONE completed on Wed May 12 12:19:54 MDT 2010
--
real13m31.544s
user18m38.484s
sys 11m38.547s
--
 World build completed on Wed May 12 12:41:39 MDT 2010
--
real7m0.725s
user10m1.925s
sys 9m56.014s
--
 Kernel build for MOUZONE completed on Wed May 12 12:44:00 MDT 2010
--
real1m34.594s
user1m1.464s
sys 0m57.740s

(after two passes)
[r...@mouzone /usr/src]# ccache -s
cache directory /usr/.ccache
cache hit (direct)  1890
cache hit (preprocessed) 652
cache miss 27492
called for link  918
multiple source files  2
compile failed   300
preprocessor error   111
bad compiler arguments37
not a C/C++ file2284
autoconf compile/link   1547
unsupported compiler option4
no input file182
files in cache 27492
cache size 407.3 Mbytes
max cache size   1.0 Gbytes

Thank you for your help.

-- 
Christer Edwards
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] amd64 buildworld (FreeBSD 8.0p2) consistently fails with ccache

2010-05-10 Thread Joel Rosdahl
On 2010-05-10 03:24, Christer Edwards wrote:
 I've enabled logging and I would attach the logfile, but it is 12M
 total size. I've included the tail end, just leading up to the
 failure:
 [...]
 [78047] Running real compiler
 [78047] Compiler gave exit status 1
 
 This build had no CFLAGS or CXXFLAGS and exited at the same point.
 
 What other information can I provide?

The most important thing is to find out the exact command line used when
the compilation failed. Your build system doesn't seem to print that, so
I think you either should try to increase verbosity in some way or
upgrade to ccache 3.0pre1, which was just released. 3.0pre1 logs the
executed compiler commands to CCACHE_LOGFILE, so it would be enough to
get the log snippet of the failed compilation. Possibly, the compiled
source code could also be of interest.

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] amd64 buildworld (FreeBSD 8.0p2) consistently fails with ccache

2010-05-10 Thread Christer Edwards
On Mon, May 10, 2010 at 2:58 PM, Joel Rosdahl j...@rosdahl.net wrote:
 The most important thing is to find out the exact command line used when
 the compilation failed. Your build system doesn't seem to print that, so
 I think you either should try to increase verbosity in some way or
 upgrade to ccache 3.0pre1, which was just released. 3.0pre1 logs the
 executed compiler commands to CCACHE_LOGFILE, so it would be enough to
 get the log snippet of the failed compilation. Possibly, the compiled
 source code could also be of interest.

I just saw the release notes and I built a port for 3.0pre1. I'll give
it a try this evening and report back my findings.

-- 
Christer Edwards
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] amd64 buildworld (FreeBSD 8.0p2) consistently fails with ccache

2010-05-10 Thread Christer Edwards
On Mon, May 10, 2010 at 2:58 PM, Joel Rosdahl j...@rosdahl.net wrote:
 The most important thing is to find out the exact command line used when
 the compilation failed. Your build system doesn't seem to print that, so
 I think you either should try to increase verbosity in some way or
 upgrade to ccache 3.0pre1, which was just released. 3.0pre1 logs the
 executed compiler commands to CCACHE_LOGFILE, so it would be enough to
 get the log snippet of the failed compilation. Possibly, the compiled
 source code could also be of interest.

I've got another failure (same place) on 3.0pre1.Below are the details:

I executed 'ccache make buildworld' at /usr/src.

ccache related ENV values are:

CCACHE_DIR=/usr/.ccache
CCACHE_LOGFILE=/var/log/ccache.log

Below is the error output from the ccache.log (46M total, only pasting
the tail here):

[2010-05-10T17:30:38.824821 53291] === CCACHE STARTED
=
[2010-05-10T17:30:38.825491 53291] Hostname: mouzone.part.net
[2010-05-10T17:30:38.825542 53291] Cwd: /usr/obj/lib32/usr/src/lib/csu/i386-elf
[2010-05-10T17:30:38.825560 53291] Source file: /usr/src/lib/csu/i386-elf/crt1.c
[2010-05-10T17:30:38.825578 53291] Object file: crt1.o
[2010-05-10T17:30:38.825608 53291] Trying direct lookup
[2010-05-10T17:30:38.825853 53291] Looking for object file hash in
/usr/.ccache/b/b/d92cd3966f3aa0a8ba17e11308c7c9-2334.manifest
[2010-05-10T17:30:38.825950 53291] Did not find object file hash in manifest
[2010-05-10T17:30:38.825974 53291] Running preprocessor
[2010-05-10T17:30:38.827775 53292] Executing
/usr/obj/usr/src/tmp/usr/bin/cc -O2 -pipe
-I/usr/src/lib/csu/i386-elf/../common
-I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
-Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
-Wnested-externs -Wredundant-decls -Wno-pointer-sign -c -E
/usr/src/lib/csu/i386-elf/crt1.c
[2010-05-10T17:30:38.853494 53291] Got object file hash from preprocessor
[2010-05-10T17:30:38.853749 53291] Object file
/usr/.ccache/7/e/00e1bb753cccab0b3367e6287435a8-23935.o not in cache
[2010-05-10T17:30:38.853797 53291] Running real compiler
[2010-05-10T17:30:38.855228 53294] Executing
/usr/obj/usr/src/tmp/usr/bin/cc -O2 -pipe
-I/usr/src/lib/csu/i386-elf/../common
-I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
-Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
-Wnested-externs -Wredundant-decls -Wno-pointer-sign -c -o
/usr/.ccache/7/e/00e1bb753cccab0b3367e6287435a8-23935.o.tmp.mouzone.part.net.53291
/usr/.ccache/tmp/crt1.tmp.mouzone.part.net.53291.i
[2010-05-10T17:30:38.903089 53291] Compiler gave exit status 1
[2010-05-10T17:30:38.903377 53291] Copying
/usr/.ccache/7/e/00e1bb753cccab0b3367e6287435a8-23935.o.tmp.mouzone.part.net.53291
to crt1.o (uncompressed)
[2010-05-10T17:30:38.906771 53291] open error: No such file or directory

Please let me know what more I can provide..

-- 
Christer Edwards
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


[ccache] amd64 buildworld (FreeBSD 8.0p2) consistently fails with ccache

2010-05-09 Thread Christer Edwards
I've been testing the use of ccache on my FreeBSD machines and I've
found that 'make buildworld' will consistently fail when ccache is
activated on my amd64 machines, while it performs as expected on my
i386 machines. I have tested on both platforms with and without
compile options, such as -jX, CFLAGS and CXXFLAGS. With or without
these options on i386 it compiles successfully, but with or without
these options on amd64 it fails.

It appears that it fails at building lib32 related files but I'm not
familiar enough with buildworld or ccache to be sure. What more
information can I provide toward troubleshooting and hopefully
resolving this situation?

Cheers,

-- 
Christer Edwards
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] amd64 buildworld (FreeBSD 8.0p2) consistently fails with ccache

2010-05-09 Thread Christer Edwards
On Sun, May 9, 2010 at 11:17 AM, Joel Rosdahl j...@rosdahl.net wrote:
 That's strange. Which ccache version are you using? If you're using 2.4,
 please try 3.0pre0.

[r...@stringer /usr/src]# ccache -V
ccache version 3.0pre0

It just failed for me again. I did not turn on logging, but this is
where it failed, if this gives you any hints:

=== lib/csu/i386-elf (obj,depend,all,install)
rm -f .depend
CC='/usr/local/libexec/ccache/world-cc' mkdep -f .depend -a
-I/usr/src/lib/csu/i386-elf/../common
-I/usr/src/lib/csu/i386-elf/../../libc/include
/usr/src/lib/csu/i386-elf/crt1.c /usr/src/lib/csu/i386-elf/crti.S
/usr/src/lib/csu/i386-elf/crtn.S
/usr/local/libexec/ccache/world-cc -march=native -O2
-fno-strict-aliasing -pipe -I/usr/src/lib/csu/i386-elf/../common
-I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
-Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
-Wnested-externs -Wredundant-decls -Wno-pointer-sign -c
/usr/src/lib/csu/i386-elf/crt1.c
{standard input}: Assembler messages:
{standard input}:27: Error: suffix or operands invalid for `mov'
*** Error code 1

Stop in /usr/src/lib/csu/i386-elf.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

I can run it again with logging enabled if you need.

Ooh, and this build was using CFLAGS/CXXFLAGS. I can test again
without those if needed as well.

-- 
Christer Edwards
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] amd64 buildworld (FreeBSD 8.0p2) consistently fails with ccache

2010-05-09 Thread Christer Edwards
On Sun, May 9, 2010 at 11:17 AM, Joel Rosdahl j...@rosdahl.net wrote:
 You can enable debug logging by setting CCACHE_LOGFILE to a log file
 path and then send the log of a failed compilation here.

I've enabled logging and I would attach the logfile, but it is 12M
total size. I've included the tail end, just leading up to the
failure:

[78023] === 2010-05-09 14:54:37 ===
[78023] Base directory: /usr/obj/lib32/usr/src/gnu/lib/csu
[78023] Source file: /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c
[78023] Object file: crtend.So
[78023] Trying direct lookup
[78023] Looking for object file hash in
/usr/.ccache/7/d/95616197a1156b28cdd39a8047d5db-9623.manifest
[78023] Did not find object file hash in manifest
[78023] Running preprocessor
[78023] Got object file hash from preprocessor
[78023] Object file
/usr/.ccache/c/a/512e749085241d05f1a72bfb1fa910-77439.o not in cache
[78023] Running real compiler
[78023] Stored in cache: /usr/.ccache/c/a/512e749085241d05f1a72bfb1fa910-77439.o
[78023] Created crtend.So from
/usr/.ccache/c/a/512e749085241d05f1a72bfb1fa910-77439.o
[78023] Added object file hash to
/usr/.ccache/7/d/95616197a1156b28cdd39a8047d5db-9623.manifest
[78040] === 2010-05-09 14:54:37 ===
[78040] Base directory: /usr/obj/lib32/usr/src/lib/csu/i386-elf
[78040] Compiler option -E is unsupported
[78040] Failed; falling back to running the real compiler
[78047] === 2010-05-09 14:54:37 ===
[78047] Base directory: /usr/obj/lib32/usr/src/lib/csu/i386-elf
[78047] Source file: /usr/src/lib/csu/i386-elf/crt1.c
[78047] Object file: crt1.o
[78047] Trying direct lookup
[78047] Looking for object file hash in
/usr/.ccache/c/9/ea7ce3c6c0dcbf8e347e950e9ff6ea-1903.manifest
[78047] Did not find object file hash in manifest
[78047] Running preprocessor
[78047] Got object file hash from preprocessor
[78047] Object file
/usr/.ccache/f/a/86dcc9067c2597ce7a0dbd718899ac-23567.o not in cache
[78047] Running real compiler
[78047] Compiler gave exit status 1

This build had no CFLAGS or CXXFLAGS and exited at the same point.

What other information can I provide?

[r...@stringer /usr/src]# ccache -s
cache directory /usr/.ccache
cache hit (direct)   871
cache hit (preprocessed)1039
cache miss 30393
called for link 1342
multiple source files  5
compile failed 2
not a C/C++ file3316
no input file  2
files in cache 30393
cache size 107.8 Mbytes
max cache size   1.0 Gbytes

-- 
Christer Edwards
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache