Skip to contentSkip to conversation

package/mjpg-streamer: fix undefined symbol error

PATCH Applied Bernd Kuhls 3 participants 3 messages Aug 8, 2024 – Sep 3, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/mjpg-streamer: fix undefined symbol error

Fixes runtime error:

dlopen: /usr/lib/mjpg-streamer/input_uvc.so: undefined symbol: resolutions_help

Patch was suggested by Thomas:
http://lists.busybox.net/pipermail/buildroot/2024-August/759732.html

---
v2: used code suggested by Thomas, run-time tested (Thomas)

 ...-all-symbols-of-mjpg_streamer-binary.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/mjpg-streamer/0001-Export-all-symbols-of-mjpg_streamer-binary.patch
package/mjpg-streamer/0001-Export-all-symbols-of-mjpg_streamer-binary.patch new file +33 -0
new file mode 100644
index 0000000000..a0b80ff711
@@ -0,0 +1,33 @@
+From fbde1593948ae95f287b2167d0bec5b27948cc01 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Tue, 6 Aug 2024 17:04:55 +0200
+Subject: [PATCH 1/1] Export all symbols of mjpg_streamer binary
+
+Fixes runtime error with stripped binary
+
+    dlopen: /usr/lib/mjpg-streamer/input_uvc.so: undefined symbol: resolutions_help
+
+Source: http://lists.busybox.net/pipermail/buildroot/2024-August/759732.html
+
+Upstream: https://github.com/jacksonliam/mjpg-streamer/pull/401
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ mjpg-streamer-experimental/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mjpg-streamer-experimental/CMakeLists.txt b/mjpg-streamer-experimental/CMakeLists.txt
+index cf26620..3ff12cd 100644
+--- a/mjpg-streamer-experimental/CMakeLists.txt
++++ b/mjpg-streamer-experimental/CMakeLists.txt
+@@ -92,6 +92,7 @@ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+ add_executable(mjpg_streamer mjpg_streamer.c
+                              utils.c)
+ 
++set_property(TARGET mjpg_streamer PROPERTY ENABLE_EXPORTS ON)
+ target_link_libraries(mjpg_streamer pthread dl)
+ install(TARGETS mjpg_streamer DESTINATION bin)
+ 
+-- 
+2.39.2
+
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Bernd,

Quoted 8 lines · On Thu, 8 Aug 2024 21:21:26 +0200 Bernd Kuhls <[email protected]> wrote:

Fixes runtime error:

dlopen: /usr/lib/mjpg-streamer/input_uvc.so: undefined symbol: resolutions_help

Patch was suggested by Thomas:
http://lists.busybox.net/pipermail/buildroot/2024-August/759732.html

Thanks, applied, two comments below.

Quoted 13 lines

---
v2: used code suggested by Thomas, run-time tested (Thomas)

 ...-all-symbols-of-mjpg_streamer-binary.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/mjpg-streamer/0001-Export-all-symbols-of-mjpg_streamer-binary.patch
package/mjpg-streamer/0001-Export-all-symbols-of-mjpg_streamer-binary.patch new file +0 -0
new file mode 100644
index 0000000000..a0b80ff711

package/mjpg-streamer/0001-Export-all-symbols-of-mjpg_streamer-binary.patch line 4

Quoted 4 lines
package/mjpg-streamer/0001-Export-all-symbols-of-mjpg_streamer-binary.patch new file +4 -0
@@ -0,0 +1,33 @@
+From fbde1593948ae95f287b2167d0bec5b27948cc01 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <[email protected]>
+Date: Tue, 6 Aug 2024 17:04:55 +0200
+Subject: [PATCH 1/1] Export all symbols of mjpg_streamer binary

Please generate the patches with git format-patch -N. Shall I suggest that you add:

https://paste.ack.tf/c160ab

into your .git/hooks/post-commit ? This way you will get automatic check-package verification when you create or rework commits.

package/mjpg-streamer/0001-Export-all-symbols-of-mjpg_streamer-binary.patch line 14

Quoted 9 lines
package/mjpg-streamer/0001-Export-all-symbols-of-mjpg_streamer-binary.patch new file +9 -0
+Fixes runtime error with stripped binary
+
+    dlopen: /usr/lib/mjpg-streamer/input_uvc.so: undefined symbol: resolutions_help
+
+Source: http://lists.busybox.net/pipermail/buildroot/2024-August/759732.html
+
+Upstream: https://github.com/jacksonliam/mjpg-streamer/pull/401
+
+Signed-off-by: Bernd Kuhls <[email protected]>

This commit message is pretty terse. For me or you who have looked at the problem, it's pretty obvious, but for the maintainer of mjpg-streamer, it really isn't very clear what is going on and why this patch would be needed.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Bernd Kuhls
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> writes:

Fixes runtime error:
dlopen: /usr/lib/mjpg-streamer/input_uvc.so: undefined symbol: resolutions_help

Patch was suggested by Thomas:
http://lists.busybox.net/pipermail/buildroot/2024-August/759732.html

---
v2: used code suggested by Thomas, run-time tested (Thomas)

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot