Closed Bug 1520232 Opened 5 years ago Closed 5 years ago

Changing CC/CXX without clobbering can cause old-configure to fail using cached values

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
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).

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.

Keywords: in-triage
Assignee: nobody → mh+mozilla
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/3b0293ddc8ea
Preset some of the autoconf config.cache values from python configure. r=froydnj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

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 :(

Blocks: 1523851
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: