slyfox1186 / ffmpeg-build-script

The FFmpeg build script build's the most up to date version of FFmpeg by using API calls to download the latest source code available.
GNU General Public License v3.0
45 stars 9 forks source link

Problems with arch linux (Garuda) #20

Closed Hubfront closed 9 months ago

Hubfront commented 9 months ago

While trying to build, i encountered two problems:

1) I have an AMD GPU, so i don't want to install CUDA:

Choose an option

[1] Install the CUDA SDK Toolkit and add it to your PATH [2] Continue without installing (hardware acceleration will be turned off)

Your choices are (1 or 2):

Going with option 2 fails:

./build-ffmpeg: Zeile 872: jq: Kommando nicht gefunden.

Unable to locate the file: /usr/local/cuda/version.json. Line: 875_

It seems that the script tries to access cuda resources even if I choose to build without cuda.

2) So i need to choose option 1 (CUDA). The script runs in an error, while trying to install it:

Downloading CUDA SDK Toolkit - version 12.3.1

==> Erstelle Paket: cuda 12.3.0-6 (Mo 27 Nov 2023 16:16:32 CET) ==> Prüfe Laufzeit-Abhängigkeiten... ==> Installiere fehlende Abhängigkeiten... Abhängigkeiten werden aufgelöst … Nach in Konflikt stehenden Paketen wird gesucht … Warnung: Abhängigkeits-Zyklus entdeckt: Warnung: eglexternalplatform wird vor seiner Abhängigkeit nvidia-utils installiert werden

Paket (6) Neue Version Netto-Veränderung Größe des Downloads

extra/egl-wayland 2:1.1.13-1 0,09 MiB 0,03 MiB extra/eglexternalplatform 1.1-2 0,02 MiB 0,01 MiB extra/gcc12-libs 12.3.0-3 0,57 MiB 0,20 MiB extra/gcc12 12.3.0-3 152,99 MiB 38,23 MiB extra/nvidia-utils 545.29.06-1 639,75 MiB 239,88 MiB extra/opencl-nvidia 545.29.06-1 23,23 MiB 2,80 MiB

Gesamtgröße des Downloads: 281,14 MiB Gesamtgröße der installierten Pakete: 816,65 MiB

:: Installation fortsetzen? [J/n] :: Pakete werden empfangen … egl-wayland-2:1.1.13-1-x86_64 34,2 KiB 206 KiB/s 00:00 [------------------------------------] 100% gcc12-libs-12.3.0-3-x86_64 202,3 KiB 1082 KiB/s 00:00 [------------------------------------] 100% opencl-nvidia-545.29.06-1-x86_64 2,8 MiB 11,7 MiB/s 00:00 [------------------------------------] 100% eglexternalplatform-1.1-2-any 7,1 KiB 215 KiB/s 00:00 [------------------------------------] 100% gcc12-12.3.0-3-x86_64 38,2 MiB 28,8 MiB/s 00:01 [------------------------------------] 100% nvidia-utils-545.29.06-1-x86_64 239,9 MiB 42,6 MiB/s 00:06 [------------------------------------] 100% Gesamt (6/6) 281,1 MiB 49,5 MiB/s 00:06 [------------------------------------] 100% (6/6) Schlüssel im Schlüsselbund werden geprüft [------------------------------------] 100% (6/6) Paket-Integrität wird überprüft [------------------------------------] 100% (6/6) Paket-Dateien werden geladen [------------------------------------] 100% (6/6) Auf Dateikonflikte wird geprüft [------------------------------------] 100% (6/6) Verfügbarer Festplattenspeicher wird ermittelt [------------------------------------] 100% :: Pre-transaction-Hooks werden gestartet … (1/1) Performing snapper pre snapshots for the following configurations... ==> root: 35 :: Paketänderungen werden verarbeitet … (1/6) Installiert wird opencl-nvidia [------------------------------------] 100% Optionale Abhängigkeiten für opencl-nvidia opencl-headers: headers necessary for OpenCL development (2/6) Installiert wird eglexternalplatform [------------------------------------] 100% (3/6) Installiert wird egl-wayland [------------------------------------] 100% (4/6) Installiert wird nvidia-utils [------------------------------------] 100% If you run into trouble with CUDA not being available, run nvidia-modprobe first. If you use GDM on Wayland, you might have to run systemctl enable --now nvidia-resume.service Optionale Abhängigkeiten für nvidia-utils nvidia-settings: configuration tool xorg-server: Xorg support [Installiert] xorg-server-devel: nvidia-xconfig opencl-nvidia: OpenCL support [Installiert] (5/6) Installiert wird gcc12-libs [------------------------------------] 100% (6/6) Installiert wird gcc12 [------------------------------------] 100% :: Post-transaction-Hooks werden gestartet … ( 1/10) Creating system user accounts... Creating group 'nvidia-persistenced' with GID 143. Creating user 'nvidia-persistenced' (NVIDIA Persistence Daemon) with UID 143 and GID 143. ( 2/10) Reloading system manager configuration... ( 3/10) Reloading device manager configuration... ( 4/10) Arming ConditionNeedsUpdate... ( 5/10) Foreign/AUR package notification => No foreign/AUR packages found. ( 6/10) Orphaned package notification... gcc12 12.3.0-3 wayland-protocols 1.32-1 ( 7/10) Checking for .pacnew and .pacsave files... ( 8/10) Reloading system bus configuration... ( 9/10) Performing snapper post snapshots for the following configurations... ==> root: 36 (10/10) Syncing all file systems... ==> Prüfe Buildtime-Abhängigkeiten... ==> Empfange Quellen... -> Lade cuda_12.3.0_545.23.06_linux.run herunter... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4158M 100 4158M 0 0 52.7M 0 0:01:18 0:01:18 --:--:-- 55.0M -> cuda.sh gefunden -> cuda.conf gefunden -> accinj64.pc gefunden -> cublas.pc gefunden -> cuda.pc gefunden -> cudart.pc gefunden -> cufft.pc gefunden -> cufftw.pc gefunden -> cuinj64.pc gefunden -> curand.pc gefunden -> cusolver.pc gefunden -> cusparse.pc gefunden -> nppc.pc gefunden -> nppial.pc gefunden -> nppicc.pc gefunden -> nppicom.pc gefunden -> nppidei.pc gefunden -> nppif.pc gefunden -> nppig.pc gefunden -> nppim.pc gefunden -> nppi.pc gefunden -> nppist.pc gefunden -> nppisu.pc gefunden -> nppitc.pc gefunden -> npps.pc gefunden -> nvgraph.pc gefunden -> nvidia-ml.pc gefunden -> nvjpeg.pc gefunden -> nvrtc.pc gefunden -> nvToolsExt.pc gefunden ==> Überprüfe source Dateien mit sha512sums... cuda_12.3.0_545.23.06_linux.run ... Erfolg cuda.sh ... Erfolg cuda.conf ... Erfolg accinj64.pc ... Erfolg cublas.pc ... Erfolg cuda.pc ... Erfolg cudart.pc ... Erfolg cufft.pc ... Erfolg cufftw.pc ... Erfolg cuinj64.pc ... Erfolg curand.pc ... Erfolg cusolver.pc ... Erfolg cusparse.pc ... Erfolg nppc.pc ... Erfolg nppial.pc ... Erfolg nppicc.pc ... Erfolg nppicom.pc ... Erfolg nppidei.pc ... Erfolg nppif.pc ... Erfolg nppig.pc ... Erfolg nppim.pc ... Erfolg nppi.pc ... Erfolg nppist.pc ... Erfolg nppisu.pc ... Erfolg nppitc.pc ... Erfolg npps.pc ... Erfolg nvgraph.pc ... Erfolg nvidia-ml.pc ... Erfolg nvjpeg.pc ... Erfolg nvrtc.pc ... Erfolg nvToolsExt.pc ... Erfolg ==> Entferne existierendes $srcdir/ Verzeichnis... ==> Entpacke Quellen... ==> Beginne prepare()... Creating directory /home/matthias/Downloads/cuda/src ==> Beginne build()... ==> Betrete fakeroot Umgebung... ==> Beginne package_cuda()... ==> Säubere Installation... -> Entferne libtool Dateien... -> Bereinige ungewollte Dateien... -> Komprimiere Man-Pages und Info-Seiten... ==> Prüfe auf Paketierungsprobleme... ==> Erstelle Paket "cuda"... -> Erstelle .PKGINFO Datei... -> Erstelle .BUILDINFO Datei... -> Füge install Datei hinzu... -> Erstelle .MTREE-Datei... -> Komprimiere Paket... ==> Beginne package_cuda-tools()... ==> Säubere Installation... -> Entferne libtool Dateien... -> Bereinige ungewollte Dateien... -> Komprimiere Man-Pages und Info-Seiten... ==> Prüfe auf Paketierungsprobleme... ==> Erstelle Paket "cuda-tools"... -> Erstelle .PKGINFO Datei... -> Erstelle .BUILDINFO Datei... -> Füge install Datei hinzu... -> Erstelle .MTREE-Datei... -> Komprimiere Paket... ==> Verlasse fakeroot Umgebung. ==> Beendete Erstellung: cuda 12.3.0-6 (Mo 27 Nov 2023 16:19:33 CET) ==> Installiere Paketgruppe cuda mit pacman -U... Pakete werden geladen … Abhängigkeiten werden aufgelöst … :: Es stehen 2 Anbieter für java-runtime=8 zur Verfügung: :: Repositorium extra 1) jre8-openjdk :: Repositorium chaotic-aur 2) jre8

Geben Sie eine Zahl ein (Voreinstellung=1): Nach in Konflikt stehenden Paketen wird gesucht …

Paket (4) Neue Version Netto-Veränderung Größe des Downloads

extra/jre8-openjdk 8.392.u08-1 0,40 MiB 0,17 MiB extra/jre8-openjdk-headless 8.392.u08-1 99,39 MiB 28,83 MiB cuda 12.3.0-6 4453,11 MiB cuda-tools 12.3.0-6 2501,96 MiB

Gesamtgröße des Downloads: 29,00 MiB Gesamtgröße der installierten Pakete: 7054,87 MiB

:: Installation fortsetzen? [J/n] :: Pakete werden empfangen … jre8-openjdk-8.392.u08-1-x86_64 173,3 KiB 884 KiB/s 00:00 [------------------------------------] 100% jre8-openjdk-headless-8.392.u08-... 28,8 MiB 9,35 MiB/s 00:03 [------------------------------------] 100% Gesamt (2/2) 29,0 MiB 9,10 MiB/s 00:03 [------------------------------------] 100% (4/4) Schlüssel im Schlüsselbund werden geprüft [------------------------------------] 100% (3/4) Paket-Integrität wird überprüft [------------------------------------] 100% (3/4) Paket-Dateien werden geladen [------------------------------------] 100% (4/4) Auf Dateikonflikte wird geprüft [------------------------------------] 100% (4/4) Verfügbarer Festplattenspeicher wird ermittelt [------------------------------------] 100% :: Pre-transaction-Hooks werden gestartet … (1/1) Performing snapper pre snapshots for the following configurations... ==> root: 37 :: Paketänderungen werden verarbeitet … (1/4) Installiert wird cuda [------------------------------------] 100% The cuda binaries are in /opt/cuda/bin The cuda samples are in /opt/cuda/samples The cuda docs are in /opt/cuda/doc You need to relogin in order for the cuda binaries to appear in your PATH Optionale Abhängigkeiten für cuda gdb: for cuda-gdb glu: required for some profiling tools in CUPTI [Installiert] (2/4) Installiert wird jre8-openjdk-headless [------------------------------------] 100% Default Java environment is already set to 'java-21-openjdk' See 'archlinux-java help' to change it Optionale Abhängigkeiten für jre8-openjdk-headless java-rhino: for some JavaScript support (3/4) Installiert wird jre8-openjdk [------------------------------------] 100% Default Java environment is already set to 'java-21-openjdk' See 'archlinux-java help' to change it when you use a non-reparenting window manager, set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh Optionale Abhängigkeiten für jre8-openjdk icedtea-web: web browser plugin + Java Web Start alsa-lib: for basic sound support [Installiert] gtk2: for the Gtk+ look and feel - desktop usage [Installiert] java8-openjfx: for JavaFX GUI components support (4/4) Installiert wird cuda-tools [------------------------------------] 100% The cuda binaries are in /opt/cuda/bin The cuda samples are in /opt/cuda/samples The cuda docs are in /opt/cuda/doc You need to relogin in order for the cuda binaries to appear in your PATH Optionale Abhängigkeiten für cuda-tools perl: required by some NVVP plugins [Installiert] :: Post-transaction-Hooks werden gestartet … (1/6) Arming ConditionNeedsUpdate... (2/6) Foreign/AUR package notification => No foreign/AUR packages found. (3/6) Orphaned package notification... wayland-protocols 1.32-1 (4/6) Checking for .pacnew and .pacsave files... (5/6) Performing snapper post snapshots for the following configurations... ==> root: 38 (6/6) Syncing all file systems... ./build-ffmpeg: Zeile 872: jq: Kommando nicht gefunden.

Unable to locate the file: /usr/local/cuda/version.json. Line: 875

To report a bug create an issue at: https://github.com/slyfox1186/ffmpeg-build-script/issues

slyfox1186 commented 9 months ago

What you say makes perfect sense to me. I'm pretty sure that I can figure out how to make sure that this doesn't happen in the future. Just give me a little time to make changes. I am very busy. Thank you for bringing it to my attention.

Hubfront commented 9 months ago

Hi slyfox. I manually installed jq and rerun the option 2 (CUDA):

Downloading CUDA SDK Toolkit - version 12.3.1

Schwerwiegend: Zielpfad 'cuda' existiert bereits und ist kein leeres Verzeichnis. ==> Erstelle Paket: cuda 12.3.0-6 (Mo 27 Nov 2023 16:34:00 CET) ==> Prüfe Laufzeit-Abhängigkeiten... ==> Prüfe Buildtime-Abhängigkeiten... ==> Empfange Quellen... -> cuda_12.3.0_545.23.06_linux.run gefunden -> cuda.sh gefunden -> cuda.conf gefunden -> accinj64.pc gefunden -> cublas.pc gefunden -> cuda.pc gefunden -> cudart.pc gefunden -> cufft.pc gefunden -> cufftw.pc gefunden -> cuinj64.pc gefunden -> curand.pc gefunden -> cusolver.pc gefunden -> cusparse.pc gefunden -> nppc.pc gefunden -> nppial.pc gefunden -> nppicc.pc gefunden -> nppicom.pc gefunden -> nppidei.pc gefunden -> nppif.pc gefunden -> nppig.pc gefunden -> nppim.pc gefunden -> nppi.pc gefunden -> nppist.pc gefunden -> nppisu.pc gefunden -> nppitc.pc gefunden -> npps.pc gefunden -> nvgraph.pc gefunden -> nvidia-ml.pc gefunden -> nvjpeg.pc gefunden -> nvrtc.pc gefunden -> nvToolsExt.pc gefunden ==> Überprüfe source Dateien mit sha512sums... cuda_12.3.0_545.23.06_linux.run ... Erfolg cuda.sh ... Erfolg cuda.conf ... Erfolg accinj64.pc ... Erfolg cublas.pc ... Erfolg cuda.pc ... Erfolg cudart.pc ... Erfolg cufft.pc ... Erfolg cufftw.pc ... Erfolg cuinj64.pc ... Erfolg curand.pc ... Erfolg cusolver.pc ... Erfolg cusparse.pc ... Erfolg nppc.pc ... Erfolg nppial.pc ... Erfolg nppicc.pc ... Erfolg nppicom.pc ... Erfolg nppidei.pc ... Erfolg nppif.pc ... Erfolg nppig.pc ... Erfolg nppim.pc ... Erfolg nppi.pc ... Erfolg nppist.pc ... Erfolg nppisu.pc ... Erfolg nppitc.pc ... Erfolg npps.pc ... Erfolg nvgraph.pc ... Erfolg nvidia-ml.pc ... Erfolg nvjpeg.pc ... Erfolg nvrtc.pc ... Erfolg nvToolsExt.pc ... Erfolg ==> Entferne existierendes $srcdir/ Verzeichnis... ==> Entpacke Quellen... ==> Beginne prepare()... Creating directory /home/matthias/Downloads/cuda/src ==> Entferne existierendes $pkgdir/ Verzeichnis... ==> Beginne build()... ==> Betrete fakeroot Umgebung... ==> Beginne package_cuda()... ==> Säubere Installation... -> Entferne libtool Dateien... -> Bereinige ungewollte Dateien... -> Komprimiere Man-Pages und Info-Seiten... ==> Prüfe auf Paketierungsprobleme... ==> Erstelle Paket "cuda"... -> Erstelle .PKGINFO Datei... -> Erstelle .BUILDINFO Datei... -> Füge install Datei hinzu... -> Erstelle .MTREE-Datei... -> Komprimiere Paket... ==> Beginne package_cuda-tools()... ==> Säubere Installation... -> Entferne libtool Dateien... -> Bereinige ungewollte Dateien... -> Komprimiere Man-Pages und Info-Seiten... ==> Prüfe auf Paketierungsprobleme... ==> Erstelle Paket "cuda-tools"... -> Erstelle .PKGINFO Datei... -> Erstelle .BUILDINFO Datei... -> Füge install Datei hinzu... -> Erstelle .MTREE-Datei... -> Komprimiere Paket... ==> Verlasse fakeroot Umgebung. ==> Beendete Erstellung: cuda 12.3.0-6 (Mo 27 Nov 2023 16:35:48 CET) ==> Installiere Paketgruppe cuda mit pacman -U... Pakete werden geladen … Warnung: cuda-12.3.0-6 ist aktuell -- Überspringe Warnung: cuda-tools-12.3.0-6 ist aktuell -- Überspringe Es gibt nichts zu tun

