Changing CC/CXX without clobbering can cause old-configure to fail using cached values
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox67 fixed)
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: ted, Assigned: glandium)
References
Details
(Keywords: in-triage)
Attachments
(1 file)
Alex hit this issue today and we debugged it on #build. He added CC/CXX to his mozconfig to use the toolchain clang from ~/.mozbuild instead of system clang and then configure failed:
0:03.77 checking for gcc... (cached) /usr/lib64/ccache/clang -std=gnu99
0:03.79 checking whether the C compiler (/usr/lib64/ccache/clang -std=gnu99 -fuse-ld=lld) works... no
0:03.79 configure: error: installation or configuration problem: C compiler cannot create executables.
His config.log shows that toolchain.configure decided to use lld with the toolchain clang:
684 INFO: checking for linker...
685 DEBUG: Executing: `/home/achronop/.mozbuild/clang/bin/clang -std=gnu99 -Wl,--version`
686 DEBUG: Executing: `/home/achronop/.mozbuild/clang/bin/clang -std=gnu99 -fuse-ld=lld -Wl,--version`
687 INFO: lld
...but then old-configure pulled the value of CC
from config.cache and failed because his system clang cannot use lld. He was able to get around this problem by removing config.cache (clobbering would also have fixed this).
Assignee | ||
Comment 1•6 years ago
|
||
What I've been wanting to do for a while is to set the config.cache variables corresponding to the autoconf compiler tests from python configure, so that autoconf wouldn't even need to check anything ever, even after a clobber.
Something like add_old_configure_assignment('ac_cv_prog_CC', ...), etc.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
Comment 4•6 years ago
|
||
bugherder |
Assignee | ||
Comment 5•6 years ago
|
||
Sadly, autoconf doesn't actually use the ac_cv_prog_cc_works value as cache, so this isn't going to help reduce the amount of intermittents from bug 1403607 happening :(
Description
•