Request for an 'armhf' version (32-bit)

The place to discuss linux version of MakeMKV
tw_psycho
Posts: 9
Joined: Thu Jan 25, 2024 4:55 pm

Re: Request for an 'armhf' version (32-bit)

Post by tw_psycho »

Yeah, sorry I pasted it incorrectly. My makemkvcon says 64-bit:

Code: Select all

pi@raspberrypi:~ $ file /usr/bin/makemkvcon
/usr/bin/makemkvcon: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=0528ed9053ddaf15df8b8a519a3de4834788453c, stripped
bash is 32-bit

Code: Select all

pi@raspberrypi:~ $ file /usr/bin/bash
/usr/bin/bash: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=f12e6d40fb262ad0037b6ec43162208b76d4da71, for GNU/Linux 3.2.0, stripped

I installed the makemkv from viewtopic.php?f=3&t=224 . Perhaps its because incorrect FFmpeg configuration?
I followed those instructions: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

Code: Select all

cd ~/ffmpeg_sources && \
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar xjvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --extra-libs="-lpthread -lm" \
  --ld="g++" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-gnutls \
  --enable-libaom \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libsvtav1 \
  --enable-libdav1d \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-nonfree && \
  [b]--arch=arm [/b]
PATH="$HOME/bin:$PATH" make && \
make install && \
hash -r
I had to add --arch=arm because without that I was getting error during compilation. As I see I didn't have

Code: Select all

-enable-static --disable-shared --enable-pic
Can it be the issue?
Last edited by tw_psycho on Fri Jan 26, 2024 2:40 pm, edited 1 time in total.
tw_psycho
Posts: 9
Joined: Thu Jan 25, 2024 4:55 pm

Re: Request for an 'armhf' version (32-bit)

Post by tw_psycho »

And when I try to use

Code: Select all

./configure --prefix=/tmp/ffmpeg --enable-static --disable-shared --enable-pic
as suggested, I receive when make install:

Code: Select all

CC      libavfilter/vf_curves.o
In file included from ./libavutil/bswap.h:38,
                 from ./libavutil/intreadwrite.h:25,
                 from libavfilter/vf_curves.c:26:
libavfilter/vf_curves.c: In function ‘parse_psfile’:
./libavutil/aarch64/bswap.h:33:5: error: invalid 'asm': invalid operand for code 'w'
   33 |     __asm__("rev16 %w0, %w1" : "=r"(y) : "r"(x));
      |     ^~~~~~~
./libavutil/aarch64/bswap.h:33:5: error: invalid 'asm': invalid operand for code 'w'
./libavutil/aarch64/bswap.h:33:5: error: invalid 'asm': invalid operand for code 'w'
   33 |     __asm__("rev16 %w0, %w1" : "=r"(y) : "r"(x));
      |     ^~~~~~~
./libavutil/aarch64/bswap.h:33:5: error: invalid 'asm': invalid operand for code 'w'
./libavutil/aarch64/bswap.h:33:5: error: invalid 'asm': invalid operand for code 'w'
   33 |     __asm__("rev16 %w0, %w1" : "=r"(y) : "r"(x));
      |     ^~~~~~~
./libavutil/aarch64/bswap.h:33:5: error: invalid 'asm': invalid operand for code 'w'
./libavutil/aarch64/bswap.h:33:5: error: invalid 'asm': invalid operand for code 'w'
   33 |     __asm__("rev16 %w0, %w1" : "=r"(y) : "r"(x));
      |     ^~~~~~~
./libavutil/aarch64/bswap.h:33:5: error: invalid 'asm': invalid operand for code 'w'
make: *** [ffbuild/common.mak:81: libavfilter/vf_curves.o] Error 1
Chewi
Posts: 22
Joined: Sun May 11, 2014 9:24 am
Location: Edinburgh, Scotland

Re: Request for an 'armhf' version (32-bit)

Post by Chewi »

makemkvcon is a pre-built binary. How you build the rest of MakeMKV makes no difference.

You have a 32-bit ARM system, so you need to use the 32-bit ARM makemkvcon under armhf. You have installed the one under arm64. The Makefile calls uname -m to work out which makemkvcon to install, so I guess you have 64-bit hardware and possibly even a 64-bit kernel but with a 32-bit userspace. There's nothing wrong with that, but you still need to use the right binary. Mike should find a better way to perform this detection.
tw_psycho
Posts: 9
Joined: Thu Jan 25, 2024 4:55 pm

Re: Request for an 'armhf' version (32-bit)

Post by tw_psycho »

Chewi wrote:
Fri Jan 26, 2024 3:35 pm
makemkvcon is a pre-built binary. How you build the rest of MakeMKV makes no difference.

You have a 32-bit ARM system, so you need to use the 32-bit ARM makemkvcon under armhf. You have installed the one under arm64. The Makefile calls uname -m to work out which makemkvcon to install, so I guess you have 64-bit hardware and possibly even a 64-bit kernel but with a 32-bit userspace. There's nothing wrong with that, but you still need to use the right binary. Mike should find a better way to perform this detection.
Ok, sorry for my ignorance, but how to pick the right binary?
Chewi
Posts: 22
Joined: Sun May 11, 2014 9:24 am
Location: Edinburgh, Scotland

Re: Request for an 'armhf' version (32-bit)

Post by Chewi »

Just copy makemkv-bin-1.17.6/bin/armhf/makemkvcon to /usr/bin.

Mike, instead of calling uname -m, you could check the output of $(MAKE) --version to see whether it includes x86_64, i?86, aarch64, or armv7.
tw_psycho
Posts: 9
Joined: Thu Jan 25, 2024 4:55 pm

Re: Request for an 'armhf' version (32-bit)

Post by tw_psycho »

Chewi wrote:
Sun Jan 28, 2024 4:59 pm
Just copy makemkv-bin-1.17.6/bin/armhf/makemkvcon to /usr/bin.

Mike, instead of calling uname -m, you could check the output of $(MAKE) --version to see whether it includes x86_64, i?86, aarch64, or armv7.
Thank you! It works, but partially... When there is no drive connected it seems reasonable:

Code: Select all

pi@raspberrypi:~ $ makemkvcon --debug -r --cache=1 info disc:9999
MSG:1005,0,1,"MakeMKV v1.17.6 linux(armhf-release) started","%1 started","MakeMKV v1.17.6 linux(armhf-release)"
MSG:1004,131072,1,"Debug logging enabled, log will be saved as file:///home/pi/MakeMKV_log.txt","Debug logging enabled, log will be saved as %1","file:///home/pi/MakeMKV_log.txt"
MSG:1003,32,3,"DEBUG: Code 0 at %yh|+j,d-!|!Nn^!:213144750","DEBUG: Code %1 at %2:%3","0","%yh|+j,d-!|!Nn^!","213144750"
MSG:5042,0,0,"The program can't find any usable optical drives.","The program can't find any usable optical drives."
DRV:0,256,999,0,"","",""
DRV:1,256,999,0,"","",""
DRV:2,256,999,0,"","",""
DRV:3,256,999,0,"","",""
DRV:4,256,999,0,"","",""
DRV:5,256,999,0,"","",""
DRV:6,256,999,0,"","",""
DRV:7,256,999,0,"","",""
DRV:8,256,999,0,"","",""
DRV:9,256,999,0,"","",""
DRV:10,256,999,0,"","",""
DRV:11,256,999,0,"","",""
DRV:12,256,999,0,"","",""
DRV:13,256,999,0,"","",""
DRV:14,256,999,0,"","",""
DRV:15,256,999,0,"","",""
MSG:1003,32,3,"DEBUG: Code 0 at 2:jNm$O'n4>OH~ymdg_Uw:121265062","DEBUG: Code %1 at %2:%3","0","2:jNm$O'n4>OH~ymdg_Uw","121265062"
MSG:1003,32,3,"DEBUG: Code 233 at 02MEcABhgmhtmhV17Mm0lNMC:0","DEBUG: Code %1 at %2:%3","233","02MEcABhgmhtmhV17Mm0lNMC","0"
MSG:5010,0,0,"Failed to open disc","Failed to open disc"
TCOUNT:0
^C
However when I plug the drive it throws Bus error:

Code: Select all

pi@raspberrypi:~ $ makemkvcon --debug -r --cache=1 info disc:9999
MSG:1005,0,1,"MakeMKV v1.17.6 linux(armhf-release) started","%1 started","MakeMKV v1.17.6 linux(armhf-release)"
MSG:1004,131072,1,"Debug logging enabled, log will be saved as file:///home/pi/MakeMKV_log.txt","Debug logging enabled, log will be saved as %1","file:///home/pi/MakeMKV_log.txt"
MSG:1003,32,3,"DEBUG: Code 0 at J*#Lh*>`xyZt7Hw$tZkF_7:29393631","DEBUG: Code %1 at %2:%3","0","J*#Lh*>`xyZt7Hw$tZkF_7","29393631"
MSG:1003,32,3,"DEBUG: Code 0 at %yh|+j,d-!|!Nn^!:213144750","DEBUG: Code %1 at %2:%3","0","%yh|+j,d-!|!Nn^!","213144750"
Bus error
Any ideas...?
tw_psycho
Posts: 9
Joined: Thu Jan 25, 2024 4:55 pm

Re: Request for an 'armhf' version (32-bit)

Post by tw_psycho »

Ok, I read everything and found no solution. Similar issue is described a few items below: viewtopic.php?f=3&t=33061

I guess it's because my Raspberry Pi OS is 32-bit. The easiest solution is to get the USB drive, install 64-bit system and run makemkv. That works fine.
Chewi
Posts: 22
Joined: Sun May 11, 2014 9:24 am
Location: Edinburgh, Scotland

Re: Request for an 'armhf' version (32-bit)

Post by Chewi »

Bus error is very low level stuff. I am vaguely aware that MakeMKV does some exotic things, so I'm not entirely surprised that 32-on-64 results in this. I imagine this is something Mike could fix. I don't know how common such a setup is. I generally go 64-bit wherever possible.
Post Reply