Skip to content

Build Error #48

Description

@arasouli91

I ran emmake make, as suggested by the README, but I got an error. I guess it has to do with libpng. So, I installed libpng with: sudo apt-get install libpng-dev. But, I still got this error.

make: pkg-config: Command not found
make: pkg-config: Command not found
make: pkg-config: Command not found
.../emsdk/emscripten/1.37.37/em++.py -c -std=gnu++11  -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK -DNDEBUG -O2 -ftree-vectorize -g0 -Wall -fPIC -o image/image-png.o image/image-png.cpp
image/image-png.cpp:18:10: fatal error: 'png.h' file not found
#include <png.h>
         ^~~~~~~
1 error generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
Makefile:41: recipe for target 'image/image-png.o' failed
make: *** [image/image-png.o] Error 1

I ran emmake make -f Makefile-emscript, and it fails with this error:

Traceback (most recent call last):
  File ".../emsdk/emscripten/1.37.37/em++", line 15, in <module>
    python_selector.run(emcc, profile=True)
  File ".../emsdk/emscripten/1.37.37/tools/python_selector.py", line 38, in run
    sys.exit(run_by_import(filename, main) if on_allowed_version() else run_by_subprocess(filename))
  File ".../emsdk/emscripten/1.37.37/tools/python_selector.py", line 13, in run_by_import
    return getattr(importlib.import_module(os.path.basename(filename)), main)()
  File ".../emsdk/emscripten/1.37.37/emcc.py", line 1864, in run
    optimizer.flush()
  File ".../emsdk/emscripten/1.37.37/emcc.py", line 241, in flush
    self.run_passes(chunks[0], title, just_split=False, just_concat=False)
  File ".../emsdk/emscripten/1.37.37/emcc.py", line 276, in run_passes
    output_filename=self.in_temp(os.path.basename(final) + '.jsopted.js'))
  File ".../emsdk/emscripten/1.37.37/tools/shared.py", line 2079, in js_optimizer
    ret = js_optimizer.run(filename, passes, NODE_JS, debug, extra_info, just_split, just_concat)
  File ".../emsdk/emscripten/1.37.37/tools/js_optimizer.py", line 557, in run
    return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))
  File ".../emsdk/emscripten/1.37.37/tools/tempfiles.py", line 93, in run_and_clean
    return func()
  File ".../emsdk/emscripten/1.37.37/tools/js_optimizer.py", line 557, in <lambda>
    return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))
  File ".../emsdk/emscripten/1.37.37/tools/js_optimizer.py", line 492, in run_on_js
    cld = shared.Building.closure_compiler(cld, pretty='minifyWhitespace' not in passes)
  File ".../emsdk/emscripten/1.37.37/tools/shared.py", line 2211, in closure_compiler
    raise Exception('closure compiler error: ' + process.stdout + ' (rc: %d)' % process.returncode)
Exception: closure compiler error: .../emsdk/emscripten/1.37.37/third_party/closure-compiler/node-externs/domain.js:67: WARNING - Bad type annotation. type not recognized due to syntax error. See https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation for more information.
 * @param {function(...[*])} callback
                       ^

.../emsdk/emscripten/1.37.37/third_party/closure-compiler/node-externs/domain.js:68: WARNING - Bad type annotation. type not recognized due to syntax error. See https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation for more information.
 * @return {function(...[*])}
                        ^

.../emsdk/emscripten/1.37.37/third_party/closure-compiler/node-externs/domain.js:73: WARNING - Bad type annotation. type not recognized due to syntax error. See https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation for more information.
 * @param {function(...[*])} callback
                       ^

.../emsdk/emscripten/1.37.37/third_party/closure-compiler/node-externs/domain.js:74: WARNING - Bad type annotation. type not recognized due to syntax error. See https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation for more information.
 * @return {function(...[*])}
                        ^

/tmp/tmp_I1XS8.cl.js:4323: ERROR - variable PolyFlif is undeclared
            var pf = new PolyFlif({"buf": content, "canvas": elem});
                         ^^^^^^^^

1 error(s), 4 warning(s)
 (rc: 1)
Makefile-emscript:49: recipe for target 'em-out/flif.html' failed
make: *** [em-out/flif.html] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions