Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on building js file, need linux requirements packages #19

Closed
bramaudi opened this issue Jun 28, 2021 · 3 comments
Closed

Error on building js file, need linux requirements packages #19

bramaudi opened this issue Jun 28, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@bramaudi
Copy link

Hi, so i just want to try build (just build hello.js --clean --static) with my linux machine (ElementaryOS Hera) and got error like this:

...
deps/v8/include/v8-platform.h
deps/v8/include/v8-value-serializer-version.h
deps/v8/include/OWNERS
deps/v8/include/js_protocol.pdl
deps/v8/include/v8-wasm-trap-handler-posix.h
rm -f v8lib-0.0.22.tar.gz
g++ -c -fno-exceptions -ffunction-sections -fdata-sections  -DJUST_VERSION='"0.0.22"' -std=c++17 -DV8_COMPRESS_POINTERS -I. -I./deps/v8/include -O3 -march=native -mtune=native -Wpedantic -Wall -Wextra -flto -Wno-unused-parameter just.cc
g++ -c -fno-exceptions -ffunction-sections -fdata-sections  -std=c++17 -DV8_COMPRESS_POINTERS -I. -I./deps/v8/include -O3 -march=native -mtune=native -Wpedantic -Wall -Wextra -flto -Wno-unused-parameter main.cc
g++ -s -static -flto -pthread -m64 -Wl,--start-group deps/v8/libv8_monolith.a main.o just.o builtins.o modules/sys/sys.o modules/fs/fs.o modules/net/net.o modules/vm/vm.o modules/epoll/epoll.o -Wl,--end-group -Wl,--gc-sections  -ldl -lrt -o hello
g++: error: modules/sys/sys.o: No such file or directory
g++: error: modules/fs/fs.o: No such file or directory
g++: error: modules/net/net.o: No such file or directory
g++: error: modules/vm/vm.o: No such file or directory
g++: error: modules/epoll/epoll.o: No such file or directory
Makefile:85: recipe for target 'main-static' failed
make: *** [main-static] Error 1
failed in 319.41 sec

I really dont have experience with c/c++ or something related but i tought the problem is some lib/package are missing & not installed on my machine. Thanks.

@billywhizz
Copy link
Contributor

billywhizz commented Jun 29, 2021

hi. the error seems to be happening earlier - module library files are missing so linker is failing.

can you try

just build hello.js --clean --cleanall

and if that works then try

just build hello.js --clean --cleanall --static

and if you have errors, post the whole log? thx.

the compiler is very much a PoC at the moment. lots of bugs on no tests!

@bramaudi
Copy link
Author

bramaudi commented Jul 1, 2021

Thanks for the solution and sorry for late reply, the both commands was successfully build with no error, but the executable produced from hello.js return undefined in here, but simple program like print string is perfectly work fine.

@billywhizz billywhizz added the bug Something isn't working label Jul 1, 2021
@billywhizz
Copy link
Contributor

closing this as these issues should be resolved in upcoming 0.1.2 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants