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

Refactor Dockerfiles #329

Closed
wants to merge 7 commits into from
Closed

Refactor Dockerfiles #329

wants to merge 7 commits into from

Conversation

Gauvino
Copy link
Contributor

@Gauvino Gauvino commented Jan 14, 2024

Refactor dockerfiles for better syntax and removed unused package

@nyanmisaka
Copy link
Member

Please rebase the PR.

@Gauvino
Copy link
Contributor Author

Gauvino commented Jan 29, 2024

@nyanmisaka why is all the building failing cause I don’t think the problem is coming from my PR or I missed something maybe I'm gonna look further when I'm home cause right now I don't have a pc for the week

Dockerfile.in Outdated
ENV CXXFLAGS="-I${TARGET_DIR}/include $CXXFLAGS"
ENV CPPFLAGS="-I${TARGET_DIR}/include $CPPFLAGS"
ENV CFLAGS="-I${TARGET_DIR}/include $CFLAGS"
ENV DEBIAN_FRONTEND=noninteractive \
Copy link
Member

Choose a reason for hiding this comment

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

It seems you can't use the first var in the second var when setting multiple env var in single line. https://stackoverflow.com/a/45529293

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I should revert this and keep env for every single line ?

Copy link
Member

Choose a reason for hiding this comment

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

ENV DEB_BUILD_OPTIONS=noddebs \
    DEBIAN_FRONTEND=noninteractive \
    ARCH=BUILD_ARCHITECTURE \
    GCC_VER=GCC_RELEASE_VERSION \
    LLVM_VER=LLVM_RELEASE_VERSION \
    SOURCE_DIR=/ffmpeg \
    ARTIFACT_DIR=/dist \
    TARGET_DIR=/usr/lib/jellyfin-ffmpeg

ENV DPKG_INSTALL_LIST=${SOURCE_DIR}/debian/jellyfin-ffmpeg6.install \
    PATH=${TARGET_DIR}/bin:${PATH} \
    PKG_CONFIG_PATH=${TARGET_DIR}/lib/pkgconfig:${PKG_CONFIG_PATH} \
    CFLAGS="-I${TARGET_DIR}/include $CFLAGS" \
    CPPFLAGS="-I${TARGET_DIR}/include $CPPFLAGS" \
    CXXFLAGS="-I${TARGET_DIR}/include $CXXFLAGS" \
    LDFLAGS="-Wl,-rpath=${TARGET_DIR}/lib -L${TARGET_DIR}/lib" \
    LD_LIBRARY_PATH=${TARGET_DIR}/lib:${TARGET_DIR}/lib/mfx:${TARGET_DIR}/lib/xorg:${LD_LIBRARY_PATH}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With this changed the script can build ?

Copy link
Member

Choose a reason for hiding this comment

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

Nope. But later build steps would require these envs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't need to change this as it works with the change I made, don't need to separate in two of them

Copy link
Member

Choose a reason for hiding this comment

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

@Gauvino Please refer to the FFBUILD_TOOLCHAIN in this file. It's a copy of https://github.com/BtbN/FFmpeg-Builds, they are more expert on this than me.

ENV FFBUILD_TOOLCHAIN=x86_64-ffbuild-linux-gnu
ENV PATH="/opt/ct-ng/bin:${PATH}" \
FFBUILD_TARGET_FLAGS="--pkg-config=pkg-config --pkg-config-flags=--static --cross-prefix=${FFBUILD_TOOLCHAIN}- --arch=x86_64 --target-os=linux" \
FFBUILD_CROSS_PREFIX="${FFBUILD_TOOLCHAIN}-" \
FFBUILD_RUST_TARGET="x86_64-unknown-linux-gnu" \
FFBUILD_PREFIX=/opt/ffbuild \
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \
PKG_CONFIG=pkg-config \
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig:/opt/ffbuild/share/pkgconfig \
CC="${FFBUILD_TOOLCHAIN}-gcc" \
CXX="${FFBUILD_TOOLCHAIN}-g++" \
LD="${FFBUILD_TOOLCHAIN}-ld" \
AR="${FFBUILD_TOOLCHAIN}-gcc-ar" \
RANLIB="${FFBUILD_TOOLCHAIN}-gcc-ranlib" \
NM="${FFBUILD_TOOLCHAIN}-gcc-nm" \
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -fPIC -DPIC -D_FORTIFY_SOURCE=2 -fstack-protector-strong -pthread" \
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong -Wl,-z,relro,-z,now -pthread -lm" \
STAGE_CFLAGS="-fvisibility=hidden -fno-semantic-interposition" \
STAGE_CXXFLAGS="-fvisibility=hidden -fno-semantic-interposition"

@nyanmisaka
Copy link
Member

@nyanmisaka why is all the building failing cause I don’t think the problem is coming from my PR or I missed something maybe I'm gonna look further when I'm home cause right now I don't have a pc for the week

I can build locally without your PR. Please check it on your side. I'll come back to this next time.

@Gauvino
Copy link
Contributor Author

Gauvino commented Jan 29, 2024

Your building with the script ?
What command do you use ?

@nyanmisaka
Copy link
Member

./build focal arm64

@Gauvino
Copy link
Contributor Author

Gauvino commented Feb 6, 2024

I tried to build everything with different platform and the only problem I see was apt-transport-http being removed

@Gauvino Gauvino requested a review from nyanmisaka February 7, 2024 13:59
@Gauvino
Copy link
Contributor Author

Gauvino commented Feb 11, 2024

@nyanmisaka Does this PR need changed or do you have a problem with it ?

If it is let me know it!

@nyanmisaka
Copy link
Member

@nyanmisaka Does this PR need changed or do you have a problem with it ?

If it is let me know it!

I will take some time to test and will give you the results later.

@Gauvino
Copy link
Contributor Author

Gauvino commented Feb 11, 2024

@nyanmisaka Does this PR need changed or do you have a problem with it ?

If it is let me know it!

I will take some time to test and will give you the results later.

Could you at least approval the action check to see if it's building correctly please

@Gauvino
Copy link
Contributor Author

Gauvino commented Feb 11, 2024

Still failing don’t really know why but I will check when I’m back home

@Gauvino
Copy link
Contributor Author

Gauvino commented Feb 11, 2024

Could you please approval the action please @nyanmisaka

@Gauvino
Copy link
Contributor Author

Gauvino commented Feb 11, 2024

Another time could you please ! @nyanmisaka

@Gauvino Gauvino closed this Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants