VOGONS


First post, by nahum

User metadata
Rank Newbie
Rank
Newbie

"Upgrade 2012 DOS MPlayer to Version 1.5"

Hi,
Using the following Hotlinks as a baseline:
link

link

link

Are there any savvy DJGPP coders able to upgrade DOS 2012 mplayer to its present version 1.5, using the following DJGPP cross compiler GCC version 12.2.0 build script from:

link

#!/usr/bin/env bash

# Path to DJGPP cross compiler
export DJGPP_PREFIX="/Users/owner/djcc"
export PATH="$DJGPP_PREFIX/bin:$PATH"

# Your cross compilation target
TARGET_ARCH="$DJGPP_PREFIX/bin/i586-pc-msdosdjgpp"

# Download MPlayer source code
MPLAYER_VERSION="1.5"
MPLAYER_ARCHIVE="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-${MPLAYER_VERSION}.tar.xz"
MPLAYER_SOURCE_DIR="MPlayer-${MPLAYER_VERSION}"

# Download MPlayer source
echo "Downloading MPlayer source..."
wget -c "$MPLAYER_ARCHIVE" || exit 1
tar -xf "MPlayer-${MPLAYER_VERSION}.tar.xz" || exit 1
cd "$MPLAYER_SOURCE_DIR" || exit 1

# configure help
./configure --help >> junkc.hlp 2>&1

# Configure MPlayer for cross-compilation
echo "Configuring MPlayer for cross-compilation..."
./configure --enable-cross-compile \
--cc="${TARGET_ARCH}-gcc" \
--target=i486-DJGPP \
--disable-mencoder \
--enable-static \
--disable-networking \
--disable-dvdnav \
--disable-dvdread \
--disable-cdparanoia \
--disable-x11 \
--disable-alsa \
--disable-arts \
--disable-sdl \
--disable-freetype \
--disable-bluray \
--disable-liba52 \
--disable-libdca \
--disable-mpg123 \
--disable-liba52 \
--disable-libmpeg2 \
--disable-v4l2 \
--disable-joystick \
--disable-dvb \
--disable-xvid \
--disable-x264 \
--disable-vdpau \
--disable-libmpeg2 \
--disable-libvorbis \
--disable-mad \
--disable-x264 \
--disable-xvid \
--disable-inet6 \
--disable-libcdio \
--disable-cddb \
--disable-caca \
Show last 29 lines
    --disable-dvdread \
--disable-dvdnav \
--disable-faad \
--disable-libopenjpeg \
--disable-mpg123 \
--disable-libopus \
--disable-libavcodec_mpegaudio_hp \
> configure.log 2>&1 \
|| exit 1

# Compile MPlayer
echo "Compiling MPlayer..."
gmake > make.log 2>&1 || exit 1

# Test compiler functionality by compiling a hello world program
echo "Compiling hello world program for testing..."
cat > hello.c <<EOF
#include <stdio.h>

int main() {
printf("Hello, world!\\n");
return 0;
}
EOF

"${TARGET_ARCH}-gcc" hello.c -o hello || exit 1

echo "Compilation complete."

Thanks in advance!

Reply 1 of 1, by nahum

User metadata
Rank Newbie
Rank
Newbie

Hi,
After configuring mplayer 1.5 for cross compilation, its gcc 12.2.0 compile stumbled on this common alignment issue:

Users/owner/djcc/bin/i586-pc-msdosdjgpp-gcc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decl […]
Show full quote

Users/owner/djcc/bin/i586-pc-msdosdjgpp-gcc -MMD -MP -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls -Werror=format-security -Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -Werror-implicit-function-declaration -Icompat/atomics/gcc -D_ISOC99_SOURCE -I. -Iffmpeg -O4 -march=i486 -mtune=i486 -pipe -ffast-math -fomit-frame-pointer -fno-tree-vectorize -fno-asynchronous-unwind-tables -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -c -o command.o command.c
In file included from ./m_config.h:22,
from input/input.h:22,
from command.c:28:
./mpmem.h:33:68: error: implicit declaration of function 'FFMIN' [-Werror=implicit-function-declaration]
33 | #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v
| ^~~~~
./m_config.h:48:3: note: in expansion of macro 'DECLARE_ALIGNED'
48 | DECLARE_ALIGNED(8, unsigned char, data)[0];
| ^~~~~~~~~~~~~~~
./m_config.h:48:3: error: requested alignment is not an integer constant
command.c: In function 'mp_property_sub':
command.c22: warning: variable 'reset_spu' set but not used [-Wunused-but-set-variable]
1456 | int source = -1, reset_spu = 0;
| ^~~~~~~~~
cc1: some warnings being treated as errors
gmake: *** [Makefile:730: command.o] Error 1

Are there any proposed upgrade to this issue?
Thanks in advance!