Chrono::Sensor CMAKE error "src/chrono_sensor/CMakeLists.txt:527: Target "ChronoEngine_sensor" links to:GLEW::glew, but target was not found"

132 views
Skip to first unread message

Anthony Abrahamian

unread,
Jun 12, 2023, 3:00:35 PM6/12/23
to ProjectChrono
Hello,

My name is Anthony. I am trying to run Chrono::Sensors demoes. I successfully run the Chrono::Vehicle demos recently. All demos of the Chrono::Vehicle module works fine. However, when I tried to configure the build of the Chrono::Sensor through CMAKE, I had the error "src/chrono_sensor/CMakeLists.txt:527:   Target "ChronoEngine_sensor" links to:GLEW::glew, but target was not found". I followed every mentioned steps (https://api.projectchrono.org/development/module_sensor_installation.html) to configure the build.

Can you please help me finding some solutions?

Thank you.

Regards,
Anthony Abrahamian


20230612 Chrono Sensor Error.png

Harry ZHANG

unread,
Jun 12, 2023, 6:34:55 PM6/12/23
to ProjectChrono
Hello Anthony,

I have few questions:
1) Are you trying to build Chrono main branch?
2) If you are on the main branch, or Chrono-8, make sure you run the openGL building script in the 'build-script/' folder (https://github.com/projectchrono/chrono/blob/main/contrib/build-scripts/opengl/buildGL.sh). After you run the script, there should be a folder full of latest openGL packages (like ../Packages), make sure you configure openGL related stuffs using this package folder (like GLEW, GLFW, and GLM).
3) Double check if you include the correct directories for the CMake configuration. 
3) If you try above steps and still can't work, can you please share with your CMake configuration with us?

Best,
Harry

Anthony Abrahamian

unread,
Jun 14, 2023, 1:32:38 PM6/14/23
to ProjectChrono
Hello Harry,

Thank you for helping out because I think I resolved that issue using your step (2) but I have a new one that may or may not be connected to my first issue. My new issue is that I am getting a "cannot open input file (lib\Release\ChronoEninge_sensor.lib) when I try to build. And when I look into the Chrono_build folder, I do not see the object library file. Is that something that I should be automatically put in when I generate my solution? I have attached screenshots of my Cmake configuration, error, and folder where I believe I am missing the object library.

As always your help is very much appreciated.

Thank you,
Anthony
Screenshot2Cmake.png
Screenshot1Cmake.png
FolderChronoError.png
VSCodeErrorOutput.png

Harry ZHANG

unread,
Jun 14, 2023, 2:46:51 PM6/14/23
to ProjectChrono
Hello Anthony,

Few our colleagues also experienced the sensor issue before, and they fixed it by disable "USE_CUDA_NVRTC" choice, so you can try to do this first.

Best,
Harry

Anthony Abrahamian

unread,
Jun 16, 2023, 11:48:42 AM6/16/23
to ProjectChrono
Hello Harry,

I think I am almost there. I disabled  "USE_CUDA_NVRTC"  and it was able to create the demos application in my build folder. However, whenever I open the demo, I get an error that the nvinfer.dll was not found (picture attached) and the demo does not open. I redownloaded TensorRT as that is the folder that have nvinfer.dll, but the same error came up. Would you know how to go about this? 

As always, your help is greatly appreciated

Thank you,
Anthony

DemoError.png
ErrorList.png

Harry ZHANG

unread,
Jun 16, 2023, 12:07:30 PM6/16/23
to ProjectChrono
Hey Anthony,

I personally never saw this issue before, but few things in my mind:
1. TensorRT is not required for Chrono::Sensor module, so can you try to build without selecting "USE_TENSOR_RT" choice?
2. I found this link online, "nvinder.dll" not found issue might have something to do with installation process.
Hopefully these will be helpful :-)

Best,
Harry
Message has been deleted

Anthony Abrahamian

unread,
Jun 19, 2023, 11:00:48 AM6/19/23
to ProjectChrono
Hello Harry,

I decided to not use the TensorRT and am able to open some of the sensor modules. However, when I try to open other sensor modules, I receive a "sensor not built with GLFW support. Will proceed with no window" (picture attached) error. Is this due to me not making the GLFW paths correct?

As always thank you for your help.

Thank you,
Anthony 

GFLWsupportError.png
Message has been deleted

Harry ZHANG

unread,
Jun 20, 2023, 12:30:57 PM6/20/23
to ProjectChrono
Hello Anthony, 

Sorry for the late reply.

Can you please share your GLFW paths? It looks like the cmake config issue. One of our colleagues also uses Windows platform to run Chrono::Sensor and I attached his cmake config.

Best,
HarryMicrosoftTeams-image (2).png
Message has been deleted

Anthony Abrahamian

unread,
Jun 20, 2023, 2:40:24 PM6/20/23
to ProjectChrono
Hello Harry,

As usual thank you for your help. I did not actually have the Cmake paths setup to the packages location to start, but now that I have found the packages location, I setup the Cmake directories to correspond. Now, though I am running into my first issue of not being able to grab the GLEW file. It configures correctly, but cannot generate the project. I've attached my Cmake code and error. I have ran through a few iterations of trying different files for the Cmake but come up with the same error. 

As always your help is very much appreciated
Thank you,
Anthony 
CmakeGlew_GlfwError.png
CmakeError.png

Harry ZHANG

unread,
Jun 20, 2023, 4:01:16 PM6/20/23
to ProjectChrono
Hello Anthony,

Can you try to delete the current build and try to redo a clean configure and build? Also, can you also try to delete the opengl stuffs in Packages folder and rerun the build script to download the opengl again?
Let me know if the problem still exists.

Best,
Harry
Reply all
Reply to author
Forward
0 new messages