Error when building custom module with : File name too long

Skip to first unread message

Michael Dominguez

May 22, 2023, 10:38:06 AM5/22/23
to kurento
Hello Kurento,

I am using to build a face detection module with OpenCV
Kurento 7.0.0
opencv ^3.2.0
cmake 3.0

The issue:
When I run the script I get "File name too long". It looks like the name is getting built based on some git logs.

How does the file name get built? and can I change how its built?

  1 face-detection-module (0.0.1~rc1.20.04~20230426135001.git5c22978.20.04~20230426192106.git5c22978.20.04~2023050213531    4.git5c22978.20.04~20230519152955.git3e863eb.20.04~20230519153351.git3e863eb.20.04~20230519210151.git3e863eb.20.04~2    0230519210843.git3e863eb) UNRELEASED; urgency=medium
  4  -- Kurento <>  Fri, 19 May 2023 16:08:46 -0500
  6 face-detection-module (0.0.1~rc1) testing; urgency=medium
  8   * Initial release.
 10  -- Maintainer Name <>  Tue, 11 Apr 2023 14:27:27 -0500

I am getting this error:
dpkg-deb: building package 'face-detection-module-build-deps' in '../face-detection-module-build-deps_0.0.1~rc1.20.04~20230426135001.git5c22978.20.04~20230426192106.git5c22978.20.04~20230502135314.git5c22978.20.04~20230519152955.git3e863eb.20.04~20230519153351.git3e863eb.20.04~20230519210151.git3e863eb.20.04~20230519210843.git3e863eb_all.deb'.
dpkg-deb: error: unable to create '../face-detection-module-build-deps_0.0.1~rc1.20.04~20230426135001.git5c22978.20.04~20230426192106.git5c22978.20.04~20230502135314.git5c22978.20.04~20230519152955.git3e863eb.20.04~20230519153351.git3e863eb.20.04~20230519210151.git3e863eb.20.04~20230519210': File name too long
dh_builddeb: error: dpkg-deb --build debian/face-detection-module-build-deps .. returned exit code 2
dh_builddeb: error: Aborting due to earlier error
make: *** [debian/rules:30: binary-indep] Error 2
Error in the build process: exit status 2
dpkg: error: cannot access archive 'face-detection-module-build-deps_0.0.1~rc1.20.04~20230426135001.git5c22978.20.04~20230426192106.git5c22978.20.04~20230502135314.git5c22978.20.04~20230519152955.git3e863eb.20.04~20230519153351.git3e863eb.20.04~20230519210151.git3e863eb.20.04~20230519210843.git3e863eb_all.deb': File name too long
mk-build-deps: dpkg --unpack failed
+ on_exit
[] ERROR (2)
[] ==================== END ====================

Neil Young

May 22, 2023, 4:11:46 PM5/22/23
to kurento
If you want to build KMS7 from source your are good to go with this documentation:

If you additionally install kurento-media-server-dev
you will have all the tools available to build your OpenCV plugin.

Wondering about your OpenCV version. 20.04 comes with 4.2, why do you have 3.2?

Michael Dominguez

May 22, 2023, 5:59:23 PM5/22/23
to kurento
Thank you Neil,
I was able fix my issue by changing the version in debian/changelog and then using the --release flag on

As for the OpenCV version, I used the kurento-module-scaffold to create the project. and when I checked the CMakeLists.txt file it said ^3.2.0. I assumed that it was a safer way of saying 4.2.0 because of the carrot(^)

Juan Navarro

May 23, 2023, 5:17:42 AM5/23/23
The template file for CMakeLists.txt in the scaffolding tool was changed on March this year, prior to the release of Kurento 7.0.0, to now look like this:



So, if your
CMakeLists.txt says "^3.2.0" or anything different than "<5.0.0", it probably means that you are using an older version. That's OK if you want to target Kurento v6.x for any reason. But if you thought you'd be targeting Kurento v7, then mind that there is something wrong in your setup.

Most users get caught by this because the "apt-get" tool is a bit stupid and won't uninstall all dependencies that got installed with "apt-get install kurento-media-server-dev". So they later try to install a newer version of Kurento, resulting in a mixture of newer and older packages.

This baffling issue with what is a basic system tool, led users to a broken Kurento installation so often that we had to add a specific doc section about it, have a look just in case:


Juan Navarro
Software Development Engineer
Kurento & OpenVidu WebRTC platforms |
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Michael Dominguez

May 24, 2023, 10:03:42 AM5/24/23
to kurento
Oh you are right! I was looking at the old project files! Im sorry the actually version is <5.0.0
I will look at the local-upgrade doc as well thank you!

Michael Dominguez
Reply all
Reply to author
0 new messages