Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xrdpvr was successfully recompiled at Fedora 35 (ffmpeg 4.4.3) #2478

Open
wants to merge 20 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6f08167
xrdpvr was successfully recompiled at Fedore 35 (ffmpeg 4.4.3)
alexpevzner Dec 18, 2022
5297215
xrdpvr was successfully recompiled at Fedora 35 (ffmpeg 4.4.3)
alexpevzner Dec 18, 2022
6491024
Merge branch 'fix-fedora-build' of github.com:alexpevzner/xrdp into f…
alexpevzner Dec 18, 2022
eeeb020
Merge branch 'fix-fedora-build' of github.com:alexpevzner/xrdp into f…
alexpevzner Dec 18, 2022
f4ed5b8
Merge branch 'fix-fedora-build' of github.com:alexpevzner/xrdp into f…
alexpevzner Dec 18, 2022
1a9f816
Code formatting fixed
alexpevzner Dec 18, 2022
25aa39d
Code formatting fixed
alexpevzner Dec 19, 2022
638fcc9
Formatting fixed, comments updated a bit
alexpevzner Dec 19, 2022
21c8c71
Fixed ffmpeg dependencies
alexpevzner Dec 19, 2022
c0bf382
Added dependency on libavcodec58:i386 and libavformat58:i386
alexpevzner Dec 19, 2022
5dac524
Added dependency on libglib2.0-0:i386 and librsvg2-2:i386
alexpevzner Dec 19, 2022
1da948b
Attepmt to fix dependency auto-resolving by adding apt-get -f option
alexpevzner Dec 19, 2022
fe77cb6
More dependency tweaks
alexpevzner Dec 19, 2022
451bf5b
Enabled -oDebug::pkgProblemResolver=1
alexpevzner Dec 19, 2022
4f0ebb5
DEBUG_OPTS fixed
alexpevzner Dec 19, 2022
bc745fb
Check for ffmpeg libraries only when /configure --enable-xrdpvr
alexpevzner Dec 19, 2022
8c72dfd
Fixed -Werror=sign-compare error when compiling with CC=g++
alexpevzner Dec 22, 2022
472522a
xrdpvr enabled in the CI build at amd64
alexpevzner Dec 22, 2022
01dc73f
Set CC=gcc if CC == "g++" temporary for AC_CHECK_LIB tests in the con…
alexpevzner Dec 22, 2022
8bc4eaf
Latest patch explained in the configure.ac comments
alexpevzner Dec 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
--disable-pixman"
CONF_FLAGS_amd64_max: "--enable-ipv6 --enable-jpeg --enable-fuse --enable-mp3lame
--enable-fdkaac --enable-opus --enable-rfxcodec --enable-painter
--enable-pixman --with-imlib2 --with-freetype2"
--enable-pixman --enable-xrdpvr --with-imlib2 --with-freetype2"
CONF_FLAGS_i386_max: "--enable-ipv6 --enable-jpeg --enable-mp3lame
--enable-opus --enable-rfxcodec --enable-painter
--disable-pixman --with-imlib2 --with-freetype2
Expand Down
49 changes: 49 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,55 @@ if test "x$enable_strict_locations" != "xyes"; then
localstatedir="/var";
fi

# checking for ffmpeg-devel
if test "x$enable_xrdpvr" = xyes; then
save_CC="$CC"

# For some strange reason, at Ubuntu 20.04 g++ compiles conftest.c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest you remove the "for some strange reason". The actual reason is that the functions are not wrapped in a extern "C" wrapper, so the C++ compiler will mangle them. See this link for more explanation.

# as if it were a c++ program, with c++ mangling, which causes
# some AC_CHECK_LIB tests to fail
#
# So here we implement an ugly workaround by temporary replacing
# CC="g++" with CC="gcc", only for tests
if test "x$CC" = "xg++"; then
CC="gcc"
fi

PKG_CHECK_MODULES([LIBAV], libavformat libavcodec, [],
[AC_MSG_ERROR([please install libavcodec-dev libavformat-dev or ffmpeg-devel])])

AC_CHECK_LIB(avformat, avformat_open_input,
AC_DEFINE([HAVE_AVFORMAT_OPEN_INPUT], 1,
[Use avformat_open_input instead of av_open_input_file], []))

AC_CHECK_LIB(avformat, avformat_close_input,
AC_DEFINE([HAVE_AVFORMAT_CLOSE_INPUT], 1,
[Use avformat_close_input instead of av_close_input_file], []))

AC_CHECK_LIB(avformat, avformat_find_stream_info,
AC_DEFINE([HAVE_AVFORMAT_FIND_STREAM_INFO], 1,
[Use avformat_find_stream_info instead of av_find_stream_info], []))

AC_CHECK_LIB(avcodec, avcodec_open2,
AC_DEFINE([HAVE_AVCODEC_OPEN2], 1,
[Use avcodec_open2 instead of avcodec_open], []))

AC_CHECK_LIB(avcodec, av_destruct_packet,
AC_DEFINE([HAVE_AV_DESTRUCT_PACKET], 1,
[av_destruct_packet is available], []))

save_CFLAGS="$CFLAGS"
CFLAGS="$LIBAV_CFLAGS"
AC_CHECK_DECLS(AV_CODEC_ID_AAC,,, [#include <libavcodec/avcodec.h>])
AC_CHECK_DECLS(AV_CODEC_ID_H264,,, [#include <libavcodec/avcodec.h>])
AC_CHECK_DECLS(AVMEDIA_TYPE_AUDIO,,, [#include <libavcodec/avcodec.h>])
AC_CHECK_DECLS(AVMEDIA_TYPE_VIDEO,,, [#include <libavcodec/avcodec.h>])
AC_CHECK_DECLS(AV_PKT_FLAG_KEY,,, [#include <libavcodec/avcodec.h>])

CFLAGS="$save_CFLAGS"
CC="$save_CC"
fi

PKG_INSTALLDIR

AC_CHECK_HEADERS([sys/prctl.h])
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_xrdp_build_dependencies_with_apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ in
PACKAGES="$PACKAGES \
$PACKAGES_AMD64_MIN
$LIBFREETYPE_DEV \
libavcodec-dev \
libavformat-dev \
libfuse-dev \
libjpeg-dev \
libmp3lame-dev \
Expand Down
7 changes: 7 additions & 0 deletions xrdpvr/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/xrdpapi \
$(LIBAV_CFLAGS)

module_LTLIBRARIES = \
libxrdpvr.la

libxrdpvr_la_SOURCES = \
xrdpvr.c \
xrdpvr.h \
xrdpvr_internal.h

libxrdpvr_la_LIBADD = \
$(LIBAV_LIBS)
Loading