From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,MIME_HTML_MOSTLY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3E2FC48BE6 for ; Wed, 16 Jun 2021 06:49:49 +0000 (UTC) Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13610611CE for ; Wed, 16 Jun 2021 06:49:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13610611CE Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.lttng.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lttng-dev-bounces@lists.lttng.org Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4G4bQY0ntMzHJ8; Wed, 16 Jun 2021 02:49:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1623826182; bh=JdabV42LN5NBSTwhg7gHkiw2U6jrw/KL1n1Q1YWvKmM=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=TiW4T52sXtoc1q5LeUgST5rUsnEyJB8Qn3wU0CdqfWRCHqU/EmzhHi5ahiOhef0wa yniZJVf6FDsAjrz42EVL9wojTf7H+xIOaNT7kjMu/mkgA/0Am8i0sjiblMl1D6rYMv +ZMtK3hxFV9EhYVu8xIwg5ey6pgT+W6uo/TMXGbAx13kAfQZ+4Zju/SuOQ3t6lm0f0 ZrxjZH+ZHxGHH9RHDwaYxd2ktw/APZt4lu8Gp59JSNu2x0eKPoTM1/5jSRwaxjCQ/i 5v0VL6OHW8RHU/2TqVW3jH1AY5bw1BmR5hswF1DyH5YcOFlanfPDOh2fI1ag4F1QIk 5xNXYQ9m6UCMQ== Received: from smtp.avcs-au.com (unknown [144.130.96.35]) by lists.lttng.org (Postfix) with SMTP id 4G4bQV47gvzHJC for ; Wed, 16 Jun 2021 02:49:38 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by pac.avcs-au.com (Postfix) with ESMTP id 6790411A7133 for ; Wed, 16 Jun 2021 16:49:18 +1000 (AEST) X-Virus-Scanned: amavisd-new at avcs-au.com Received: from smtp.avcs-au.com ([127.0.0.1]) by localhost (smtp.avcs-au.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7p1fJbutrDJb for ; Wed, 16 Jun 2021 16:48:52 +1000 (AEST) Received: from HPOmenPAC (unknown [192.168.100.145]) by smtp.avcs-au.com (Postfix) with ESMTP id 18C9C11A5585 for ; Wed, 16 Jun 2021 16:48:52 +1000 (AEST) To: Date: Wed, 16 Jun 2021 16:49:00 +1000 Message-ID: <000a01d7627b$b01032b0$10309810$@triplanets.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: Addie4Sj+TGmPgrHS+GUDO2GtZCxew== Content-Language: en-au Subject: [lttng-dev] Problems cross compiling LTTNG X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Merlin via lttng-dev Reply-To: public@triplanets.com Content-Type: multipart/mixed; boundary="===============4715336618880944799==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" This is a multipart message in MIME format. --===============4715336618880944799== Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01D762CF.81BEDAC0" Content-Language: en-au This is a multipart message in MIME format. ------=_NextPart_000_000B_01D762CF.81BEDAC0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I am having problems cross compiling LTTNG for the ARM platform. Everything compiles fine, except the TOOLS. The error I am getting is: libtool: warning: library '/home/USER/work/LTTNG/sysroot/usr/local/lib/liburcu.la' was moved. /bin/grep: /usr/local/lib/liburcu-common.la: No such file or directory /bin/sed: can't read /usr/local/lib/liburcu-common.la: No such file or directory libtool: error: '/usr/local/lib/liburcu-common.la' is not a valid libtool archive Makefile:547: recipe for target 'libhashtable.la' failed make[3]: *** [libhashtable.la] Error 1 make[3]: Leaving directory '/home/USER/work/LTTNG/builds/lttng-tools/src/common/hashtable' Makefile:955: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/home/USER/work/LTTNG/builds/lttng-tools/src/common' Makefile:551: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/USER/work/LTTNG/builds/lttng-tools/src' Makefile:661: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1 It is looking for "/usr/local/lib/libiconv.la" when it should be looking for "/home/USER/work/LTTNG/sysroot /usr/local/lib/libiconv.la" which is where the builds are being installed. In desperation I tried setting -with-sysroot in the configuration step to the appropriate directory but it made no difference. My build scripts seem okay but maybe I am missing something obvious. I also tried a couple of other build scripts that were on the web as examples of cross compiling LTTNG with similar results, so I wonder if the build environment I am using is a little "different", but I have no control over that. This is the script that I am using. It is based on one that was posted as a successful example of cross compiling LTTNG, and I have made some changes for my environment. Works well for everything except the tools. All suggestions on where the problem lies are welcome. #!/bin/bash # set your base directory BASEDIR=/home/USER/work/LTTNG # set your system root path SYSROOT=$BASEDIR/sysroot # export symlink to the real arm gcc export HOST=arm-cortex_a8-linux export CC="/home/USER/bin/${HOST}-gcc" # set your kernel build path (you will need to symlink the includes into this) G_KERNELDIR=/home/USER/work/linux/build-2605246 # set the support library versions to build LIBICONV_VERSION=1.16 LIBUUID_VERSION=1.0.3 LIBXML2_VERSION=2.9.9 POPT_VERSION=1.16 ZLIB_VERSION=1.2.11 ####################################################### # # YOU SHOULD NOT NEED TO ALTER ANYTHING BELOW THIS LINE # ####################################################### # change your flags here export ac_cv_func_malloc_0_nonnull=yes export ac_cv_func_realloc_0_nonnull=yes G_PREFIX=/usr/local export PKG_CONFIG_PATH=${SYSROOT}${G_PREFIX}/lib/pkgconfig export CPPFLAGS="-I${SYSROOT}${G_PREFIX}/include" export LDFLAGS="-L${SYSROOT}${G_PREFIX}/lib -Wl,-rpath-link=${SYSROOT}${G_PREFIX}/lib" export LT_SYS_LIBRARY_PATH="${SYSROOT}${G_PREFIX}/lib" G_ARCH=arm G_CROSS_COMPILE=arm- # tracking download/compile steps G_CFG_FILE="$PWD/${0%\.*}.conf" # other directories G_TARBALL_DIR=$PWD/tarballs G_SOURCES_DIR=$PWD/sources G_BUILD_DIR=$PWD/builds # steps for tracking progress in $G_CFG_FILE step_start=0 step_download=1 step_compile=2 echo echo "This script will compile and install lttng and some deps" echo "Building for HOST=${HOST}" echo echo "Builds are located in $G_BUILD_DIR" echo "Sources are located in $G_SOURCES_DIR" echo "Tarballs are located in $G_TARBALL_DIR" echo "sysroot is located at ${SYSROOT}" echo "prefix is set to $G_PREFIX" echo echo "press Enter to continue or CRTL-C to abort" read [ -e "$G_CFG_FILE" ] && . "$G_CFG_FILE" &> /dev/null function get_src_dir() { local filename="$1" tar -tf "$G_TARBALL_DIR/$filename"| sed -e 's@/.*@@' | uniq } function build() { local filename="$1" local what="$2" local dir_name="$3" local state="$4" local do_bootstrap=$5 if [ $state -eq $step_download ] ; then if $do_bootstrap ; then pushd $G_SOURCES_DIR/$dir_name ./bootstrap popd fi mkdir -p "$G_BUILD_DIR/$dir_name" pushd "$G_BUILD_DIR/$dir_name" if [ -n "$patch" ] ; then pushd "$G_SOURCES_DIR/$dir_name" wget $patch -O- | patch -p1 popd fi "$G_SOURCES_DIR/$dir_name"/configure --host=${HOST} --prefix=${G_PREFIX} ${EXTRA_CONF} --enable-shared if [ -n ${COPY_MAKEFILE} ] ; then # this hack in necessary because the tests do not compile in our build environment cp -f $BASEDIR/mtmake ${COPY_MAKEFILE} fi make -j3 \ && make install DESTDIR=${SYSROOT} \ && echo "$what=$step_compile" >> $G_CFG_FILE popd fi if [ $state -eq $step_compile ] ; then echo ">> $what is already compiled" fi } function download() { local url="$1" local what="$2" local filename="$3" local state="$4" if [ $state -lt $step_download ] ; then wget "$url" -O "$G_TARBALL_DIR/$filename" echo "$what=$step_download" >> $G_CFG_FILE tar -C $G_SOURCES_DIR -xf "$G_TARBALL_DIR/$filename" . "$G_CFG_FILE" &> /dev/null fi } function download_git() { local url="$1" local what="$2" local filename="$3" local state="$4" if [ $state -lt $step_download ] ; then pushd $G_SOURCES_DIR git clone $url popd echo "$what=$step_download" >> $G_CFG_FILE . "$G_CFG_FILE" &> /dev/null fi } function init() { local what="$1" eval state=\$$what if [ ! -n "$state" ] ; then echo "$what=$step_start" >> $G_CFG_FILE . "$G_CFG_FILE" &> /dev/null fi eval state=\$$what } function get_em() { local url="$1" local what="$2" local filename=$(basename $url) init "$what" download "$url" "$what" $filename $state eval state=\$$what local dir_name=$(get_src_dir $filename) build $filename "$what" $dir_name $state false } function get_em_git() { local url="$1" local what="$2" local do_bootstrap="$3" local filename=$(basename $url) filename=${filename/.git} init "$what" download_git "$url" "$what" $filename $state eval state=\$$what build $filename "$what" $filename $state $do_bootstrap } echo "create directories" mkdir -p "$G_TARBALL_DIR" "$G_SOURCES_DIR" "$G_BUILD_DIR" &>/dev/null ######################## # define the packages we want to compile ######################## # this are the dependencies that are missing for our sysroot # we will compile them and install the to the ${SYSROOT} # # --- BEGIN --- dependencies what=libuuid url=http://downloads.sourceforge.net/project/libuuid/libuuid-$LIBUUID_VERSIO N.tar.gz get_em $url "$what" what=libiconv url=https://ftp.gnu.org/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz get_em $url "$what" unset patch what=zlib url=https://zlib.net/zlib-$ZLIB_VERSION.tar.gz init "$what" filename=$(basename $url) download "$url" "$what" $filename $state if [ $state -eq $step_compile ] ; then echo ">> $what is already compiled" else dir_name=$(get_src_dir $filename) pushd $G_SOURCES_DIR/$dir_name LDSHARED="$CC -shared -Wl,-soname,libz.so.1" \ ./configure --shared --prefix="${G_PREFIX}" make \ && make install prefix="${G_PREFIX}" DESTDIR=${SYSROOT} \ && echo "$what=$step_compile" >> $G_CFG_FILE popd fi what=libxml2 url=ftp://xmlsoft.org/libxml2/libxml2-sources-$LIBXML2_VERSION.tar.gz EXTRA_CONF="--without-python" get_em $url "$what" unset EXTRA_CONF export libxml2_CFLAGS="-I${SYSROOT}${G_PREFIX}/include/libxml2" export libxml2_LIBS="L${SYSROOT}${G_PREFIX}/lib -lxml2 -lpthread -lm -lz" what=popt url=ftp://anduin.linuxfromscratch.org/BLFS/svn/p/popt-$POPT_VERSION.tar.gz get_em $url "$what" export POPT_LIBS="-L${SYSROOT}${G_PREFIX}/lib -lpopt" # --- END --- dependencies ####################### # compile lttng related packages and install into ${SYSROOT} what=userspace_rcu url=git://git.lttng.org/userspace-rcu.git get_em_git $url "$what" true export URCU_BP_CFLAGS="-I${SYSROOT}${G_PREFIX}/include" export URCU_BP_LIBS="-L${SYSROOT}${G_PREFIX}/lib -lurcu-common -lurcu-bp" export URCU_CDS_CFLAGS="-I${SYSROOT}${G_PREFIX}/include" export URCU_CDS_LIBS="-L${SYSROOT}${G_PREFIX}/lib -lurcu-common -lurcu-cds" export URCU_CFLAGS="-I${SYSROOT}${G_PREFIX}/include/urcu" export URCU_LIBS="-L${SYSROOT}${G_PREFIX}/lib -lurcu-common -lurcu -lurcu-cds" export CPPFLAGS="-I${SYSROOT}${G_PREFIX}/include -I${SYSROOT}${G_PREFIX}/include/urcu" what=lttng_ust url=git://git.lttng.org/lttng-ust.git EXTRA_CONF="--disable-maintainer-mode --disable-examples --disable-man-pages" COPY_MAKEFILE="$BASEDIR/builds/lttng-ust/tests/Makefile" get_em_git $url "$what" true unset COPY_MAKEFILE unset EXTRA_CONF export UST_LIBS="-L${SYSROOT}${G_PREFIX}/lib -llttng-ust -llttng-ust-common -ldl" # fix the paths in the la files #for FILE in $(find ${SYSROOT}${G_PREFIX}/lib -type f -name "*.la") ; do # sed -i "s^-L/home/USER/work/LTTNG/sysroot/usr/local/lib /usr/local/lib^-L/home/USER/work/LTTNG/sysroot/usr/local/lib /home/USER/work/LTTNG/sysroot/usr/local/lib^" ${FILE} #done what=lttng_tools url=git://git.lttng.org/lttng-tools.git EXTRA_CONF="--disable-maintainer-mode --disable-man-pages --disable-static --with-sessiond-bin=/mnt/sd1/modulesLTTNG/lttng/usr/local/bin/lttng-sessiond " COPY_MAKEFILE="${BASEDIR}/builds/lttng-tools/tests/Makefile" get_em_git $url "$what" true unset COPY_MAKEFILE unset EXTRA_CONF what=lttng_modules url=git://git.lttng.org/lttng-modules.git init "$what" filename=$(basename $url) filename=${filename/.git} download_git "$url" "$what" $filename $state if [ $state -eq $step_compile ] ; then echo ">> $what is already compiled" else #dir_name=$(get_src_dir $filename) pushd $G_SOURCES_DIR/$filename make ARCH=$G_ARCH CROSS_COMPILE=$G_CROSS_COMPILE KERNELDIR=$G_KERNELDIR -j4 \ && make ARCH=$G_ARCH CROSS_COMPILE=$G_CROSS_COMPILE KERNELDIR=$G_KERNELDIR INSTALL_MOD_PATH=${SYSROOT} modules_install \ && echo "$what=$step_compile" >> $G_CFG_FILE popd fi echo echo "INFO: the build progress for all packages is tracked in $G_CFG_FILE" ------=_NextPart_000_000B_01D762CF.81BEDAC0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I am having problems cross compiling LTTNG for the ARM = platform.  Everything compiles fine, except the = TOOLS.

 

The error I am getting is:

 

libtool: warning: library = '/home/USER/work/LTTNG/sysroot/usr/local/lib/liburcu.la' was = moved.

/bin/grep: = /usr/local/lib/liburcu-common.la: No such file or = directory

/bin/sed: can't read = /usr/local/lib/liburcu-common.la: No such file or = directory

libtool:   error: = '/usr/local/lib/liburcu-common.la' is not a valid libtool = archive

Makefile:547: recipe for = target 'libhashtable.la' failed

make[3]: *** [libhashtable.la] Error = 1

make[3]: Leaving directory = '/home/USER/work/LTTNG/builds/lttng-tools/src/common/hashtable'

Makefile:955: recipe for target = 'all-recursive' failed

make[2]: *** = [all-recursive] Error 1

make[2]: = Leaving directory = '/home/USER/work/LTTNG/builds/lttng-tools/src/common'

Makefile:551: recipe for target 'all-recursive' = failed

make[1]: *** [all-recursive] = Error 1

make[1]: Leaving directory = '/home/USER/work/LTTNG/builds/lttng-tools/src'

Makefile:661: recipe for target 'all-recursive' = failed

make: *** [all-recursive] = Error 1

 

It is looking for = “/usr/local/lib/libiconv.la” when it should be looking for = “/home/USER/work/LTTNG/sysroot /usr/local/lib/libiconv.la” = which is where the builds are being installed.

 

In desperation I tried setting = –with-sysroot in the configuration step to the appropriate = directory but it made no difference.

 

My build scripts seem okay but = maybe I am missing something obvious.  I also tried a couple of = other build scripts that were on the web as examples of cross compiling = LTTNG with similar results, so I wonder if the build environment I am = using is a little “different”, but I have no control over = that.

 

This is the script that I am using.  It is based on = one that was posted as a successful example of cross compiling LTTNG, = and I have made some changes for my environment.  Works well for = everything except the tools.

 

All suggestions on where the = problem lies are welcome.

 

#!/bin/bash

 

# set your = base directory

BASEDIR=3D/home/USER/work/LTTNG

 

# set your = system root path

SYSROOT=3D$BASEDIR/sysroot

 

# export = symlink to the real arm gcc

export = HOST=3Darm-cortex_a8-linux

export = CC=3D"/home/USER/bin/${HOST}-gcc"

 

# set your = kernel build path (you will need to symlink the includes into = this)

G_KERNELDIR=3D/home/USER/work/linux/build-2605246<= /o:p>

 

# set the support library versions to build =

LIBICONV_VERSION=3D1.16     &n= bsp;           &nb= sp;           =             &= nbsp;     

LIBUUID_VERSION=3D1.0.3

LIBXML2_VERSION=3D2.9.9

POPT_VERSION=3D1.16

ZLIB_VERSION=3D1.2.11

 

#######################################################=

#

# YOU SHOULD NOT NEED TO ALTER ANYTHING BELOW THIS = LINE

#

#######################################################=

 

# change your flags here

export = ac_cv_func_malloc_0_nonnull=3Dyes

export = ac_cv_func_realloc_0_nonnull=3Dyes

 

G_PREFIX=3D/usr/local

 

export = PKG_CONFIG_PATH=3D${SYSROOT}${G_PREFIX}/lib/pkgconfig

export = CPPFLAGS=3D"-I${SYSROOT}${G_PREFIX}/include"

export LDFLAGS=3D"-L${SYSROOT}${G_PREFIX}/lib = -Wl,-rpath-link=3D${SYSROOT}${G_PREFIX}/lib"

export = LT_SYS_LIBRARY_PATH=3D"${SYSROOT}${G_PREFIX}/lib"

 

G_ARCH=3Darm

G_CROSS_COMPILE=3Darm-

 

# tracking = download/compile steps

G_CFG_FILE=3D"$PWD/${0%\.*}.conf"<= /p>

 

# = other directories

G_TARBALL_DIR=3D$PWD/tarballs

G_SOURCES_DIR=3D$PWD/sources

G_BUILD_DIR=3D$PWD/builds

 

# steps for = tracking progress in $G_CFG_FILE

step_start=3D0

step_download=3D1

step_compile=3D2

 

echo

echo = "This script will compile and install lttng and some = deps"

echo "Building for = HOST=3D${HOST}"

echo

echo = "Builds are located in $G_BUILD_DIR"

echo "Sources are located in = $G_SOURCES_DIR"

echo = "Tarballs are located in $G_TARBALL_DIR"

echo "sysroot is located at = ${SYSROOT}"

echo "prefix is = set to $G_PREFIX"

echo

echo = "press Enter to continue or CRTL-C to abort"

read

 

[ -e = "$G_CFG_FILE" ] && . "$G_CFG_FILE" &> = /dev/null

 

function get_src_dir()

{

    local = filename=3D"$1"

    tar -tf = "$G_TARBALL_DIR/$filename"| sed -e 's@/.*@@' | = uniq

}

 

function = build()

{

    local = filename=3D"$1"

    local = what=3D"$2"

    local = dir_name=3D"$3"

    local = state=3D"$4"

    local = do_bootstrap=3D$5

 

    if [ $state -eq $step_download ] ; = then

 

        if = $do_bootstrap ; then

         &= nbsp;  pushd $G_SOURCES_DIR/$dir_name

         &= nbsp;  ./bootstrap

         &= nbsp;  popd

        = fi

 

        mkdir -p = "$G_BUILD_DIR/$dir_name"       =

        pushd = "$G_BUILD_DIR/$dir_name"      =

        if [ = -n "$patch" ] ; then

         &= nbsp;  pushd = "$G_SOURCES_DIR/$dir_name"      =   

         &= nbsp;  wget $patch -O- | patch -p1

         &= nbsp;  popd

        = fi

        = "$G_SOURCES_DIR/$dir_name"/configure --host=3D${HOST} = --prefix=3D${G_PREFIX} ${EXTRA_CONF} --enable-shared

        if [ -n = ${COPY_MAKEFILE} ] ; then

        =        # this hack in necessary because = the tests do not compile in our build environment

        =        cp -f $BASEDIR/mtmake = ${COPY_MAKEFILE}

        = fi

        make -j3 = \

          = && make install DESTDIR=3D${SYSROOT} \

         &= nbsp;  && echo "$what=3D$step_compile" >> = $G_CFG_FILE

        = popd

=    fi

    if [ $state -eq $step_compile ] ; = then

        echo = ">> $what is already compiled"

    fi

}

 

function = download()

{

    local = url=3D"$1"

    local = what=3D"$2"

    local = filename=3D"$3"

    local = state=3D"$4"

 

    if [ $state -lt $step_download ] ; = then

        wget = "$url" -O = "$G_TARBALL_DIR/$filename"

        echo = "$what=3D$step_download" >> $G_CFG_FILE

        tar -C = $G_SOURCES_DIR -xf "$G_TARBALL_DIR/$filename"

        . = "$G_CFG_FILE" &> /dev/null

    fi

}

 

function = download_git()

{

    local = url=3D"$1"

    local = what=3D"$2"

    local = filename=3D"$3"

    local = state=3D"$4"

 

    if [ $state -lt $step_download ] ; = then

 

        pushd = $G_SOURCES_DIR

        git clone = $url

        = popd

        echo = "$what=3D$step_download" >> $G_CFG_FILE

        . = "$G_CFG_FILE" &> /dev/null

    fi

}

 

function = init()

{

    local = what=3D"$1"

    eval = state=3D\$$what

 

    if [ ! -n "$state" ] ; = then

        echo = "$what=3D$step_start" >> $G_CFG_FILE

        . = "$G_CFG_FILE" &> /dev/null

    fi

 

    eval = state=3D\$$what

}

 

function = get_em()

{

    local = url=3D"$1"

    local = what=3D"$2"

    local filename=3D$(basename $url) =

 

    init = "$what"

    = download "$url" "$what" $filename = $state

    eval = state=3D\$$what

    = local dir_name=3D$(get_src_dir $filename)

    build $filename "$what" = $dir_name $state false

}

 

function = get_em_git()

{

    local = url=3D"$1"

    local = what=3D"$2"

    local = do_bootstrap=3D"$3"

    local filename=3D$(basename $url) =

    filename=3D${filename/.git}

 

    init = "$what"

    = download_git "$url" "$what" $filename = $state

    eval = state=3D\$$what

 

    build $filename "$what" = $filename $state $do_bootstrap

}

 

echo = "create directories"

mkdir = -p "$G_TARBALL_DIR" "$G_SOURCES_DIR" = "$G_BUILD_DIR" &>/dev/null

 

 

########################

# define the packages we want to = compile

########################

 

# this are = the dependencies that are missing for our sysroot

# we will compile them and install the to the = ${SYSROOT}

#

# --- BEGIN --- dependencies

what=3Dlibuuid

url=3Dhttp://downloads.sourceforge.net/project/libuuid/= libuuid-$LIBUUID_VERSION.tar.gz

get_em $url "$what"

 

what=3Dlibiconv

url=3Dhttps://ftp.gnu.org/gnu/libiconv/libiconv-$LIBICO= NV_VERSION.tar.gz

get_em $url = "$what"

unset = patch

 

what=3Dzlib

url=3Dhttps://zlib.net/zlib-$ZLIB_VERSION.tar.gz

init "$what"

filename=3D$(basename $url)   =

download "$url" = "$what" $filename $state

if = [ $state -eq $step_compile ] ; then

    echo ">> $what is = already compiled"

else

    dir_name=3D$(get_src_dir = $filename)

    pushd = $G_SOURCES_DIR/$dir_name

    LDSHARED=3D"$CC -shared = -Wl,-soname,libz.so.1" \

    ./configure --shared = --prefix=3D"${G_PREFIX}"

    make \

      && make install = prefix=3D"${G_PREFIX}" DESTDIR=3D${SYSROOT} \

        && = echo "$what=3D$step_compile" >> = $G_CFG_FILE

    = popd

fi

 

what=3Dlibxml2

url=3Dftp://xmlsoft.org/libxml2/libxml2-sources-$LIBXML= 2_VERSION.tar.gz

EXTRA_CONF=3D"--without-python"

get_em $url "$what"

unset EXTRA_CONF

export = libxml2_CFLAGS=3D"-I${SYSROOT}${G_PREFIX}/include/libxml2"=

export = libxml2_LIBS=3D"L${SYSROOT}${G_PREFIX}/lib -lxml2 -lpthread -lm = -lz"

 

what=3Dpopt

url=3Dftp://anduin.linuxfromscratch.org/BLFS/svn/p/popt= -$POPT_VERSION.tar.gz

get_em $url = "$what"

export = POPT_LIBS=3D"-L${SYSROOT}${G_PREFIX}/lib = -lpopt"

 

# --- END --- dependencies

 

 

#######################

# compile lttng related packages and install into = ${SYSROOT}

what=3Duserspace_rcu

url=3Dgit://git.lttng.org/userspace-rcu.git<= /p>

get_em_git $url "$what" = true

export = URCU_BP_CFLAGS=3D"-I${SYSROOT}${G_PREFIX}/include"

export = URCU_BP_LIBS=3D"-L${SYSROOT}${G_PREFIX}/lib -lurcu-common = -lurcu-bp"

export = URCU_CDS_CFLAGS=3D"-I${SYSROOT}${G_PREFIX}/include"<= /p>

export = URCU_CDS_LIBS=3D"-L${SYSROOT}${G_PREFIX}/lib -lurcu-common = -lurcu-cds"

export = URCU_CFLAGS=3D"-I${SYSROOT}${G_PREFIX}/include/urcu"=

export = URCU_LIBS=3D"-L${SYSROOT}${G_PREFIX}/lib -lurcu-common -lurcu = -lurcu-cds"

export = CPPFLAGS=3D"-I${SYSROOT}${G_PREFIX}/include = -I${SYSROOT}${G_PREFIX}/include/urcu"

 

 

 

what=3Dlttng_ust

url=3Dgit://git.lttng.org/lttng-ust.git

<= p class=3DMsoNormal>EXTRA_CONF=3D"--disable-maintainer-mode = --disable-examples --disable-man-pages"

COPY_MAKEFILE=3D"$BASEDIR/builds/lttng-ust/tests/M= akefile"

get_em_git $url = "$what" true

unset = COPY_MAKEFILE

unset = EXTRA_CONF

export = UST_LIBS=3D"-L${SYSROOT}${G_PREFIX}/lib -llttng-ust = -llttng-ust-common -ldl"

         &= nbsp; =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;            =   

# fix the paths in the = la files

#for FILE in $(find = ${SYSROOT}${G_PREFIX}/lib -type f -name "*.la") ; = do

#         =     sed -i = "s^-L/home/USER/work/LTTNG/sysroot/usr/local/lib = /usr/local/lib^-L/home/USER/work/LTTNG/sysroot/usr/local/lib = /home/USER/work/LTTNG/sysroot/usr/local/lib^" = ${FILE}

#done

 

 

 

what=3Dlttng_tools

url=3Dgit://git.lttng.org/lttng-tools.git

EXTRA_CONF=3D"--disable-maintainer-mode = --disable-man-pages --disable-static = --with-sessiond-bin=3D/mnt/sd1/modulesLTTNG/lttng/usr/local/bin/lttng-ses= siond"

COPY_MAKEFILE=3D"${BASEDIR}/builds/lttng-tools/tes= ts/Makefile"

get_em_git $url = "$what" = true           &nb= sp; 

unset = COPY_MAKEFILE

unset = EXTRA_CONF

 

 

 

what=3Dlttng_modules

url=3Dgit://git.lttng.org/lttng-modules.git<= /p>

init "$what"

filename=3D$(basename $url)   =

filename=3D${filename/.git}

download_git "$url" "$what" = $filename $state

if [ $state -eq = $step_compile ] ; then

    echo ">> $what is = already compiled"

else

    #dir_name=3D$(get_src_dir = $filename)

    pushd = $G_SOURCES_DIR/$filename

    make ARCH=3D$G_ARCH = CROSS_COMPILE=3D$G_CROSS_COMPILE KERNELDIR=3D$G_KERNELDIR -j4 = \

    && make = ARCH=3D$G_ARCH CROSS_COMPILE=3D$G_CROSS_COMPILE KERNELDIR=3D$G_KERNELDIR = INSTALL_MOD_PATH=3D${SYSROOT} modules_install \

        && = echo "$what=3D$step_compile" >> = $G_CFG_FILE

    = popd

fi

 

echo

echo = "INFO: the build progress for all packages is tracked in = $G_CFG_FILE"

 

------=_NextPart_000_000B_01D762CF.81BEDAC0-- --===============4715336618880944799== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============4715336618880944799==--