Windows 10 - ninja: error: loading 'build.ninja' : No

AliceB
Posts: 12
Joined: Wed Apr 04, 2018 9:36 am

Windows 10 - ninja: error: loading 'build.ninja' : No

Post by AliceB »

Good afternoon !

Thank you in advance for your attention, it is the first time I have to compile a software and I have some difficulties:

- I have followed the steps of the Build Instructions until Windows compilation
- Here come problems: when I launch build.cmd, I get:

Building sdk
Build type is set to: Release.
Visual Studio 2017 detection skipped as requested
Visual Studio 2015 detection skipped as requested
VStools: , VSCMake: Visual Studio 12 2013.
Compiler is: Visual Studio 12 2013
ninja: error: loading 'build.ninja' : No such file or directory
An error occured during buildong process
" "
Error while building "Release SDK" and the window closes

I have looked for ninja on internet but I don't really get the point between all these build methods.
At each step my computer misses something... I might have downloaded Visual Studio without all the necessary options ?

I have also tried to follow the steps to get an IDE build with Visual Studio but I don't understand how to generate Visual Studio .sln for both Debug and Release builds by running build --vsbuild-all option (as build.cmd doesn't work)

Thank you very much for your attention (I need it !)
Alice

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by jtlindgren »

Hello Alice, it looks like you have skipped the dependency install step? That should bring Ninja to be under the folder dependencies/.

Cheers,
Jussi

AliceB
Posts: 12
Joined: Wed Apr 04, 2018 9:36 am

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by AliceB »

Hello,

Thank you for your answer !

But I have installed the dependencies well and I have just checked my dependencies folder: the application ninja is in the ninja folder well.

Best,
Alice

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by jtlindgren »

It that case its likely cmake does not generate the build.ninja file, though I don't know why. Here's what I suggest.

- Delete folders build/ and dist/
- Open windows command prompt CMD
- CD to the root of the source code
- Run "build.cmd >log.txt"

and paste the created log here. Maybe it'll tell something useful.


Best,
Jussi

AliceB
Posts: 12
Joined: Wed Apr 04, 2018 9:36 am

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by AliceB »

Here is what I get:

C:\work\openvibe>build.cmd >log.txt
CMake Error at CMakeLists.txt:8 (PROJECT):
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:8 (PROJECT):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

Thanks,
Alice

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by jtlindgren »

The build seems to work for me on Windows 10 using the 2.0.1 openvibe source archive. In command prompt simply

Code: Select all

> install_dependencies.cmd
> build.cmd
I'm interested in the contents of "log.txt" file it created for you. Whats in that one?


Thanks,
Jussi

AliceB
Posts: 12
Joined: Wed Apr 04, 2018 9:36 am

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by AliceB »

Here is my log.text:

Building sdk
Build type is set to: Release.
Visual Studio 2017 detection skipped as requested
Visual Studio 2015 detection skipped as requested
VStools: , VSCMake: Visual Studio 12 2013.
Compiler is: Visual Studio 12 2013
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Configuring incomplete, errors occurred!
See also "C:/work/openvibe/build/sdk-Release/CMakeFiles/CMakeOutput.log".
See also "C:/work/openvibe/build/sdk-Release/CMakeFiles/CMakeError.log".
An error occured during building process
""
Error while building "Release SDK"

Thanks,
Alice

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by jtlindgren »

It looks like something is funky with your Visual Studio install in that case. Which version is it exactly?

Edit: it should print something like

VStools: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\, VSCMake: Visual Studio 12 2013.

For you, it prints an empty string before the comma.


Cheers,
Jussi

AliceB
Posts: 12
Joined: Wed Apr 04, 2018 9:36 am

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by AliceB »

I installed Visual Studio Community 2017 but I didn't know which workloads or options were necessary for Openvibe.

I added Visual Studio Build Tools and other options but sincerely it was quite random, I didn't find any CMake option.

Thank you for your patience,
Alice

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by jtlindgren »

That is very likely the problem. You need to have Visual Studio 2013 Express or Professional installed. You might get it to work with 2013 Community instead, but people have reported having trouble. I wouldn't recommend it unless you're an experienced programmer. We have no plans presently to get it to work on VS 2017.

Best,
Jussi

AliceB
Posts: 12
Joined: Wed Apr 04, 2018 9:36 am

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by AliceB »

Indeed it works with Visual Studio Express 2013 thank you !!!!

Best,
Alice

AliceB
Posts: 12
Joined: Wed Apr 04, 2018 9:36 am

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by AliceB »

Actually I miss several boxes:
Acquisition
Samples
VRPN
Visualisation

This is very strange !

Thanks,
Alice

lslemon
Posts: 4
Joined: Tue Jun 12, 2018 3:11 pm

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by lslemon »

Good afternoon

I am currently having issues with the building of the source code. I keep getting the error

"ninja: error: loading 'build.ninja': No such file or directory".

I have tried deleting and re-installing the dependencies, the builds and even cleared just the CMAKE cache from inside the build.
The full error I'm receiving is:
Building sdk
Build type is set to: Release.
Visual Studio 2017 detection skipped as requested
Visual Studio 2015 detection skipped as requested
VStools: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\, VSCMake: Visual Studio 12 2013.
Found Visual Studio 12 2013 tools: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat
Compiler is: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- broken
CMake Error at C:/work/openvibe/dependencies/cmake/share/cmake-3.4/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe" is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/work/openvibe/build/sdk-Release/CMakeFiles/CMakeTmp



Run Build Command:"C:/work/openvibe/dependencies/ninja/ninja.exe"
"cmTC_99fdb"

[1/2] Building C object CMakeFiles\cmTC_99fdb.dir\testCCompiler.c.obj

[2/2] Linking C executable cmTC_99fdb.exe

FAILED: cmd.exe /C "cd . &&
C:\work\openvibe\dependencies\cmake\bin\cmake.exe -E vs_link_exe
--intdir=CMakeFiles\cmTC_99fdb.dir --manifests --
C:\PROGRA~2\MICROS~2.0\VC\bin\link.exe /nologo
CMakeFiles\cmTC_99fdb.dir\testCCompiler.c.obj /out:cmTC_99fdb.exe
/implib:cmTC_99fdb.lib /pdb:cmTC_99fdb.pdb /version:0.0 /machine:X86 /debug
/INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib
winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
advapi32.lib && cd ."

LINK : fatal error LNK1104: cannot open file 'gdi32.lib'

LINK Pass 1 failed. with 1104

ninja: build stopped: subcommand failed.





CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:8 (PROJECT)


-- Configuring incomplete, errors occurred!
See also "C:/work/openvibe/build/sdk-Release/CMakeFiles/CMakeOutput.log".
See also "C:/work/openvibe/build/sdk-Release/CMakeFiles/CMakeError.log".
An error occured during building process
""
Error while building "Release SDK"

C:\work\openvibe>build
Building sdk
Build type is set to: Release.
Visual Studio 2017 detection skipped as requested
Visual Studio 2015 detection skipped as requested
VStools: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\, VSCMake: Visual Studio 12 2013.
Found Visual Studio 12 2013 tools: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat
Compiler is: Visual Studio 12 2013
ninja: error: loading 'build.ninja': No such file or directory
An error occured during building process
""
Error while building "Release SDK"
I'm aware that the error is stupidly long, but I was wondering if you have seen any issue like this before?

Thank you for reading and I hope to hear from you

Luke

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by jtlindgren »

Hi Luke,

the 'clearest' indicator there about the reason of the fail is that the 'gdi32.lib' seems to be missing.

Could it be this problem: https://stackoverflow.com/questions/335 ... b/47175728

Since we generate everything by cmake we cannot directly apply the solution probably, but you could try to investigate if that library is really missing and if installing some specific SDK for your OS makes it appear. Try to google with the lib name.

Can you report back if you succeed to get it to work and how?


Thanks,
Jussi

lslemon
Posts: 4
Joined: Tue Jun 12, 2018 3:11 pm

Re: Windows 10 - ninja: error: loading 'build.ninja' : No

Post by lslemon »

Hi Jussi,

I have been rooting through the internet looking for a solution to the problem, and when trying to download the windows SDK for Visual Studios 2013, it presented the issue that it isn't compatible. DO you know if people have been able to build the software on windows 10?

I had the software working previously by just downloading the installer, and there were no issues apart from needing the drivers for the g.Nautilus headset. To get these drivers I am under the impression that I need to build the software using the source code?

Thanks for reading.
Luke.

Post Reply