Unable to locate the file: /usr/local/cuda/version.json. Line: 875

Hubfront commented 9 months ago

By the way: cool script. I like your concept of an distribution/architecture agnostic approach.

slyfox1186 commented 9 months ago

By the way: cool script. I like your concept of an distribution/architecture agnostic approach.

I just wanted to say thank you very much for taking a second to tell me that. I rarely get any feedback about how my scripts affect people's lives and if I do my experience has been that it's usually to tell me how bad I am as a coder when the whole time I just thought I was sharing something that I thought would help someone some how some way. Reddit plus another few select popular coding websites can be brutal in feedback, and I do mean BRUTAL sometimes.

So not to get to emotional on you, it was just something that I did not expect to find randomly in my email and it made me feel really good about myself and it has re-energized my confidence in my ability to create scripts that do actually end up having a positive effect on people (whatever the reasons may be).

So again. Thanks for that.

And lastly, I will fix your issue just as soon as I get a moment to breath again lol.

Hubfront commented 9 months ago

I like your helpful and friendly personality :)

I really don't understand the motivation of these rude people on Reddit. They discourage others, maybe they are frustrated and want others to be frustrated too? For the last few months I've been using Windows to compile ffmpeg fdk and use it there. I wanted to use Linux more again and found Garuda to be an interesting distribution. For me Arch is new and in contrast to the Debian derivatives, where compiling ffmpeg is often described and there are also automated scripts, this is not so much the case with Arch. I didn't want to just replace ffmpeg with ffmpeg-fdk as it apparently breaks some packages. And I don't understand AUR yet ;-). I just want to create a static build that I can use locally. I'm glad I found your script.

slyfox1186 commented 9 months ago

I modified a few lines of code. See if you can run the script now!

slyfox1186 commented 9 months ago

If this is still an issue pleae re-open this. Thanks for the feedback!!

Hubfront commented 9 months ago

Hi slyfox,

thank you. Going with option 2 (without CUDA) results in

Unable to locate the file: /usr/local/cuda/version.json. Line: 877

To report a bug create an issue at: https://github.com/slyfox1186/ffmpeg-build-script/issues

Option 1 results in

Downloading CUDA SDK Toolkit - version 12.3.1

