Skip to content

Instantly share code, notes, and snippets.

@julianscheel
Created October 23, 2013 13:54
Show Gist options
  • Save julianscheel/7119200 to your computer and use it in GitHub Desktop.
Save julianscheel/7119200 to your computer and use it in GitHub Desktop.
cross compile helper scripts for vlc
#!/bin/sh
export SYSROOT=/home/julian/dev/rpi/rpi-buildroot/output/rootfs-debug/staging
export PATH=/home/julian/dev/rpi/ct-ng/host/bin/:$PATH
echo "Build"
make -j9 V=1 || exit 0
echo "Install"
make DESTDIR=$(pwd)/install/ install
#!/bin/sh
PKGCONFIG=/home/julian/dev/rpi/rpi-buildroot/output/rootfs-debug/host/usr/bin/pkg-config
SYSROOT=/home/julian/dev/rpi/rpi-buildroot/output/rootfs-debug/staging
PATH=/home/julian/dev/rpi/ct-ng/host/bin/:$PATH
TOOLCHAIN_PREFIX=arm-buildroot-linux-gnueabi
../configure \
--target=${TOOLCHAIN_PREFIX} --host=${TOOLCHAIN_PREFIX} \
--build=x86_64-unknown-linux-gnu --prefix=/usr --exec-prefix=/usr \
--sysconfdir=/etc --disable-static --enable-shared --disable-rpath \
--enable-run-as-root --disable-a52 --disable-jack --disable-mkv --disable-x264 \
--disable-libass --disable-crystalhd --disable-libva --disable-dca \
--disable-vcdx --disable-lirc --disable-goom --disable-projectm \
--disable-libcddb --disable-dc1394 --disable-bluray --enable-rpi-omxil \
--enable-omxil-deinterlace \
--enable-alsa --disable-directfb --disable-sdl --disable-sdl-image \
--enable-mad --disable-tremor --disable-png \
--disable-postproc --disable-dbus \
--disable-libgcrypt --disable-lua --disable-xcb \
--disable-live555 --without-x --disable-vorbis --disable-theora \
--disable-speex --disable-flac --disable-xvideo --disable-freetype \
--enable-faad --disable-svg --disable-ogg --disable-mux_ogg --disable-glx \
--disable-ncurses --disable-gnomevfs --disable-dvdread \
--disable-dvdnav --disable-gnutls --disable-libmpeg2 --disable-libxml2 \
--disable-pulse --disable-samplerate --disable-taglib --disable-bonjour \
--disable-udev --disable-upnp --disable-opencv --enable-dvbpsi \
--disable-optimize-memory --disable-sout --disable-httpd --disable-vlm \
--disable-screen --disable-vcd --disable-atmo --disable-oss --enable-zvbi \
--enable-vlc --disable-neon --with-sysroot=${SYSROOT} \
PKG_CONFIG=${PKGCONFIG} \
PKG_CONFIG_PATH=${SYSROOT}/usr/lib/pkgconfig \
LDFLAGS="--sysroot ${SYSROOT}" CFLAGS="--sysroot ${SYSROOT} -g2" \
CPPFLAGS="--sysroot ${SYSROOT} -g2" CXXFLAGS="--sysroot ${SYSROOT} -g2"
@jethrogb
Copy link

jethrogb commented Nov 3, 2013

I needed PKG_CONFIG_PATH=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/lib/${TOOLCHAIN_PREFIX}/pkgconfig and PKG_CONFIG_SYSROOT_DIR=${SYSROOT} and LIBS=${SYSROOT}/readlink ${SYSROOT}/usr/lib/${TOOLCHAIN_PREFIX}/libdl.so``

@beligum
Copy link

beligum commented Sep 19, 2014

Julian, I'm trying to cross-compile the latest vlc source tree with the gcc-linaro-arm-linux-gnueabihf-raspbian-x64 toolchain (Ubuntu Trusty x64). This configure scripts helped me a lot. I had to patch a few source files, but now I'm stuck during compilation when the linker tries to find previously compiled shared libraries (eg. libvlccore.so.8).

I wonder if you have some compile logs of how you managed to compile the vlc source tree (or can point me somewhere). Also, I'm happy to share my efforts with you on running VLC on the Pi, since we're using it in a commercial project. I can also invest a little $$ if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment