revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.06k stars 196 forks source link

esy x Examples fails on Windows 10 with error Permission denied #1000

Closed vhanla closed 3 years ago

vhanla commented 3 years ago

Followed all instructions in Elevated Powershell console host

Everything went fine after esy build (23 warnings though) but esy x Examples throws error:

esy: exiting due to errors above


- Expected Result:
Build the example and launch.
- Additional Information:
I even restarted Windows and make sure no other applications are running (uncommon ones like from autorun).
- Search terms used:

<!-- Please include the search terms you used when searching the issue tracker. This will make it easier for others to find! -->

- Maybe useful:
I **also** deleted `_esy` directory and built again, and it built without errors, only the 23 warnings.
BTW, Oni2 was compiled correctly (if it somehow is relevant) (after almost 8 hours).

C:\Users\joe\projects\revery $[11:58:52]λ esy install info install 0.6.6 (using package.json) .... fetching @opam/ocaml-lsp-server@github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#38bd51a15c98b4f6ff841e5c914a8cdacee15e info fetching: done .... installing @opam/ocaml-lsp-server@github:ocaml/ocaml-lsp:ocaml-lsp-server.opam#38bd51a15c98b4f6ff841e5c914a8cdacee1 info installing: done C:\Users\joe\projects\revery $[11:59:01]λ esy build info esy build 0.6.6 (using package.json)  discover packages/reason-sdl2/src/c_flags.sexp,packages/reason-sdl2/src/c_library_flags.sexp,packages/reason-sdl2/src/cxxflags.sexp,packages/reason-sdl2/src/flags.sexp SDL2 Library Folder Path: C:/Users/joe/.esy/3/i/esysdl2-2.0.10008-fa9c6bd0/lib ANGLE Library Path: C:/Users/joe/.esy/3/i/esy_angle_prebuilt-1.0.0-9cb65ca1/lib x86_64-w64-mingw32-gcc packages/reason-skia/src/wrapped/lib/raw_bindings.o cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C x86_64-w64-mingw32-gcc packages/reason-skia/src/wrapped/c/c_stubs.o cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C c_stubs.c: In function 'reason_skia_make_sdl2_gl_interface': c_stubs.c:30:53: warning: passing argument 2 of 'gr_glinterface_assemble_gl_interface' from incompatible pointer type [-Wincompatible-pointer-types] gr_glinterface_assemble_gl_interface(0, reason_skia_sdl2_get); ^~~~~~~~ In file included from c_stubs.h:1:0, from cstubs.c:6: C:/Users/joe/.esy/3/i/esy_skia-d7475a4d/include/c/gr_context.h:40:34: note: expected 'gr_gl_get_proc {aka void ( ()(void , const char ))(void)}' but argument is of type 'void ()(void , const char )' SK_C_API const gr_glinterface_t gr_glinterface_assemble_gl_interface(void ctx, gr_gl_get_proc get); ^~~~~~~~ c_stubs.c:30:13: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] gr_glinterface_assemble_gl_interface(0, reason_skia_sdl2_get); ^~~~~~~~ c_stubs.c: In function 'reason_skia_make_sdl2_gles_interface': c_stubs.c:36:55: warning: passing argument 2 of 'gr_glinterface_assemble_gles_interface' from incompatible pointer type [-Wincompatible-pointer-types] gr_glinterface_assemble_gles_interface(0, reason_skia_sdl2_get); ^~~~~~~~ In file included from c_stubs.h:1:0, from cstubs.c:6: C:/Users/joe/.esy/3/i/esy_skia-d7475a4d/include/c/gr_context.h:41:34: note: expected 'gr_gl_get_proc {aka void ( ()(void , const char ))(void)}' but argument is of type 'void ()(void , const char )' SK_C_API const gr_glinterface_t gr_glinterface_assemble_gles_interface(void ctx, gr_gl_get_proc get); ^~~~~~~~~~ c_stubs.c:36:13: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] gr_glinterface_assemble_gles_interface(0, reason_skia_sdl2_get); ^~~~~~~~~~ cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C x86_64-w64-mingw32-gcc packages/reason-skia/src/wrapped/stubgen/ml_types_stubgen.exe cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C  ocamlc packages/reason-skia/src/wrapped/bindings/.SkiaWrappedBindings.objs/byte/skiaWrappedBindingsSkia_generated_type_stubs.{cmi,cmo,cmt} File "packages/reason-skia/src/wrapped/bindings/skia_generated_type_stubs.ml", line 91, characters 4-63: 91 | | Struct ({ tag = "sk_fontmetrics_t"} as s'), "fMaxCharWidth" -> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 11: this match case is unused. File "packages/reason-skia/src/wrapped/bindings/skia_generated_type_stubs.ml", line 94, characters 4-63: 94 | | Struct ({ tag = "sk_fontmetrics_t"} as s'), "fAvgCharWidth" -> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 11: this match case is unused. File "packages/reason-skia/src/wrapped/bindings/skia_generated_type_stubs.ml", line 155, characters 4-78: 155 | | Ctypes_static.Primitive Cstubs_internals.Int64_t, "RGB_V_SK_PIXELGEOMETRY" -> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 11: this match case is unused.  ocamlopt packages/reason-skia/src/wrapped/bindings/.SkiaWrappedBindings.objs/native/skiaWrappedBindingsSkia_generated_type_stubs.{cmx,o} File "packages/reason-skia/src/wrapped/bindings/skia_generated_type_stubs.ml", line 91, characters 4-63: 91 | | Struct ({ tag = "sk_fontmetrics_t"} as s'), "fMaxCharWidth" -> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 11: this match case is unused. File "packages/reason-skia/src/wrapped/bindings/skia_generated_type_stubs.ml", line 94, characters 4-63: 94 | | Struct ({ tag = "sk_fontmetrics_t"} as s'), "fAvgCharWidth" -> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 11: this match case is unused. File "packages/reason-skia/src/wrapped/bindings/skia_generated_type_stubs.ml", line 155, characters 4-78: 155 | | Ctypes_static.Primitive Cstubs_internals.Int64_t, "RGB_V_SK_PIXELGEOMETRY" -> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Warning 11: this match case is unused.  ocamlc packages/reason-skia/src/wrapped/lib/.SkiaWrapped.objs/byte/skiaWrappedSkia_generated_stubs.{cmi,cmo,cmt} File "packages/reason-skia/src/wrapped/lib/skia_generatedstubs.ml", lines 1600-1601, characters 2-26: 1600 | ..Function (CI.Pointer , Returns (CI.Primitive CI.Bool)), 1601 | "sk_paint_is_autohinted"... Warning 11: this match case is unused.  ocamlopt packages/reason-skia/src/wrapped/lib/.SkiaWrapped.objs/native/skiaWrappedSkia_generated_stubs.{cmx,o} File "packages/reason-skia/src/wrapped/lib/skia_generatedstubs.ml", lines 1600-1601, characters 2-26: 1600 | ..Function (CI.Pointer , Returns (CI.Primitive CI.Bool)), 1601 | "sk_paint_is_autohinted"... Warning 11: this match case is unused. x86_64-w64-mingw32-gcc packages/reason-skia/src/wrapped/lib/skia_generated_stubs.o cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C skia_generated_stubs.c: In function 'skia_wrapped_stub_6_sk_data_get_data': skia_generated_stubs.c:66:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] } ^ skia_generated_stubs.c: In function 'skia_wrapped_stub_9_sk_string_get_c_str': skia_generated_stubs.c:85:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] return CTYPES_FROM_PTR(x47); ^~~~~ skia_generated_stubs.c: In function 'skia_wrapped_stub_21_sk_typeface_open_stream': skia_generated_stubs.c:164:23: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] value x92, ^ skia_generated_stubs.c: In function 'skia_wrapped_stub_25_sk_fontmgr_match_family_style_character': skia_generated_stubs.c:202:62: warning: passing argument 4 of 'sk_fontmgr_match_family_style_character' from incompatible pointer type [-Wincompatible-pointer-types] x119, ^ In file included from skia_generatedstubs.c:25:0: C:/Users/joe/.esy/3/i/esy_skia-d7475a4d/include/c/sk_typeface.h:49:25: note: expected 'const char ' but argument is of type 'char ' SK_C_API sk_typeface_t sk_fontmgr_match_family_style_character(sk_fontmgr_t, const char familyName, sk_fontstyle_t style, const char* bcp47, int bcp47Count, int32_t character); ^~~~~~~~~~~ skia_generated_stubs.c: In function 'skia_wrapped_stub_124_gr_glinterface_create_native_interface': skia_generated_stubs.c:1159:30: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] gr_glinterface_t x1048 = CTYPES_ADDR_OF_FATPTR(x1047); ^~~~~~~~~~ skia_generated_stubs.c: In function 'skia_wrapped_stub_164_sk_surface_get_props': skia_generated_stubs.c:1588:31: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] Done: 2582/2586 (jobs: 1)

Et7f3 commented 3 years ago

A new esy is released. Can you download it ? And retest.

vhanla commented 3 years ago

I uninstalled esy and reinstalled 0.6.7, and there is no difference.

vhanla commented 3 years ago

Using npm run run it mentioned I had to install '@examples' 
so esy '@examples' install was required before running esy x Examples which still throwed the same error unless it is run as esy '@examples' x Examples  

[EDITED] ' apostrophe symbol is mandatory, otherwise it will still fail with permission denied error message throwing.