Closed Bug 1624740 Opened 4 years ago Closed 4 years ago

TypeError: 'unicode' does not have the buffer interface when a mozconfig is updated

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: mgaudet, Assigned: rstewart)

Details

Attachments

(1 file)

I've been playing around with mozconfigs, and when I updated my mozconfig file then tried mach build again, I got the following output:

~/unified$ ./mach build
 /home/matthew/unified/obj-opt-x86_64-pc-linux-gnu/config.status is out of date with respect to /home/matthew/unified/obj-opt-x86_64-pc-linux-gnu/.mozconfig.json
Error running mach:

    ['build']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

TypeError: 'unicode' does not have the buffer interface

  File "/home/matthew/unified/python/mozbuild/mozbuild/build_commands.py", line 138, in build
    append_env=append_env)
  File "/home/matthew/unified/python/mozbuild/mozbuild/controller/building.py", line 1070, in build
    clobber_requested = self._clobber_configure()
  File "/home/matthew/unified/python/mozbuild/mozbuild/controller/building.py", line 1405, in _clobber_configure
    clobber_output)
  File "/home/matthew/unified/python/mozbuild/mozbuild/controller/clobber.py", line 187, in maybe_do_clobber
    print('Clobber not needed.', file=fh)

MOZCONFIG is this:

ac_add_options --enable-application=js

ac_add_options --enable-optimize
ac_add_options --disable-debug

ac_add_options --enable-smoosh
ac_add_options --enable-tests
ac_add_options --enable-binast

# Dump opt builds into another dir. 
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-opt-@CONFIG_GUESS@

I just reordered the options.

This is a local stack, built atop 01b9bdb6e5ef

I can't reproduce this, but the code is obviously wrong. If you patch this revision in does it fix your problem?

Flags: needinfo?(mgaudet)

Of course, now that I try to reproduce I also cannot. I'm not sure why. It seemed to do the trick yesterday?

I'll see if it reproduces at some point again, and if it does, I'll try your patch.

Assignee: nobody → rstewart
Status: NEW → ASSIGNED
Flags: needinfo?(mgaudet)

Just reproduced again this morning. No idea why. But! Good news: Applying the patch on this bug fixed it. \o/

Pushed by rstewart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/37445084f5f8
Use io.StringIO instead of io.BytesIO to capture text in building.py r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: