$topsrcdir/mozconfig interferes with JS shell builds

RESOLVED FIXED in Firefox 50

Status

defect
RESOLVED FIXED
3 years ago
Last year

People

(Reporter: Waldo, Assigned: glandium)

Tracking

unspecified
mozilla50
Dependency tree / graph

Firefox Tracking Flags

(firefox50 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

3 years ago
Problem doesn't happen with 8cef6292102420b8a144c2752ddd96c906b6c7be but does happen with a2e4369f86dcf620b453de3da6525a87ea1808fc.

mozconfig contents:
===================

. $topsrcdir/browser/config/mozconfig

export CC='ccache gcc'
export CXX='ccache g++'

#export LLVMCONFIG="/home/jwalden/Programs/clang-build/prefixdir/bin/llvm-config"
#ac_add_options --enable-clang-plugin

ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --enable-js-shell
ac_add_options --enable-valgrind
ac_add_options --enable-tests

mk_add_options AUTOCLOBBER=1

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/dbg


command used to build the JS shell, from $topsrcdir/js/src:
===========================================================

rm -rf dbg && \
  autoconf-2.13 && \
  mkdir dbg && \
  (cd dbg && \
   CC='ccache clang-tip' CXX='ccache clang++-tip' ../configure \
     --enable-debug --disable-optimize \
     --enable-readline --enable-valgrind && \
   BUILD_VERBOSE_LOG=1 make -s -j8)

Build error encountered:
========================

...
...
checking for valloc in unistd.h... no
checking for setlocale... yes
checking for localeconv... (cached) yes
updating cache ./config.cache
creating ./config.data
Creating config.status
Traceback (most recent call last):
  File "config.status", line 418, in <module>
    config_status(**args)
  File "/home/jwalden/moz/clean/python/mozbuild/mozbuild/config_status.py", line 135, in config_status
    emitter = TreeMetadataEmitter(env)
  File "/home/jwalden/moz/clean/python/mozbuild/mozbuild/frontend/emitter.py", line 116, in __init__
    mozinfo.find_and_update_from_json(config.topobjdir)
  File "/home/jwalden/moz/clean/testing/mozbase/mozinfo/mozinfo/mozinfo.py", line 213, in find_and_update_from_json
    build = MozbuildObject.from_environment()
  File "/home/jwalden/moz/clean/python/mozbuild/mozbuild/base.py", line 184, in from_environment
    if not samepath(topobjdir, _config_topobjdir):
  File "/home/jwalden/moz/clean/python/mozbuild/mozbuild/base.py", line 46, in samepath
    return os.path.samefile(path1, path2)
  File "/home/jwalden/moz/clean/js/src/dbg/_virtualenv/lib64/python2.7/posixpath.py", line 156, in samefile
    s2 = os.stat(f2)
OSError: [Errno 2] No such file or directory: '/home/jwalden/moz/clean/dbg'
Assignee

Updated

3 years ago
Duplicate of this bug: 1283606
Assignee

Updated

3 years ago
Assignee: nobody → mh+mozilla
Assignee

Comment 2

3 years ago
The mozconfig detection logic has bitten us on many occasions in the
past. The following changes are made to tentatively improve the
situation:

- The API is modified such that autodetection of the mozconfig has
  to be a conscious decision made by the caller, and not triggered
  any time there is no mozconfig given, which could be a conscious
  decision of the opposite.

- mozinfo.json now stores the actual mozconfig (or lack thereof) used
  during configure.

Review commit: https://reviewboard.mozilla.org/r/63012/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/63012/
Attachment #8769038 - Flags: review?(gps)
Attachment #8769038 - Flags: review?(gps) → review+
Comment on attachment 8769038 [details]
Bug 1283052 - Remove some of the magic around mozconfig detection.

https://reviewboard.mozilla.org/r/63012/#review59930

Changes to this code always make me nervous. But this looks right.

Comment 4

3 years ago
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/764dfcab17e9
Remove some of the magic around mozconfig detection. r=gps

Comment 5

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/764dfcab17e9
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.