Fixing DroidCam Installation on Manjaro Linux
This update provides a solution for users facing linking errors during the installation of DroidCam on Manjaro Linux.
System Context
- Kernel Version:
Linux workhorse 6.1.68-1-MANJARO #1 SMP PREEMPT_DYNAMIC Thu Dec 14 00:46:56 UTC 2023 x86_64 GNU/Linux
- System Specifications: see bottom of comment
Issue Encountered
During the installation of DroidCam using yay (yay -Syy droidcam
), the following linking errors were encountered related to the TurboJPEG library:
/usr/bin/ld: /tmp/ccYSjh0z.o: in function `decoder_prepare_video':
decoder.c:(.text+0x35f): undefined reference to `tjInitDecompress'
...
/usr/bin/ld: decoder.c:(.text+0xac3): undefined reference to `tjGetErrorStr2'
collect2: error: ld returned 1 exit status
make: *** [Makefile:61: droidcam-cli] Error 1
==> ERROR: A failure occurred in build().
Steps Taken to Resolve the Issue
- Cloning the Git Repository:
- Initially cloned the DroidCam repository from its AUR package.
-
git clone https://aur.archlinux.org/droidcam
-
Modifying the PKGBUILD File:
- Edited the
PKGBUILD
script to resolve the linking issue. -
The
build()
function in the script was modified from:bash make JPEG_DIR="" JPEG_INCLUDE="" JPEG_LIB="" JPEG=$(pkg-config --libs --cflags libturbojpeg) USBMUXD=-lusbmuxd-2.0
to:bash make JPEG_DIR="/usr/lib" JPEG_INCLUDE="/usr/include" JPEG_LIB="-lturbojpeg" USBMUXD=-lusbmuxd-2.0
-
Building and Installing the Modified Package:
- After modifying the
PKGBUILD
file, the package was successfully built and installed without the previous linking errors usingmakepkg -is
in the folder where droidcam aur was cloned.
Conclusion
This modification to the PKGBUILD
file addresses the specific linking errors encountered with the TurboJPEG library during the installation of DroidCam on Manjaro Linux. Users facing similar issues can follow these steps to resolve the problem.
I do not understand myself why this explicit linking was necessary, open to suggestions.
System info:
inxi -Fxz
System:
Kernel: 6.1.68-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
Desktop: KDE Plasma v: 5.27.10 Distro: Manjaro Linux base: Arch Linux
Machine:
Type: Desktop Mobo: Gigabyte model: X58A-UD5 serial: <superuser required>
BIOS: Award v: FD date: 02/01/2011
CPU:
Info: quad core model: Intel Core i7 960 bits: 64 type: MT MCP arch: Nehalem
rev: 5 cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB
Speed (MHz): avg: 1603 high: 1634 min/max: 1596/3193 boost: enabled cores:
1: 1599 2: 1599 3: 1599 4: 1634 5: 1599 6: 1599 7: 1599 8: 1599
bogomips: 51181
Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
Device-1: NVIDIA GK106 [GeForce GTX 660] vendor: Gigabyte driver: nvidia
v: 470.223.02 arch: Kepler bus-ID: 03:00.0
Display: x11 server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3 driver: X:
loaded: nvidia gpu: nvidia resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
API: EGL v: 1.5 drivers: kms_swrast,nvidia,swrast platforms:
active: gbm,x11,surfaceless,device inactive: wayland,device-1
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 470.223.02
glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 660/PCIe/SSE2
API: Vulkan v: 1.3.269 drivers: nvidia surfaces: xcb,xlib devices: 1
Audio:
Device-1: Intel 82801JI HD Audio vendor: Gigabyte GA-EP45-DS5/GA-EG45M-DS2H
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
Device-2: NVIDIA GK106 HDMI Audio vendor: Gigabyte driver: snd_hda_intel
v: kernel bus-ID: 03:00.1
API: ALSA v: k6.1.68-1-MANJARO status: kernel-api
Server-1: JACK v: 1.9.22 status: off
Server-2: PipeWire v: 1.0.0 status: active
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Gigabyte driver: r8169 v: kernel port: ae00 bus-ID: 07:00.0
IF: enp7s0 state: down mac: <filter>
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Gigabyte driver: r8169 v: kernel port: 9e00 bus-ID: 08:00.0
IF: enp8s0 state: down mac: <filter>
Device-3: TP-Link Archer T9UH v1 [Realtek RTL8814AU] driver: rtl8814au
type: USB bus-ID: 9-1:2
IF: wlp2s0u1 state: up mac: <filter>
IF-ID-1: br-275fa1ecbe8a state: down mac: <filter>
IF-ID-2: br-4979e87956bb state: down mac: <filter>
IF-ID-3: br-4a6d90915cde state: down mac: <filter>
IF-ID-4: br-b80245bb5ab5 state: down mac: <filter>
IF-ID-5: br-be0abe5d9c19 state: down mac: <filter>
IF-ID-6: br-cee54582c206 state: down mac: <filter>
IF-ID-7: br-f2e2836dbec6 state: down mac: <filter>
IF-ID-8: docker0 state: down mac: <filter>
Drives:
Local Storage: total: 931.52 GiB used: 356.53 GiB (38.3%)
ID-1: /dev/sda vendor: Samsung model: HD501LJ size: 465.76 GiB
ID-2: /dev/sdb vendor: Seagate model: ST500DM002-1BD142 size: 465.76 GiB
Partition:
ID-1: / size: 78.12 GiB used: 63.69 GiB (81.5%) fs: btrfs dev: /dev/sdb2
ID-2: /home size: 379.63 GiB used: 292.83 GiB (77.1%) fs: btrfs
dev: /dev/sdb3
ID-3: /var/log size: 78.12 GiB used: 63.69 GiB (81.5%) fs: btrfs
dev: /dev/sdb2
Swap:
ID-1: swap-1 type: partition size: 8 GiB used: 1.8 MiB (0.0%) dev: /dev/sdb4
Sensors:
System Temperatures: cpu: 65.0 C mobo: N/A gpu: nvidia temp: 47 C
Fan Speeds (rpm): N/A gpu: nvidia fan: 47%
Info:
Processes: 332 Uptime: 9h 20m Memory: total: 16 GiB available: 15.62 GiB
used: 12.07 GiB (77.3%) Init: systemd Compilers: gcc: 13.2.1 clang: 16.0.6
Packages: 1445 Shell: Bash v: 5.2.21 inxi: 3.3.31
Pinned Comments