# Configure error with ccmake and cmake?

**URL:** https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886
**Category:** Support
**Tags:** code
**Created:** [November 18, 2024, 7:13am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886 "2024-11-18T07:13:45Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![CHENG-HSUAN](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@CHENG-HSUAN](https://discourse.vtk.org/u/CHENG-HSUAN)
#### Post date: [November 18, 2024, 7:13am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/1 "2024-11-18T07:13:45Z")

</div>

I followed the [VTK documentation](https://docs.vtk.org/en/latest/build_instructions/index.html#) step by step to build VTK on Ubuntu 22.04.

Here are the required packages

 ![1](https://discourse.vtk.org/uploads/default/original/2X/e/e61d561648d712f6e77519881fe474359e85ba3b.png)

I am using the v9.4.0 branch.

When I configure with `ccmake` (using all default build options), it fails to generate **build.ninja** , preventing VTK from being built.

```bash
ccmake -GNinja ..
cmake --build .
ninja: error: loading 'build.ninja': No such file or directory

```

Below is the error log:  
[CMakeError.log](https://discourse.vtk.org/uploads/short-url/jVmtksmK5UUesmrJIxWkKvBLbie.log) (99.4 KB)

However, under the same conditions, if I use `cmake` instead, the same error log appears, but the compilation can still proceed.

```bash
cmake -GNinja ..
cmake --build .

```

So, the question is whether I need to be concerned about this error log. Will it affect the libraries I compile?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [November 18, 2024, 9:19am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/2 "2024-11-18T09:19:24Z")

</div>

> [@CHENG-HSUAN](#):
>
> it fails to generate **build.ninja** , preventing VTK from being built.

I do not see CMake error anywhere in your message or shared log. Can you share it ?

---

<div class="post-metadata">

### Author: ![CHENG-HSUAN](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@CHENG-HSUAN](https://discourse.vtk.org/u/CHENG-HSUAN)
#### Post date: [November 18, 2024, 9:33am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/3 "2024-11-18T09:33:26Z")

</div>

In the shared log file

```auto
cc: error: unrecognized command-line option '-Weverything'
gmake[1]: *** [CMakeFiles/cmTC_c0167.dir/build.make:78: CMakeFiles/cmTC_c0167.dir/src.c.o] Error 1

c++: error: unrecognized command-line option '-wd4251'
gmake[1]: *** [CMakeFiles/cmTC_6eb96.dir/build.make:78: CMakeFiles/cmTC_6eb96.dir/src.cxx.o] Error 1

c++: error: unrecognized command-line option '-EHsc'
gmake[1]: *** [CMakeFiles/cmTC_271f3.dir/build.make:78: CMakeFiles/cmTC_271f3.dir/src.cxx.o] Error 1

vtk-9.4.0/Utilities/KWSys/vtksys/kwsysPlatformTestsCXX.cxx:53:13: error: ‘environ’ was not declared in this scope; did you mean ‘union’?
gmake[1]: *** [CMakeFiles/cmTC_39a0c.dir/build.make:78: CMakeFiles/cmTC_39a0c.dir/kwsysPlatformTestsCXX.cxx.o] Error 1

vtk-9.4.0/Utilities/KWSys/vtksys/kwsysPlatformTestsCXX.cxx:26:15: error: ‘struct stat’ has no member named ‘st_mtimespec’
gmake[1]: *** [CMakeFiles/cmTC_ca061.dir/build.make:78: CMakeFiles/cmTC_ca061.dir/kwsysPlatformTestsCXX.cxx.o] Error 1

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [November 18, 2024, 9:34am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/4 "2024-11-18T09:34:45Z")

</div>

> [@CHENG-HSUAN](#):
>
> `unrecognized command-line option '-Weverything'`

Then do not add these command line options.

---

<div class="post-metadata">

### Author: ![CHENG-HSUAN](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@CHENG-HSUAN](https://discourse.vtk.org/u/CHENG-HSUAN)
#### Post date: [November 18, 2024, 9:46am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/5 "2024-11-18T09:46:01Z")

</div>

But my operation was only limited to `git clone` and `ccmake`, all the rest are based on the Makefile provided by VTK

where can I find these command line options!!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [November 18, 2024, 9:47am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/6 "2024-11-18T09:47:34Z")

</div>

> [@CHENG-HSUAN](#):
>
> all the rest are based on the Makefile provided by VTK  
> where can I find these command line options!!

This is coming from your environnement, not from VTK.

Check your `.bashrc` or `.bash_profile`

---

<div class="post-metadata">

### Author: ![CHENG-HSUAN](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@CHENG-HSUAN](https://discourse.vtk.org/u/CHENG-HSUAN)
#### Post date: [November 18, 2024, 10:15am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/7 "2024-11-18T10:15:55Z")

</div>

> [@CHENG-HSUAN](#):
>
> fails to generate **build.ninja**

I found that I need to configure multiple times (press ‘c’), then it will suddenly be able to generate the build.ninja (press ‘g’). 😂

---

<div class="post-metadata">

### Author: ![CHENG-HSUAN](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@CHENG-HSUAN](https://discourse.vtk.org/u/CHENG-HSUAN)
#### Post date: [November 18, 2024, 10:23am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/8 "2024-11-18T10:23:55Z")

</div>

@mwestphal Thanks for your help!

I also want to confirm one thing: has the `VTK_OPENGL_USE_GLES` parameter been deprecated in version 9.4.0? I can’t find it in `ccmake`.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [November 18, 2024, 10:39am UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/9 "2024-11-18T10:39:51Z")

</div>

Thats a @jaswantp question

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [November 18, 2024, 1:03pm UTC](https://discourse.vtk.org/t/configure-error-with-ccmake-and-cmake/14886/10 "2024-11-18T13:03:23Z")

</div>

> [@CHENG-HSUAN](#):
>
> I also want to confirm one thing: has the `VTK_OPENGL_USE_GLES` parameter been deprecated in version 9.4.0? I can’t find it in `ccmake`.

Ah, the option got discarded for unix because of a [change](https://gitlab.kitware.com/vtk/vtk/-/commit/04661f4bcdf84195a75e4e91a542b9e6e8bd8e37#5ca005525cb68682e0b7f1fd45422b1d6eb0577a) that went in. You can still add a new entry on the command line. I’ll push a fix for that.
