webkit.js icon indicating copy to clipboard operation
webkit.js copied to clipboard

Running ./config.sh breaks on Kubuntu/Arch: UnboundLocalError: local variable 'cflags_c' referenced before assignment

Open selbyk opened this issue 10 years ago • 8 comments

$ git remote add selby ./config.sh 
Building Ninja files.
Traceback (most recent call last):
  File "./tools/gyp-emscripten/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
  File "./tools/gyp-emscripten/pylib/gyp/__init__.py", line 534, in script_main
    return main(sys.argv[1:])
  File "./tools/gyp-emscripten/pylib/gyp/__init__.py", line 527, in main
    return gyp_main(args)
  File "./tools/gyp-emscripten/pylib/gyp/__init__.py", line 512, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "./tools/gyp-emscripten/pylib/gyp/generator/ninja.py", line 2204, in GenerateOutput
    pool.map(CallGenerateOutputForConfig, arglists)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 251, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 558, in get
    raise self._value
UnboundLocalError: local variable 'cflags_c' referenced before assignment
Failed to configure webkit.js properly.

selbyk avatar Jan 28 '15 04:01 selbyk

$ ./config.sh 
Building Ninja files.
webkit.js project files successfully configured and built.

Fixed with https://github.com/selbyk/webkit.js/commit/a1491e043a2df8e36a6ae5c94af223266f60954e

It seems very hacky, but I couldn't find out much about how I should go about setting the var on my system and wasn't sure how to add it to a config file.

What do you think, @trevorlinton?

selbyk avatar Jan 28 '15 04:01 selbyk

I'm actually starting to believe this needs to be set to something other than an empty array and that'll solve the other problem too. Still not sure what it is, though. Maybe a clone of cflags_cc?

selbyk avatar Jan 29 '15 22:01 selbyk

Not entirely sure why I am receiving these emails. Any possible clarification?

On Thu, Jan 29, 2015 at 11:55 PM, Selby Kendrick [email protected] wrote:

I'm actually starting to believe this needs to be set to something other than an empty array and that'll solve the other problem too. Still not sure what it is, though. Maybe a clone of cflags_cc?

— Reply to this email directly or view it on GitHub https://github.com/trevorlinton/webkit.js/issues/34#issuecomment-72121449 .

JuxhinDB avatar Jan 29 '15 22:01 JuxhinDB

@JDBStudio your guess is as good as ours...

trevorlinton avatar Jan 30 '15 04:01 trevorlinton

@selbyk All of this entirely is very hacky, most engineering is just that. A) get it working; B) get it working right, C) get it working the right way.

Hardly will you ever know what C is without going through A / B. Go ahead and submit a pull request into the main webkit.js repo, i reconfirmed its building from scratch and pushed a few new commits up this evening, hopefully we can get this rolling soon.

trevorlinton avatar Jan 30 '15 04:01 trevorlinton

Well whatever it is. I do wish you all best of luck tackling it On 30 Jan 2015 05:46, "Trevor Linton" [email protected] wrote:

@selbyk https://github.com/selbyk All of this entirely is very hacky, most engineering is just that. A) get it working; B) get it working right, C) get it working the right way.

Hardly will you ever know what C is without going through A / B. Go ahead and submit a pull request into the main webkit.js repo, i reconfirmed its building from scratch and pushed a few new commits up this evening, hopefully we can get this rolling soon.

— Reply to this email directly or view it on GitHub https://github.com/trevorlinton/webkit.js/issues/34#issuecomment-72153680 .

JuxhinDB avatar Jan 30 '15 08:01 JuxhinDB

@selbyk Hi Selbyk, I have got the same problem with you. Have you solve this problem? Could you please share your solution with me? Think you very much!

zhrm0110 avatar Jun 29 '16 06:06 zhrm0110

try to add 'cflags_c':'-m32',

to common.gypi

before each cflags_cc

derofim avatar Mar 10 '19 09:03 derofim