Browse Source

Continue build scripts; Fix build on old distros

tags/1.9.8
falkTX 6 years ago
parent
commit
a96a16d728
3 changed files with 61 additions and 6 deletions
  1. +52
    -0
      data/linux/build-all.sh
  2. +6
    -6
      data/linux/build64.sh
  3. +3
    -0
      source/utils/CarlaPipeUtils.cpp

+ 52
- 0
data/linux/build-all.sh View File

@@ -71,6 +71,7 @@ set -e
if [ ! -f /tmp/setup-repo ]; then
apt-get update
apt-get install python-software-properties wget
add-apt-repository ppa:kxstudio-debian/libs
add-apt-repository ppa:kxstudio-debian/toolchain
apt-get update
touch /tmp/setup-repo
@@ -96,6 +97,7 @@ if [ ! -f /tmp/setup-repo-packages ]; then
apt-get install build-essential libglib2.0-dev uuid-dev git-core
apt-get install autoconf libtool
apt-get install bison flex libxml-libxml-perl libxml-parser-perl
apt-get clean
rm /usr/lib/libuuid.so
touch /tmp/setup-repo-packages
fi
@@ -105,6 +107,14 @@ if [ ! -d ${CHROOT_CARLA_DIR} ]; then
chmod -R 777 ${CHROOT_CARLA_DIR}/data/linux/
fi

cd ${CHROOT_CARLA_DIR}
git checkout .
git pull

# might be updated by git pull
chmod 777 ${CHROOT_CARLA_DIR}/data/linux/*.sh
chmod 777 ${CHROOT_CARLA_DIR}/data/linux/common.env

EOF

}
@@ -133,8 +143,19 @@ export LANG=C
export LC_ALL=C
unset LC_TIME

set -e

${CHROOT_CARLA_DIR}/data/linux/build-deps.sh

if [ ! -f /tmp/setup-repo-packages-extra4 ]; then
apt-get install --no-install-recommends libasound2-dev libx11-dev
apt-get install --no-install-recommends libgtk2.0-dev libqt4-dev
apt-get install --no-install-recommends pyqt4-dev-tools python3-pyqt4.qtopengl python3-liblo python3-rdflib
touch /tmp/setup-repo-packages-extra4
fi

# libgtk-3-dev

EOF

}
@@ -146,3 +167,34 @@ export ARCH=64
chroot_build_deps

# ---------------------------------------------------------------------------------------------------------------------
# build carla

chroot_build_carla()
{

CHROOT_DIR=${TARGETDIR}/chroot${ARCH}
cp build${ARCH}.sh common.env ${CHROOT_DIR}${CHROOT_CARLA_DIR}/data/linux/

cat <<EOF | sudo chroot ${CHROOT_DIR}
mount -t proc none /proc/
mount -t sysfs none /sys/
mount -t devpts none /dev/pts
export HOME=/root
export LANG=C
export LC_ALL=C
unset LC_TIME

export RCC_QT4=/usr/bin/rcc
${CHROOT_CARLA_DIR}/data/linux/build${ARCH}.sh

EOF

}

# export ARCH=32
# chroot_build_deps

export ARCH=64
chroot_build_carla

# ---------------------------------------------------------------------------------------------------------------------

+ 6
- 6
data/linux/build64.sh View File

@@ -9,13 +9,13 @@ set -e
# cd to correct path

if [ ! -f Makefile ]; then
cd ../..
cd $(dirname $0)/../..
fi

# ---------------------------------------------------------------------------------------------------------------------
# set variables

source common.env
source data/linux/common.env

MAKE_FLAGS="${MAKE_FLAGS} HAVE_FFMPEG=false HAVE_PULSEAUDIO=false EXTERNAL_PLUGINS=false"

@@ -28,9 +28,9 @@ unset CPPFLAGS
# ---------------------------------------------------------------------------------------------------------------------
# Complete 64bit build

export CFLAGS="-m64"
export CFLAGS="-I${TARGETDIR}/carla64/include -m64"
export CXXFLAGS=${CFLAGS}
export LDFLAGS="-m64"
export LDFLAGS="-L${TARGETDIR}/carla64/lib -m64"
export PKG_CONFIG_PATH=${TARGETDIR}/carla64/lib/pkgconfig

make ${MAKE_FLAGS}
@@ -38,9 +38,9 @@ make ${MAKE_FLAGS}
# ---------------------------------------------------------------------------------------------------------------------
# Build 32bit bridges

export CFLAGS="-m32"
export CFLAGS="-I${TARGETDIR}/carla32/include -m32"
export CXXFLAGS=${CFLAGS}
export LDFLAGS="-m32"
export LDFLAGS="-L${TARGETDIR}/carla32/lib -m32"
export PKG_CONFIG_PATH=${TARGETDIR}/carla32/lib/pkgconfig

make posix32 ${MAKE_FLAGS}


+ 3
- 0
source/utils/CarlaPipeUtils.cpp View File

@@ -43,6 +43,9 @@
# include <sys/wait.h>
# ifdef CARLA_OS_LINUX
# include <sys/prctl.h>
# ifndef F_SETPIPE_SZ
# define F_SETPIPE_SZ 1031
# endif
# endif
#endif



Loading…
Cancel
Save