How to compile and install OPENCRG for Ubuntu 18.04?

80 views
Skip to first unread message

Anshul pagariya

unread,
Feb 1, 2023, 4:15:49 AM2/1/23
to ProjectChrono
Hello Everyone,

I was installing OPENCRG for ubuntu 18.04 but I am really unsure how to install and compile it, I saw one post  https://groups.google.com/g/projectchrono/search?q=vehicle%20 related to it but these commands do not work for Ubuntu 18.4. Can you please help me?

Many thanks,
Anshul

Radu Serban

unread,
Feb 1, 2023, 4:33:17 AM2/1/23
to ProjectChrono

Could you please be more specific as to what does not work for you?

Thanks,
Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/21a2bc3d-8ae7-4669-a125-ad28cbb64be0n%40googlegroups.com.

Anshul pagariya

unread,
Feb 1, 2023, 5:11:24 AM2/1/23
to ProjectChrono
Hello, thanks for the prompt reply.

I first downloaded OpenCRG from - https://www.asam.net/standards/detail/opencrg/ and then extracted it, after which I used make command to compile it in directory c-api (make error.png in attachment). I also tried method suggested by zaqhie on https://groups.google.com/g/projectchrono/c/ggOaei2Lk4s/m/Ei4lJ6RJBAAJ, that also did not work. I am also not pro in Linux commands so not really sure which commands can I use to compile and create shared library for Ubuntu 18.04.

Many thanks,
Anshul
make error.png

Radu Serban

unread,
Feb 1, 2023, 6:27:43 AM2/1/23
to ProjectChrono

Well, so this is obviously an OpenCRG problem (a possible fix is probably to remove the “-ansi” compiler flag from their makefiles).

But I assumed you were following the instructions on building OpenCRG that we provide with Chrono (since you mentioned those posts on our user mailing list). See https://github.com/projectchrono/chrono/tree/main/contrib/opencrg-support

 

--Radu

Anshul pagariya

unread,
Feb 1, 2023, 7:17:46 AM2/1/23
to ProjectChrono
Hello Radu, thanks again :) I did not know about this support file, thanks for sharing. I tried the steps in guide, I have also put CMakeLists.txt in the c-api directory also, but got the error (attached picture) while using cmake --build Release command it says - no directory Release found in c-api :(

Many thanks,
Anshul
cmake --build error.png

Radu Serban

unread,
Feb 1, 2023, 7:36:44 AM2/1/23
to ProjectChrono

Anshul, I don’t know what else I can tell you beyond what the error message says: “…/Release is not a directory”.   You should first create that directory and then tell CMake that’s where you want it to create the build files.

Anshul pagariya

unread,
Feb 2, 2023, 8:27:55 AM2/2/23
to ProjectChrono
Hello Radu, sorry for asking silly questions, I hope you don't mind. I made directories for Release and Debug and ran the build commands but now I got the error - Error: could not load cache (attached screenshot). I went to internet and found - https://stackoverflow.com/questions/38888272/cmake-throws-error-could-not-load-cache but this did not solve my problem at last I have to ask you :) Can you help here ?

Many thanks in advance,
Anshul
Error-cache.png

Radu Serban

unread,
Feb 21, 2023, 6:34:54 AM2/21/23
to ProjectChrono

Sorry for the late reply.  In case you haven’t already solved this issue, the first thing I’d do is delete all temporary CMake files (including its cache) and reconfigure.

Anshul, I am not trying to discourage you in any way, but in order to use a package such as Chrono you will need to familiarize yourself a bit more with certain tools, including use of CMake.

Having said that, to address issues such as yours, we have been working on providing some scripts that will hopefully streamline and simplify getting various dependencies required by Chrono modules (including OpenCRG). This is still work in progress and not ready to push to the main git branch, but it shouldn’t be too long before we can make those available.

Anshul pagariya

unread,
Feb 21, 2023, 6:55:13 AM2/21/23
to ProjectChrono
               

Hello Radu, thanks for the response. I fixed the issue by creating the shared library for OpenCRG and linking it to Build_chrono using ccmake <path-to-source>. In the time you did not respond I got good understanding of cmake also. But now I am stuck on another problem described here - https://groups.google.com/g/projectchrono/c/f4nb_zYopCQ. I would be grateful if you could help me here.

Sincerely,

Anshul

Reply all
Reply to author
Forward
0 new messages