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

How to build as static lib instead of dynamic? #831

Open
dsync89 opened this issue Aug 7, 2024 · 1 comment
Open

How to build as static lib instead of dynamic? #831

dsync89 opened this issue Aug 7, 2024 · 1 comment

Comments

@dsync89
Copy link

dsync89 commented Aug 7, 2024

I tried using the following, but it still built the .so files instead of .a.

echo "*** Building vaapi ***"
cd $BUILD_DIR/libva*
[ $rebuild -eq 1 -a -f Makefile ] && make distclean || true
mkdir -p build
cd build
meson --default-library=static .. --prefix=$TARGET_DIR --bindir="../bin/" --libdir="$TARGET_DIR/lib"
ninja
ninja install

output

$ ls target/lib
cmake          libdrm_amdgpu.a     libharfbuzz.la  libSDL2.a        libssl.a               libva.so.2.2200.0          libvorbisfile.a   libzimg.la
engines        libdrm_intel.a      libmp3lame.a    libSDL2.la       libswresample.a        libva-wayland.so           libvorbisfile.la  libz.so
libass.a       libdrm_nouveau.a    libmp3lame.la   libSDL2main.a    libswscale.a           libva-wayland.so.2         libvorbis.la      libz.so.1
libass.la      libdrm_radeon.a     libogg.a        libSDL2main.la   libva-drm.so           libva-wayland.so.2.2200.0  libvpx.a          libz.so.1.2.11
libavcodec.a   libfdk-aac.a        libogg.la       libSDL2_test.a   libva-drm.so.2         libva-x11.so               libwebp.a         openjpeg-2.1
libavdevice.a  libfdk-aac.la       libopenjp2.a    libSDL2_test.la  libva-drm.so.2.2200.0  libva-x11.so.2             libwebp.la        pkgconfig
libavfilter.a  libfribidi.a        libopus.a       libsoxr.a        libva-glx.so           libva-x11.so.2.2200.0      libx264.a
libavformat.a  libfribidi.la       libopus.la      libsoxr-lsr.a    libva-glx.so.2         libvidstab.a               libx265.a
libavutil.a    libharfbuzz.a       libpostproc.a   libspeex.a       libva-glx.so.2.2200.0  libvorbis.a                libyasm.a
libcrypto.a    libharfbuzz-icu.a   librist.a       libspeex.la      libva.so               libvorbisenc.a             libz.a
libdrm.a       libharfbuzz-icu.la  librtmp.a       libsrt.a         libva.so.2             libvorbisenc.la            libzimg.a
@dsync89
Copy link
Author

dsync89 commented Aug 7, 2024

Solved by using autogen tool instead of meson.

echo "*** Building vaapi ***"
cd $BUILD_DIR/libva*
[ $rebuild -eq 1 -a -f Makefile ] && make distclean || true
./autogen.sh
./configure --prefix=$TARGET_DIR --disable-shared
make -j $jval
make install

output

$ ls
cmake          libdrm_amdgpu.a     libharfbuzz.la  libSDL2.a        libssl.a               libva-glx.so.2.2200.0      libva-x11.so.2.2200.0  libx264.a
engines        libdrm_intel.a      libmp3lame.a    libSDL2.la       libswresample.a        libva.la                   libvidstab.a           libx265.a
libass.a       libdrm_nouveau.a    libmp3lame.la   libSDL2main.a    libswscale.a           libva.so.2                 libvorbis.a            libyasm.a
libass.la      libdrm_radeon.a     libogg.a        libSDL2main.la   libva.a                libva.so.2.2200.0          libvorbisenc.a         libz.a
libavcodec.a   libfdk-aac.a        libogg.la       libSDL2_test.a   libva-drm.a            libva-wayland.a            libvorbisenc.la        libzimg.a
libavdevice.a  libfdk-aac.la       libopenjp2.a    libSDL2_test.la  libva-drm.la           libva-wayland.la           libvorbisfile.a        libzimg.la
libavfilter.a  libfribidi.a        libopus.a       libsoxr.a        libva-drm.so.2         libva-wayland.so.2         libvorbisfile.la       libz.so
libavformat.a  libfribidi.la       libopus.la      libsoxr-lsr.a    libva-drm.so.2.2200.0  libva-wayland.so.2.2200.0  libvorbis.la           libz.so.1
libavutil.a    libharfbuzz.a       libpostproc.a   libspeex.a       libva-glx.a            libva-x11.a                libvpx.a               libz.so.1.2.11
libcrypto.a    libharfbuzz-icu.a   librist.a       libspeex.la      libva-glx.la           libva-x11.la               libwebp.a              openjpeg-2.1
libdrm.a       libharfbuzz-icu.la  librtmp.a       libsrt.a         libva-glx.so.2         libva-x11.so.2             libwebp.la             pkgconfig

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

No branches or pull requests

1 participant