b9org / b9

An educational JS virtual machine based on Eclipse OMR
http://www.base9.xyz
Apache License 2.0
45 stars 24 forks source link

ninja: error: loading 'build.ninja': No such file or directory (Linux 4.13.0-37-generic , ubuntu 16.04) #157

Closed atawre closed 6 years ago

atawre commented 6 years ago

The build steps given on front page give me following errors-

git clone --recursive https://github.com/b9org/b9.git cd Base9 git submodule update --init

ataware@peabody:~/b9/build$ cmake –GNinja –DCMAKE_BUILD_TYPE=Debug .. -- OMR: The CPU architecture is x86 -- OMR: The OS is linux -- OMR: The tool configuration is gnu -- Starting with CMake version 3.11.0-rc3 CMake Warning at third_party/omr/cmake/modules/OmrTracegen.cmake:31 (message): OMR: No trace root has been set. Defaulting to '/home/ataware/b9/build/third_party/omr' Call Stack (most recent call first): third_party/omr/CMakeLists.txt:37 (include)

-- SRC = /home/ataware/b9 Creating static library for jitbuilder jitbuilder_ROOT = /home/ataware/b9/third_party/omr/jitbuilder -- Set SPP defines to PROD_WITH_ASSUMES;JITTEST;LINUX;_FILE_OFFSET_BITS=64;J9HAMMER;UT_DIRECT_TRACE_REGISTRATION -- Set SPP defines to PROD_WITH_ASSUMES;JITTEST;LINUX;_FILE_OFFSET_BITS=64;J9HAMMER;UT_DIRECT_TRACE_REGISTRATION Made jitbuilder into a compiler target,for jitbuilder. Defines are PROD_WITH_ASSUMES;JITTEST and -DSUPPORTS_THREAD_LOCAL;-DLINUX;-DTR_HOST_X86;-DTR_TARGET_X86;-DTR_HOST_64BIT;-DTR_TARGET_64BIT, arch is x and amd64, compile options are -Wno-write-strings -- Configuring done -- Generating done -- Build files have been written to: /home/ataware/b9/build

ataware@peabody:~/b9/build$ ninja ninja: error: loading 'build.ninja': No such file or directory

youngar commented 6 years ago

Hi, when I copy and paste your command, I get the same error. Try deleting the command and manually typing it in. It could be an issue if you copied the command from a presentation or something, the - (U+002D) gets converted to a long – (U+2013) character, which is different.

youngar commented 6 years ago

It looks like the wrong dash character is baked into README.md.

youngar commented 6 years ago

Should be fixed now! Let me know if it works. Thanks for reporting!

atawre commented 6 years ago

Thanks for quick help. It did work. Here are last few messages from Ninja command -

[708/737] Building CXX object third_party/omr/jitbuilder/release/CMakeFiles/pow2.dir/src/Pow2.cpp.o ../third_party/omr/jitbuilder/release/src/Pow2.cpp: In function ‘int main(int, char**)’: ../third_party/omr/jitbuilder/release/src/Pow2.cpp:122:34: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int64_t {aka long int}’ [-Wformat=] printf("pow2(45) is %lld\n", r); ^ [734/737] Building CXX object b9disassemble/CMakeFiles/b9serializeTest.dir/testModule.cpp.o In file included from /usr/include/c++/5/backward/strstream:50:0, from ../b9disassemble/testModule.cpp:9: /usr/include/c++/5/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]

warning \

^ [737/737] Linking CXX executable third_party/omr/jitbuilder/release/worklist ataware@peabody:~/b9/build$ echo $? 0

This is probably a first step for me to look at what OMR is all about.

atawre commented 6 years ago

Also --

ataware@peabody:~/b9/build$ ./b9run/b9run test/hello.b9mod

AQUIRE EXCLUSIVE ACCESS NATIVE_STACK: 0x7f35120b0000 Scanning: 0x7f35120b0000 Marking: 0x7f35120b0000 (via 0x7f35120b0000) POISON @0x7f35120b0000[16]=1 RELEASE EXCLUSIVE ACCESS RootRef::~RootRef(this=0x7ffdec5aca50) AQUIRE EXCLUSIVE ACCESS NATIVE_STACK: 0x7f35120b0010 Scanning: 0x7f35120b0010 Marking: 0x7f35120b0000 (via 0x7f35120b0010) Scanning: 0x7f35120b0000 Marking: 0x7f35120b0000 (via 0x7f35120b0000) POISON @0x7f35120b0000[16]=1 POISON @0x7f35120b0010[16]=1 RELEASE EXCLUSIVE ACCESS RootRef::~RootRef(this=0x7ffdec5aca50) Hello World!

=> (integer 0)

youngar commented 6 years ago

The branch master currently prints a bunch of debug garbage collection information, which is the majority of what you're seeing. The output Hello world! and the return value of an (integer 0) is the important part, it looks like everything is working!

This is a great way to get started with OMR. Most of the presentation material we have here focuses on using the jitbuilder component of OMR. We are currently in the process of adding true javascript objects b9 using the OMR garbage collector, and the documentation and tutorials will hopefully come concurrently.