NVIDIAGameWorks / FleX

Other
664 stars 100 forks source link

Incompatibility with libGLEW #7

Closed ghost closed 6 years ago

ghost commented 7 years ago

Hello,

I'm trying to write a fluid dynamics simulation plugin for Gazebo/ROS for my school's Robosub team. To get started, I thought I'd run the demo. When I run the demo file in /FleX/bin/linux64, I get the following error:

./NvFlexDemoDebugCUDA_x64: error while loading shared libraries: libGLEW.so.1.10: cannot open shared object file: No such file or directory

It looks like libGLEW is missing, so I install it.

paul@ubuntu:~/Downloads$ sudo apt-get install libglew-dev Reading package lists... Done Building dependency tree
Reading state information... Done libglew-dev is already the newest version (2.0.0-3). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

If I then look for libGLEW with locate, I get the following:

paul@ubuntu:~/Downloads$ locate libGLEW /usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.13 /usr/lib/x86_64-linux-gnu/libGLEWmx.so.1.13.0

Apparently it's case sensitive:

paul@ubuntu:~/Downloads$ locate libglew /usr/share/doc/libglewmx1.13 /usr/share/doc/libglewmx1.13/changelog.Debian.gz /usr/share/doc/libglewmx1.13/copyright /usr/share/lintian/overrides/libglewmx1.13 /var/lib/dpkg/info/libglewmx1.13:amd64.list /var/lib/dpkg/info/libglewmx1.13:amd64.md5sums /var/lib/dpkg/info/libglewmx1.13:amd64.shlibs /var/lib/dpkg/info/libglewmx1.13:amd64.symbols /var/lib/dpkg/info/libglewmx1.13:amd64.triggers

So, libGLEW is not installed - something called libGLEWmx is installed instead. I downloaded an old version of libGLEW1.10 from the Trusty repository: https://launchpad.net/ubuntu/+source/glew/1.10.0-3/+build/5403294, but there is a compatibility issue:

paul@ubuntu:~/Downloads$ sudo dpkg -i libglew-dev_1.10.0-3_amd64.deb dpkg: warning: downgrading libglew-dev:amd64 from 2.0.0-3 to 1.10.0-3 (Reading database ... 209440 files and directories currently installed.) Preparing to unpack libglew-dev_1.10.0-3_amd64.deb ... Unpacking libglew-dev:amd64 (1.10.0-3) over (2.0.0-3) ... dpkg: dependency problems prevent configuration of libglew-dev:amd64: libglew-dev:amd64 depends on libglew1.10 (= 1.10.0-3); however: Package libglew1.10 is not installed.

dpkg: error processing package libglew-dev:amd64 (--install): dependency problems - leaving unconfigured Errors were encountered while processing: libglew-dev:amd64

I'm pretty stuck at this point.

System: Ubuntu 17.04 Zesty Ryzen 1500X Asus GTX 1060 Nvidia 375.66 drivers

ghost commented 7 years ago

I've installed the missing package from a different Trusty repository, and now I'm able to "run" the demo - in that a transparent window pops up. Just as quickly, however, it closes and I'm left with the following:

Reshaping Error creating CUDA context.

I have nvidia-cuda-tools, nvidia-cuda-dev, etc. installed already - is there something I need to change in nvidia-settings? Where would I look for an error log?

mmacklin commented 7 years ago

Can you run any of the other NVIDIA CUDA sample applications on your machine? That would let us confirm that CUDA installation is working correctly. If it is working then we can investigate further.

ghost commented 7 years ago

Hi, I'm able to run nearly every CUDA sample application I've tested in the NVIDIA_CUDA-8.0_Samples folder (after compiling with Make). All of the Simulations demos (5_Simulations) run except nbody_opengles, nbody_screen, and fluidsGLES, which make fails to compile after throwing this type of error:

WARNING - nbody_opengles is not supported on Linux x86_64 - waiving sample <<<

The other simulation demos (fluidsGL, nbody, oceanFFT, particles, smokeParticles) all compile and run fine. I tested a few of the other demos in 7_CUDALibraries, and they all seem to build and run with no errors except those that require multiple GPUs.

Note: I reinstalled my entire system to 16.04 LTS yesterday due to a few dependency issues (what with 17.04 not being an LTS release), and reconfigured all the NVIDIA drivers, CUDA, libGLEW, etc., and re-cloned the FleX repository. All of the above testing was done on the system in 16.04 LTS, and with the NVIDIA X-window driver set to the default. After installing the CUDA toolkit, my NVIDIA driver version is now 375.26, not 375.66.

mmacklin commented 7 years ago

OK thanks. We're currently trying to improve our Linux testing for Flex here. I will let you know when we have a new beta build to try out.

Cheers, Miles

ghost commented 7 years ago

Thanks Miles! I'll see if I can figure out how to compile it from source in the meantime.

Paul