[NTLK] Need help with compiling and running WatsonEnabler under Linux

David Arnold davida at pobox.com
Sun Feb 20 17:32:22 PST 2022


> On 21 Feb 2022, at 09:22, NewtonTalk <newtontalk at pda-soft.de> wrote:
> 
> Hi experts,
> 
> I've been trying to get WatsonEnabler running on a VirtualBox Ubuntu VM.
> I'll spare you the gruesome details of little Frank trying to find his way
> through the confusing maze called Linux for the first time in his life.
> Suffice it to say that it so far cost three nights, is far from finished,
> and as to WatsonEnabler has been a miserable failure. Hopefully, some of the
> experts on this list will be able to help me…

Perhaps the details might be better off list, but …


> 1) I have installed a brand spanking new Ubuntu Virtual Machine using
> VirtualBox on a Windows 10 machine.

That’s a good choice.  It mostly won’t matter, but which version?  20.04?  21.10?

> 
> 2) I've downloaded the following zip file from GitHub:
> 
>     <https://github.com/pguyot/DCL/archive/refs/heads/master.zip>
> 
> Unzipping this file ended up in a folder DCL-master.
> 
> 2) The way I understand things, this folder must be compiled before it can
> be of any use to me. At this point I'd like to point out that I neither have
> Visual Studio installed on this virtual machine nor, to the best of my
> knowledge, any other C++ compiler, unless such a C++ compiler is part of an
> standard Ubuntu distribution.

It’s not installed by default.

There are two popular choices: clang or g++.  Both are good, and either should work.  I’d default to g++, basically because I grew up with it :-)

Install with either:

   apt install g++

Or 

   apt install clang

Whichever one you choose, you’ll see that it pulls in a bunch of mandatory dependencies.  You can safely say “yes” to that when asked.  Don’t worry about the “Suggested packages” for now — you can make a note of them if you like, but they’re not strictly necessary.


> 3) According to Paul's readme file this, compilation is done as follows:
> 
>     mkdir build
>     cd build
>     cmake .. -DCMAKE_BUILD_TYPE=Debug
>     cmake --build .
>     ctest . -C Debug
> 
> This is where I get unsure for the first time. Where, relative to the
> DCL-master folder, must the build directory be located? Inside this folder?
> Elsewhere? Does this matter at all?

In these instructions, the ‘build’ directory should be a child of DCL-master.   This is the ‘..’ in the third line.  You can put it elsewhere, but … this is standard.

You’ll need to install cmake too:

    apt install cmake

‘ctest’ is installed as part of cmake.


> 4) Based on an assumption I created the directory inside the DCL-master
> folder and changed into it.
> 
> 5) Typing
> 
>     "cmake .. -DCMAKE_BUILD_TYPE=Debug"
> 
> provided me with the information that cmake was not found. It seems it isn't
> part of a standard Linux distribution. This problem was fixed by proceeding
> as the Ubuntu terminal kindly suggested, namely by entering
> 
>     sudo apt install cmake     
> 
> This installation seems to have worked, since now I'm getting usage hints
> when typing "cmake”.

Perfect.

> 5) Typing
> 
>     "cmake .. -DCMAKE_BUILD_TYPE=Debug"
> 
> again, I'm now getting the following:
> 
> -------------------------------------------------
> gruendef at gruendef-VirtualBox:~/Desktop/Hoffentlich/DCL-master/build$ cmake
> .. -DCMAKE_BUILD_TYPE=Debug
> -- The CXX compiler identification is unknown
> CMake Error at CMakeLists.txt:2 (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.
> 
> 
> -- Configuring incomplete, errors occurred!
> See also
> "/home/gruendef/Desktop/Hoffentlich/DCL-master/build/CMakeFiles/CMakeOutput.
> log".
> See also
> "/home/gruendef/Desktop/Hoffentlich/DCL-master/build/CMakeFiles/CMakeError.l
> og".
> gruendef at gruendef-VirtualBox:~/Desktop/Hoffentlich/DCL-master/build$ 
> ————————————————————————

With g++ installed, Paul’s instructions above appeared to work fine for me.
A few warnings here and there, but the tests passed, and I have a libDCL.so in the build directory …

> I swear by everything I hold sacred that I've tried to find the solution on
> my own. It seems that this problem isn't all that uncommon, but as a Linux
> newbie the explanations and suggestions are all Greek to me.
> 
> What can I do? And, if the miracle happens and I can make this compile
> within my statistically remaining lifetime, which unfortunately isn't all
> that long: How would I continue in order to make a Newton package usable on
> a Watson?

See above re installing a C++ (aka CXX) compiler.

Please feel free to ping me directly if anything there or elsewhere is unclear.

Cheers,




d




More information about the NewtonTalk mailing list