Problem with Gazebo

When I try and start Gazebo it errors out with symbol lookup error: /usr/lib/aarch64-linux-gnu/libavdevice.so.57 undefined symbol drmModeFreeFB. Researched this error and tried all the things suggested still no go. Reflashed the Xavier to make sure I hadn’t overwritten it still no joy. Also tried building guvcview and ran into the same error.

1 Like

Hi Dan, can you try running this?

$ sha1sum -c /etc/nv_tegra_release

Here seems to be a related thread about libavdevice and that symbol: https://devtalk.nvidia.com/default/topic/1041988/ffmpeg-problem-quot-undefined-symbol-drmmodefreefb-quot-/

/usr/lib/aarch64-linux-gnu/tegra/libnvosd.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_camera.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_image.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvomx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_force.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmedia.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libglx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvexif.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_gpu.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtx_helper.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketserver.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvscf.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstorehdfx.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_parser.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_contentpipe.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdla_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_gpucompute.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_tbc.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvos.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtnr.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_graphics.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvimp.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnet.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvphs.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvavp.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcapture.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_video.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstoredefog.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_il.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvodm_imager.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketclient.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtvmr.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdla_compiler.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-egl-wayland.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdc.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_boot.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_generic.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libtegrav4l2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvapputil.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcameratools.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcam_imageencoder.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnveglstream_camconsumer.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_utils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvomxilclient.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvwinsys.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvargus.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_spincircle.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvphsd.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnveglstreamproducer.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdla_runtime.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvll.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_graphics.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcolorutil.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_2d_v2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvtestresults.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamv4l2.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamerautils.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvcamlog.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvparser.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_vic.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdla_core.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvdla_os.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_ui.so: OK
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite.so: OK
/usr/lib/aarch64-linux-gnu/libv4l/plugins/libv4l2_nvvidconv.so: OK
/usr/lib/aarch64-linux-gnu/libv4l/plugins/libv4l2_nvvideocodec.so: OK
/usr/lib/xorg/modules/drivers/nvidia_drv.so: OK
/usr/lib/xorg/modules/extensions/libglx.so: OK

Don’t see libavdevice.so

cbd827adfed244fba44959cca1b644d7d61657dd this is what I get when using sha1sum on /usr/lib/aarch64-linux-gnu/libavdevice.so.57

Can you try running this command?

$ sudo apt-get install --reinstall libdrm2

And if necessary, try reinstalling libavdevice too.

tried both still doesn’t work. Only package I could find for libavdevice is libavdevice-dev.

libavdevice57 is the runtime library component of avdevice.

Will ask around internally about the DRM symbols. When I tried installing libsdl / libavdevice, I started getting these errors in other applications (which do not occur on a fresh JetPack), hence it makes me think that something is getting overwritten.

/etc/nv_tegra_release doesn’t check the signature of /usr/lib/aarch64-linux-gnu/libGL.so or libEGL.so, so perhaps those are being overwritten during the install of these packages.

I did fresh install of jetpack 4.1 then did a find for libavdevice. Not there. Installed ROS and now its there so its the dependency that ROS installs that is failing.

same issue with https://devtalk.nvidia.com/default/topic/1041988/ffmpeg-problem-quot-undefined-symbol-drmmodefreefb-quot-/?offset=4#5289720

wrong ln

“gazebo: symbol lookup error: /usr/lib/aarch64-linux-gnu/libavdevice.so.57: undefined symbol: drmModeFreeFB”
new Xavier flashed with jetpack4.1 upadated then gazebo install. the libavdevice57 is installed with gazebo one line install command. have checked links and dependencies to no avail. any resolution besides the ffmpeg leads.

I faced the same issue and look for solution to run the gazebo on Xavier

1 Like

I would imagine that you can build gazebo (and its dependencies) from source on the Xavier, and it will work. (One of the dependent libraries is libav, which is the one that has the missing symbol reference.)

I built it from source same error. Also built libav from source still no go same error.

hey thanks for the info. have been threading the code looking for where drmFreeModeFB is called. so far all i have found is it is related to free desktop and is used as a pointer to the desktop mode. dusty-nv updated jetson-reinforcement for xavier but has not updated jetson-reinforcement where gazebo was used for some of the simulations. I would assume there is something wrong with the kernel and will continue to wait to see if nvidia will help. gazebo is suited better to run on a powerful desktop. I’m working toward placing the xavier on a 1/16 size car that can race on a donkey car track with no walls as guides just the tape on the floor.

There appears to be some issues with symbolic links. /usr/lib/aarch64-linux-gnu/libdrm.so.2 appears to be a symbolic link which points to the wrong file. It’s hard to tell if it gets overwritten or is setup incorrectly to begin with. As a workaround, you can try:

sudo rm /usr/lib/aarch64-linux-gnu/libdrm.so.2 sudo -H ln -s /usr/lib/aarch64-linux-gnu/libdrm.so /usr/lib/aarch64-linux-gnu/libdrm.so.2

Installing gazebo from the repositories worked correctly once that change was made on this Xavier (L4T 31.0.2, JetPack 4.1). The link must be changed after gazebo is installed.

thank you for the help. the solution you provided was given earlier in the ffmpeg discussion and I tried it and failed. for me I changed the offending file link. I pointed libdrm.so.2 at libdrm.so.2.4.0 figuring that would lead to one less redirect. I then installed gazebo and then checked the libdrm.so.2 link again. the libdrm.so.2 link changed back so I changed it back and gazebo ran. I did find that the missing drmModeFreeFB is inside libdrm/af86drmMode.c. once again thank you for the info.

just fyi. after “sudo apt_get install libgazebo9-dev” the libdrm.so.2 link changed again and had to be redirected.

In my Jetson Agx Xevier in 2020, below command is worked.

sudo rm /usr/lib/aarch64-linux-gnu/libdrm.so.2
sudo -H ln -s /usr/lib/aarch64-linux-gnu/libdrm.so.2.4.0 /usr/lib/aarch64-linux-gnu/libdrm.so.2

1 Like

It also worked for me. I am using Jetson AGX Xavier with Jetpack 4.4.1.

Thanks