# Error linking ogs and testrunner with python (openpty and forkpty)

**URL:** <https://discourse.opengeosys.org/t/error-linking-ogs-and-testrunner-with-python-openpty-and-forkpty/576>\
**Category:** ogs-devs\
**Created:** [September 5, 2020, 6:40am UTC](https://discourse.opengeosys.org/t/error-linking-ogs-and-testrunner-with-python-openpty-and-forkpty/576 "2020-09-05T06:40:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![manolis](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@manolis](https://discourse.opengeosys.org/u/manolis)\
**Post date:** [September 5, 2020, 6:40am UTC](https://discourse.opengeosys.org/t/error-linking-ogs-and-testrunner-with-python-openpty-and-forkpty/576/1 "2020-09-05T06:40:55Z")

</div>

Hi, I am trying to compile the latest source code on an ubuntu system with python 3.8.5. At the final linking step of ogs and testrunner I get the error that there are undefined references to openpty and forkpty. I have the same problem with python 3.8.3. The cmake argument is only -DOGS\_USE\_PYTHON=“ON” -DCMAKE\_BUILD\_TYPE=“Debug” . Do I have to give a specific argument in cmake ?

---

<div class="post-metadata">

**Author:** ![bilke](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/bilke/32/868_2.png) [@bilke](https://discourse.opengeosys.org/u/bilke)\
**Post date:** [September 7, 2020, 12:32pm UTC](https://discourse.opengeosys.org/t/error-linking-ogs-and-testrunner-with-python-openpty-and-forkpty/576/2 "2020-09-07T12:32:11Z")

</div>

`openpty` and `forkpty` are not dependencies of OGS so I do not know why your build requires these. You may want to send us the full CMake output from a clean (empty build directory) CMake-run.

---

<div class="post-metadata">

**Author:** ![manolis](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@manolis](https://discourse.opengeosys.org/u/manolis)\
**Post date:** [September 7, 2020, 1:22pm UTC](https://discourse.opengeosys.org/t/error-linking-ogs-and-testrunner-with-python-openpty-and-forkpty/576/3 "2020-09-07T13:22:46Z")

</div>

I can not upload files so you may download the output for cmake …/ogs -DOGS\_USE\_PYTHON=ON \> out1 and for make -j 16 \> out2 commands from

[https://www.dropbox.com/s/mlijvbudqzh73ha/ogsError.zip?dl=0](https://www.dropbox.com/s/mlijvbudqzh73ha/ogsError.zip?dl=0)

The error figure presents the errors that I get and the ogs binary is not created in the bin directory.

Thank you.

---

<div class="post-metadata">

**Author:** ![joergbuchwald](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/joergbuchwald/32/449_2.png) [@joergbuchwald](https://discourse.opengeosys.org/u/joergbuchwald)\
**Post date:** [September 7, 2020, 2:29pm UTC](https://discourse.opengeosys.org/t/error-linking-ogs-and-testrunner-with-python-openpty-and-forkpty/576/4 "2020-09-07T14:29:05Z")

</div>

Your configure script says that the following required package has not been found:

- PythonLibsNew (required version \>= 3.8.5)  
So I guess your either mixing up python versions or your python installation might not be complete.  
Why are you not using the standard system python libraries?

---

<div class="post-metadata">

**Author:** ![bilke](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/bilke/32/868_2.png) [@bilke](https://discourse.opengeosys.org/u/bilke)\
**Post date:** [September 14, 2020, 6:42am UTC](https://discourse.opengeosys.org/t/error-linking-ogs-and-testrunner-with-python-openpty-and-forkpty/576/5 "2020-09-14T06:42:20Z")

</div>

I think there is something mixed up with your Python installation, I also advice to use the system python and not install a custom Python.

---

<div class="post-metadata">

**Author:** ![manolis](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@manolis](https://discourse.opengeosys.org/u/manolis)\
**Post date:** [September 26, 2020, 3:32pm UTC](https://discourse.opengeosys.org/t/error-linking-ogs-and-testrunner-with-python-openpty-and-forkpty/576/6 "2020-09-26T15:32:28Z")

</div>

I used a new Ubuntu 20.04.1 LTS system with its 3.8.2 python. The cmake -DOGS\_USE\_PYTHON=ON …/ogs command returns that the following required package has not been found:

- PythonLibsNew (required version \>= 3.8.2)

But the ogs executable has been succesfully created and tested.  
Thank you bilke for your advice.
