I'm wrapping my head around something new.
In the past I have been copying the svn package contents to tmpfs and working there with my compiles. That habit came from being accustomed to building packages from a source tarball. The source tarball is unpacked to a temporary working area and then compiled. With svn, something to which I am new, I maintained that habit by copying the package contents.
Trinity is huge and compiling the entire core package suite requires 6 hours even on a dual core system. I could live with that if I knew the packages always compiled 100% of the time. That is a normal expectation with tarballs, but is not the case in a dynamic svn environment. There always is some degree of breakage. Hence a previous suggestion to use ccache.
I have compiled kernels for many years. Being new to svn I did not understand that, much like the kernel, I don't have to image package sources from the svn tree but can work directly in that directory. Like the kernel I need only use 'make clean' to restore the svn tree. I then can use ccache to create compiling caches, which should dramatically reduce compile times.
If I understand correctly, then in my build scripts I need to do the following:
================================ WAS:
(snippet from arts package build script)
echo "Copying $PRGNAM source files to $TMP..." cp -a $SVN_SOURCES/dependencies/$PRGNAM $TMP/ || exit 1 cd $PRGNAM || exit 1 echo echo "Building make and config files..." echo echo "Package will be stored at $OUTPUT." echo cp -p "$LIBTOOLM4" admin/libtool.m4.in cp -p "$LTMAINSH" admin/ltmain.sh make -f admin/Makefile.common echo echo "Finished building make and config files." echo chown -R root:root . CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ ./configure \ --prefix=${PREFIX} \ --sysconfdir=${SYSCONFDIR} \ --libdir=${LIBDIR} \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux
make $NUMJOBS || exit 1 make install DESTDIR=$PKG
================================ CHANGE TO:
echo "Changing to $PRGNAM source files in SVN..." cd $SVN_SOURCES/dependencies/$PRGNAM || exit 1 echo echo "Building make and config files..." echo echo "Package will be stored at $OUTPUT." echo cp -p "$LIBTOOLM4" ./admin/libtool.m4.in cp -p "$LTMAINSH" ./admin/ltmain.sh make -f ./admin/Makefile.common echo echo "Finished building make and config files." echo chown -R root:root . make clean if [ -x /usr/bin/ccache ]; then CC="ccache gcc" echo "Using ccache. Unless configured otherwise, the cache is stored in $HOME/.ccache." echo else CC="gcc" fi CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ $CC ./configure \ --prefix=${PREFIX} \ --sysconfdir=${SYSCONFDIR} \ --libdir=${LIBDIR} \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux
make $NUMJOBS || exit 1 make install DESTDIR=$PKG
================================
Do I have the correct idea?
Thanks much!
Darrell
I probably should wait for advice on how to build from SVN.
I decided to try this with tqtinterface as that package only requires 1.5 minutes to compile.
The first time I compile from within the SVN directory rather than copying the tqtinterface files to tmpfs, the compile works.
Thereafter the compile always fails:
./tqinputcontext.h:32:27: error: qinputcontext.h: No such file or directory
I tried adding 'make clean' at different places but that did not help.
I'm sure I'm missing the big picture with something simple.
Using ccache might be trying to work. The cache directory is populated and I see configure messages about using ccache. Yet I don't realize any benefits because the build keeps failing.
Okay. This might actually is working.
I'm still testing.
I modified my arts build script to build from svn rather than a copy in tmpfs. The whole thing worked several times. First build was 4+ minutes and the other builds were 1.5 minutes.
Next I tried kdeutils. First build was 10 minutes. Subsequent two builds were 2 minutes.
The problem I had this afternoon would seem limited to building tqtinterface from within svn. Fortunately that is a short build and my copy method will suffice.
Odd.
So now my question is when or how often should I run 'make clean' within the svn tree? Running 'make clean' offset the effects of ccache.
The problem I had this afternoon would seem limited to building tqtinterface from within svn. Fortunately that is a short build and my copy method will suffice.
I think I discovered the problem with why I can't use 'make clean' with tqtinterface. There is no make file providing any rules for cleaning the directory.