# Having issue with while building Texgen Source code on Ubuntu 22.04LTS

**URL:** https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130
**Category:** Code
**Tags:** os:linux
**Created:** [December 5, 2024, 7:03am UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130 "2024-12-05T07:03:11Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![10427788](https://discourse.cmake.org/user_avatar/discourse.cmake.org/10427788/32/5172_2.png) [@10427788](https://discourse.cmake.org/u/10427788)
#### Post date: [December 5, 2024, 7:03am UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/1 "2024-12-05T07:03:11Z")

</div>

Hi,  
While building the TexGen source code using “make -j$(no process)” command in the terminal, I used get the following error 🙂

 ![image](https://discourse.cmake.org/uploads/default/original/2X/e/eda50bca8a981e3bf99a6bd65158b8a1193af0db.png)

Please let me know to overcome this problem for sucessfylly building and installing the Texgen Source code on Ubuntu 22.04 LTS (With gcc 11.4.0, VTK 6.3, g++ 11.4.0). Thanks in advance

---

<div class="post-metadata">

### Author: ![retif](https://discourse.cmake.org/user_avatar/discourse.cmake.org/retif/32/1776_2.png) [@retif](https://discourse.cmake.org/u/retif)
#### Post date: [December 5, 2024, 10:40am UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/2 "2024-12-05T10:40:05Z")

</div>

It would be useful to know what this “TexGen” is and where can one get its source code.

---

<div class="post-metadata">

### Author: ![10427788](https://discourse.cmake.org/user_avatar/discourse.cmake.org/10427788/32/5172_2.png) [@10427788](https://discourse.cmake.org/u/10427788)
#### Post date: [December 5, 2024, 1:10pm UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/3 "2024-12-05T13:10:26Z")

</div>

Hi, It is an open-source code designed to generate the textile architecture of composite materials, developed by Nottingham University in the UK. As part of my research, I am trying to compile this source code, but I encountered the above-mentioned error while building the TexGen source code.  
You can find at the given Github link: [GitHub - louisepb/TexGen: TexGen is a geometric textile modelling software package to be used for obtaining engineering properties of woven textiles and textile composites.](https://github.com/louisepb/TexGen)

Please let me know if you come across any solution to resolve this problem . Thanks

---

<div class="post-metadata">

### Author: ![retif](https://discourse.cmake.org/user_avatar/discourse.cmake.org/retif/32/1776_2.png) [@retif](https://discourse.cmake.org/u/retif)
#### Post date: [December 5, 2024, 1:38pm UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/4 "2024-12-05T13:38:56Z")

</div>

The `io.h` is a header that one would include on Windows, while on \*NIX hosts one would include `unistd.h` instead. For instance, from time to time I see the following condition in various projects:

```cpp
#if WIN32
    #include <io.h>
#else
    #include <unistd.h>
#endif

```

Coming back to this TexGen project, their [unistd.h](https://github.com/louisepb/TexGen/blob/1a9f971d8c6ea2d611dcef73c85da8356abc6065/OctreeRefinement/include/unistd.h#L19) looks strange and seems to be meant to be used on Windows (_according to maintainers comments, and also because it includes `io.h`_), while you are on a GNU/Linux host, and so it looks like you are including the [headers](https://github.com/louisepb/TexGen/tree/1a9f971d8c6ea2d611dcef73c85da8356abc6065/OctreeRefinement/include) from `OctreeRefinement/include/` with that `unistd.h` among them, which is what fails the build.

---

<div class="post-metadata">

### Author: ![10427788](https://discourse.cmake.org/user_avatar/discourse.cmake.org/10427788/32/5172_2.png) [@10427788](https://discourse.cmake.org/u/10427788)
#### Post date: [December 6, 2024, 1:00am UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/5 "2024-12-06T01:00:32Z")

</div>

Hi, Thanks for the information and is there any way to resolve that problem ?  
Thanks

---

<div class="post-metadata">

### Author: ![retif](https://discourse.cmake.org/user_avatar/discourse.cmake.org/retif/32/1776_2.png) [@retif](https://discourse.cmake.org/u/retif)
#### Post date: [December 6, 2024, 8:28am UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/6 "2024-12-06T08:28:16Z")

</div>

Haven’t I just explained what is causing it, as I am guessing? That would be the first thing to try then. It might not be the actual reason, but at least something to start with.

---

<div class="post-metadata">

### Author: ![10427788](https://discourse.cmake.org/user_avatar/discourse.cmake.org/10427788/32/5172_2.png) [@10427788](https://discourse.cmake.org/u/10427788)
#### Post date: [December 6, 2024, 11:40am UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/7 "2024-12-06T11:40:22Z")

</div>

Hi, Thanks

---

<div class="post-metadata">

### Author: ![10427788](https://discourse.cmake.org/user_avatar/discourse.cmake.org/10427788/32/5172_2.png) [@10427788](https://discourse.cmake.org/u/10427788)
#### Post date: [December 6, 2024, 11:42am UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/8 "2024-12-06T11:42:39Z")

</div>

Hi, While building the PyMesh using CMAKE, I used to get this error 🙂

 ![image](https://discourse.cmake.org/uploads/default/original/2X/4/4448bd30ae26e14ffe94879814898b388905800c.png)

Please let me know the way to resolve this problem. Thanks in advance

---

<div class="post-metadata">

### Author: ![retif](https://discourse.cmake.org/user_avatar/discourse.cmake.org/retif/32/1776_2.png) [@retif](https://discourse.cmake.org/u/retif)
#### Post date: [December 6, 2024, 3:03pm UTC](https://discourse.cmake.org/t/having-issue-with-while-building-texgen-source-code-on-ubuntu-22-04lts/13130/9 "2024-12-06T15:03:41Z")

</div>

Have you tried googling for the error text? Besides, it isn’t really about CMake at this point.  
And since you said that you “_used to_” get this error, I take it that’s no longer the case?

Also, I don’t see how PyMesh relates to TexGen.