==> Erstelle Paket: cuda 12.3.0-6 (Mo 04 Dez 2023 21:07:04 CET) ==> Prüfe Laufzeit-Abhängigkeiten... ==> Prüfe Buildtime-Abhängigkeiten... ==> Empfange Quellen... -> Lade cuda_12.3.0_545.23.06_linux.run herunter... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4158M 100 4158M 0 0 71.5M 0 0:00:58 0:00:58 --:--:-- 73.0M -> cuda.sh gefunden -> cuda.conf gefunden -> accinj64.pc gefunden -> cublas.pc gefunden -> cuda.pc gefunden -> cudart.pc gefunden -> cufft.pc gefunden -> cufftw.pc gefunden -> cuinj64.pc gefunden -> curand.pc gefunden -> cusolver.pc gefunden -> cusparse.pc gefunden -> nppc.pc gefunden -> nppial.pc gefunden -> nppicc.pc gefunden -> nppicom.pc gefunden -> nppidei.pc gefunden -> nppif.pc gefunden -> nppig.pc gefunden -> nppim.pc gefunden -> nppi.pc gefunden -> nppist.pc gefunden -> nppisu.pc gefunden -> nppitc.pc gefunden -> npps.pc gefunden -> nvgraph.pc gefunden -> nvidia-ml.pc gefunden -> nvjpeg.pc gefunden -> nvrtc.pc gefunden -> nvToolsExt.pc gefunden ==> Überprüfe source Dateien mit sha512sums... cuda_12.3.0_545.23.06_linux.run ... Erfolg cuda.sh ... Erfolg cuda.conf ... Erfolg accinj64.pc ... Erfolg cublas.pc ... Erfolg cuda.pc ... Erfolg cudart.pc ... Erfolg cufft.pc ... Erfolg cufftw.pc ... Erfolg cuinj64.pc ... Erfolg curand.pc ... Erfolg cusolver.pc ... Erfolg cusparse.pc ... Erfolg nppc.pc ... Erfolg nppial.pc ... Erfolg nppicc.pc ... Erfolg nppicom.pc ... Erfolg nppidei.pc ... Erfolg nppif.pc ... Erfolg nppig.pc ... Erfolg nppim.pc ... Erfolg nppi.pc ... Erfolg nppist.pc ... Erfolg nppisu.pc ... Erfolg nppitc.pc ... Erfolg npps.pc ... Erfolg nvgraph.pc ... Erfolg nvidia-ml.pc ... Erfolg nvjpeg.pc ... Erfolg nvrtc.pc ... Erfolg nvToolsExt.pc ... Erfolg ==> Entferne existierendes $srcdir/ Verzeichnis... ==> Entpacke Quellen... ==> Beginne prepare()... Creating directory /home/matthias/Downloads/ffmpeg-build-script/cuda/src ==> Beginne build()... ==> Betrete fakeroot Umgebung... ==> Beginne package_cuda()... ==> Säubere Installation... -> Entferne libtool Dateien... -> Bereinige ungewollte Dateien... -> Komprimiere Man-Pages und Info-Seiten... ==> Prüfe auf Paketierungsprobleme... ==> Erstelle Paket "cuda"... -> Erstelle .PKGINFO Datei... -> Erstelle .BUILDINFO Datei... -> Füge install Datei hinzu... -> Erstelle .MTREE-Datei... -> Komprimiere Paket... ==> Beginne package_cuda-tools()... ==> Säubere Installation... -> Entferne libtool Dateien... -> Bereinige ungewollte Dateien... -> Komprimiere Man-Pages und Info-Seiten... ==> Prüfe auf Paketierungsprobleme... ==> Erstelle Paket "cuda-tools"... -> Erstelle .PKGINFO Datei... -> Erstelle .BUILDINFO Datei... -> Füge install Datei hinzu... -> Erstelle .MTREE-Datei... -> Komprimiere Paket... ==> Verlasse fakeroot Umgebung. ==> Beendete Erstellung: cuda 12.3.0-6 (Mo 04 Dez 2023 21:09:33 CET) ==> Installiere Paketgruppe cuda mit pacman -U... Pakete werden geladen … Warnung: cuda-12.3.0-6 ist aktuell -- Überspringe Warnung: cuda-tools-12.3.0-6 ist aktuell -- Überspringe Es gibt nichts zu tun

Unable to locate the file: /usr/local/cuda/version.json. Line: 877

By the way, I did not find a way to reopen the issue.