JHBuild runtime error "Failed to close %s stream" (MacOS)

119 Views Asked by At

I started a JHBuild with the wrong arguments (forgot 'build') and hit control-C at what appears to have been the wrong moment.

Now when I try any JHBuild command, e.g. jhbuild bootstrap, I get:

Traceback (most recent call last):
  File "/Users/gnucashdev/Source/jhbuild/jhbuild/config.py", line 197, in load
    execfile(filename, config)
  File "/Users/gnucashdev/.jhbuildrc", line 408, in <module>
    execfile(_userrc)
  File "/Users/gnucashdev/.jhbuildrc-custom", line 22, in <module>
    setup_sdk()
  File "/Users/gnucashdev/.jhbuildrc", line 260, in setup_sdk
    gcc = _popen("xcrun -f gcc")
  File "/Users/gnucashdev/.jhbuildrc", line 41, in _popen
    raise RuntimeError, "Failed to close %s stream" % cmd_arg
RuntimeError: Failed to close xcrun -f gcc stream
jhbuild: could not load config file

I've tried re-installing jhbuild with

 ./gtk-osx-build-setup.sh 

but the next step - i.e.

jhbuild bootstrap

yields the above error. Some file appears to have been compromised, perhaps truncated. But I'm having a hard time figuring out which.

1

There are 1 best solutions below

0
On

I had the same error. xcrun is returning an error, probably due to an incorrect environment variable. In my case, I was running jhbuild while in a jhbuild shell, which caused the SDKDIR environment variable to contain 2 copies of the path to the SDK directory. Exiting the jhbuild shell fixed the problem.