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

Cannot compile due to TypeError: ('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())

Open muelli opened this issue 9 years ago • 5 comments

Weird error, maybe not related to this project at all, but an emscripten bug:

emcc -O2 test.c .libs/libgmp.a -o complete.js -s ASM_JS=1 -g --llvm-lto 1
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 389, in _handle_results
    task = get()
TypeError: ('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())
>emcc --version
emcc (Emscripten GCC-like replacement) 1.22.1 ()
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
This is free and open source software under the MIT license.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

muelli avatar Jul 14 '15 15:07 muelli

I get the same error. I am trying to compile an openframeworks app via emscripten on linux/lubuntu 16.04. They have incorporated emscripten. The core dev team has never seen this error before. It happens while linking

Linking bin/3DPrimitivesExample.html for emscripten
/usr/share/emscripten/em++ -o bin/3DPrimitivesExample.html -O3 -s OUTLINING_LIMIT=100000 -s TOTAL_MEMORY=134217728 --memory-init-file 1  obj/emscripten/Release/src/ofApp.o obj/emscripten/Release/src/main.o /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxAppEmscriptenWindow.o /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenVideoPlayer.o /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenVideoGrabber.o /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenSoundPlayer.o /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenSoundStream.o /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/addons/obj/emscripten/Release/ofxEmscripten/src/ofxEmscriptenURLFileLoader.o /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.bc   -Wl,--as-needed -Wl,--gc-sections --preload-file bin/data@data --emrun --js-library /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/addons/ofxEmscripten/libs/html5video/lib/emscripten/library_html5video.js --js-library /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/addons/ofxEmscripten/libs/html5audio/lib/emscripten/library_html5audio.js --shell-file /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/libs/openFrameworksCompiled/project/emscripten/template.html /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/libs/FreeImage/lib/emscripten/libfreeimage.a /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/libs/boost/lib/emscripten/libboost_filesystem.a /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/libs/boost/lib/emscripten/libboost_system.a /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/libs/tess2/lib/emscripten/libtess2.a    /home/michaelsaup/Desktop/OF_LINUX_2017/of_v0.9.8_linux64_release/libs/freetype/lib/emscripten/libfreetype.bc 
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 389, in _handle_results
    task = get()
TypeError: ('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())

^CTraceback (most recent call last):
  File "/usr/share/emscripten/em++", line 11, in <module>
Traceback (most recent call last):
  File "/usr/bin/emmake", line 26, in <module>
    exit(subprocess.call([shared.PYTHON, shared.EMCC] + sys.argv[1:]))
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    shared.Building.make(sys.argv[1:])
  File "/usr/share/emscripten/tools/shared.py", line 1075, in make
Process PoolWorker-2:
Traceback (most recent call last):
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
Process PoolWorker-1:
Traceback (most recent call last):
    process.communicate()
  File "/usr/lib/python2.7/subprocess.py", line 797, in communicate
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    self.wait()
  File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    return func(*args)
    self._target(*self._args, **self._kwargs)
    self.run()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
KeyboardInterrupt  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run

    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    task = get()
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 376, in get
    return func(*args)
    task = get()
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 378, in get
KeyboardInterrupt
    racquire()
    return recv()
KeyboardInterrupt
KeyboardInterrupt
Process PoolWorker-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
    task = get()
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 376, in get
    racquire()
KeyboardInterrupt

any hints how I could proceed? is there a version of emscripten rather to compile with python3? thx

johanjohan avatar Feb 24 '17 16:02 johanjohan

@muelli could you ever solve the issue?

johanjohan avatar Feb 24 '17 16:02 johanjohan

Encountering the same issue using Linux subsystem for Windows having followed the WASM Developer Guide. Installed + activated latest. emcc version 1.22.1

Anybody have a fix for this?

isaac-lapworth avatar Aug 08 '18 20:08 isaac-lapworth

1.22.1 is fairly old - from 2014. Current version is 1.38.11. Perhaps there is an older version in your path, or it failed to update?

kripken avatar Aug 08 '18 20:08 kripken

Thanks for the help. I tried a fresh install after disabling and re-enabling Linux Subsystem for Windows (Ubuntu 16.04). Version 1.38.11 was picked up fine and I could compile a test C++ file to WebAssembly that ran in the browser ok.


However, something to note if others on Windows 10 have this error (although this is probably just an issue with my Ubuntu install):

I noticed that upon closing the LSW window and opening another, the emcc version on my path had reverted to version 1.22.1. Rerunning

source ./emsdk_env.sh --build=Release

from where I cloned Emscripten SDK repo solved this (can add this to a compilation script).

isaac-lapworth avatar Aug 09 '18 00:08 isaac-lapworth