Am 12.09.2017 um 23:28 schrieb Urs Liska:
I think deleting every of the two occurrences of the string "64" in
the build script has a good chance to cure the problem.
Thank you, this actually worked.

Fine. I simply forgot that there are still a lot of 32 bit systems around.

Attached a corrected version of the build script. Someone else might
want it. It uses "uname -m" to distinguish between 32 and 64 bit systems
and adjusts the number of threads to the number of available cores + 3.

Knut
#!/bin/bash

#====================================================================
# Build lilypond and guile 1.8 in a way that
#  -> guile is installed under PREFIX/share/lilypond
#  -> guile does not need to be in PATH
#  -> libguile does not need to be in the systems library search path
#====================================================================

RED='\033[0;31m'
NOCOLOR='\033[0m'
STARTTIME=`date +"%s"`

#=======================================================
# Adapt the next three lines to your needs!
# LILYSOURCE is the local lilypond git repository
# GUILESOURCE is the local guile git repository
# LILYROOT is the install destination root directory
#=======================================================
LILYSOURCE=/home/knut/sources/lily
GUILESOURCE=/home/knut/sources/guile
LILYROOT=/home/knut/sources/lilybuilt

#=======================================================
# If the machine hardware name contains the strint "64
# we will use that string as a library suffix
#=======================================================
LIBSUFFIX=`uname -m | grep -o 64`

#=======================================================
# derived from the defintions above, there should be
# no need to change these:
#=======================================================
BUILDLOG=$LILYROOT/lilypond_buildlog
GUILEROOT=$LILYROOT/share/lilypond
GUILELIBDIR=$GUILEROOT/lib$LIBSUFFIX
GUILEBINDIR=$GUILEROOT/bin
LILYLIBDIR=$LILYROOT/lib$LIBSUFFIX/lilypond
LILYBINDIR=$LILYROOT/bin

#=======================================================
# options for make
#=======================================================
CORES=`cat /proc/cpuinfo | grep processor[[:blank:]]: | wc -l`
CORES=$((CORES + 3))
LILYMAKEPAR="-j $CORES CPU_COUNT=$CORES"
GUILEMAKEPAR="-j $CORES"

function doit {
  AT=`date +"%s"`
  echo -en "  exec $RED$1$NOCOLOR in `pwd` ..."
  $1 &>> $BUILDLOG
  if [ $? -ne 0 ]; then echo " failed, see $BUILDLOG";exit 1;else echo -n " 
succeeded";fi
  BT=`date +"%s"`
  let "CT = $BT - $AT"
  echo " after $CT seconds"
}

#===========================================
# ensure that our LILYROOT directory exists!
#===========================================
mkdir -p $LILYROOT
echo "Start building of guile and lilypond on `LANG=clang date`" > $BUILDLOG

#=================================
# Now we patch and build guile 1.8
#=================================
cd $GUILESOURCE
git checkout branch_release-1-8  &>> $BUILDLOG
git reset --hard  &>> $BUILDLOG
git clean -dfx  &>> $BUILDLOG

echo Building GUILE `git rev-parse HEAD` first  ...

#============================================================================
# We do not want our guile to be visible to other applications, so we
# need to tell our hidden libguile where it has to look for module libraries!
# All we have to do is to add $GUILEBINDIR to the search path of guile.
#============================================================================
echo "  First we add a library search path to libguile/dynl.c"
sed -i "s|lt_dlinit ();|lt_dlinit (); lt_dlsetsearchpath (\"$GUILELIBDIR\");|" 
libguile/dynl.c

doit "./autogen.sh"
doit "./configure --disable-error-on-warning --prefix=$GUILEROOT"
doit "make $GUILEMAKEPAR"
doit "make $GUILEMAKEPAR install"

GUILEENDTIME=`date +"%s"`
let "TOTALTIME = $GUILEENDTIME - $STARTTIME"
echo "GUILE build time: $TOTALTIME seconds"

#===========================================================
# As our guile is hidden, the lilypond binaries need to know
# where # guile and libguile is located ... during build we
# need guile-config etc to be in PATH.
#===========================================================
PATH=$GUILEBINDIR:$PATH
export LDFLAGS="-Wl,-rpath,$GUILELIBDIR"

#======================================================
# make-regtest-pngs.sh would need these (undocumented!)
#======================================================
export LILYPOND_GIT=$LILYSOURCE
export LILYPOND_BUILD_DIR=$LILYSOURCE/build

cd $LILYSOURCE

echo Building LILYPOND `git rev-parse HEAD`...
doit "git reset --hard"
doit "git clean -dfx"
doit "./autogen.sh --noconfigure"
doit "mkdir -p build"
doit "cd $LILYSOURCE/build"
doit "../configure --prefix=$LILYROOT"
doit "make $LILYMAKEPAR all"
doit "make $LILYMAKEPAR install"
LILYBINENDTIME=`date +"%s"`
let "TOTALTIME = $LILYBINENDTIME - $GUILEENDTIME"
echo "LILYPOND binary build time: $TOTALTIME seconds"
doit "make $LILYMAKEPAR doc"
doit "make $LILYMAKEPAR install-doc"
LILYENDTIME=`date +"%s"`
let "TOTALTIME = $LILYENDTIME - $LILYBINENDTIME"
echo "LILYPOND documentation build time: $TOTALTIME seconds"
let "TOTALTIME = $LILYENDTIME - $STARTTIME"
echo "Total guile and lilypond build time: $TOTALTIME seconds"
echo "Guile and lilypond build time: $TOTALTIME seconds." >> $BUILDLOG

exit 0
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to