Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/icecc/icecream into cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryMiller1 committed Sep 11, 2018
2 parents 0bf49b9 + cdc6ff8 commit c90f48a
Show file tree
Hide file tree
Showing 66 changed files with 4,102 additions and 1,584 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# out-of-tree build
compile
build/
# autoconf
m4/libtool.m4
Expand All @@ -25,6 +26,7 @@ Makefile
stamp-h1
client/icecc
client/icecc-create-env
client/icecc-test-env
client/libclient.a
compilerwrapper/compilerwrapper
config.h
Expand All @@ -41,7 +43,9 @@ suse/icecream.spec
doc/*.1
doc/*.7
doc/index.html
tests/results
tests/test-suite.log
tests/testargs
tests/testargs.log
tests/testargs.trs
tests/test-setup.sh
48 changes: 39 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,29 @@ script:
- ./autogen.sh
- ./configure --prefix=$PWD/_inst
- make
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make test; fi
- |
if test "$TRAVIS_OS_NAME" = "linux"; then
strict="-strict"
if test -n "$VALGRIND"; then
# See tests/README.
sudo /sbin/setcap cap_sys_chroot+ep /usr/lib/valgrind/memcheck-amd64-linux
fi
make test${strict} VALGRIND=$VALGRIND TESTCC=/usr/bin/gcc TESTCXX=/usr/bin/g++
if test $? -ne 0; then
exit 1
fi
# Only the clang(-3.4) package provides /usr/bin/clang, but this path is hardcoded in icecream.
# So for now make icecream use the newer version provided by Travis.
sudo ln -s `which clang` /usr/bin/clang
sudo ln -s `which clang++` /usr/bin/clang++
make test${strict} VALGRIND=$VALGRIND TESTCC=/usr/bin/clang TESTCXX=/usr/bin/clang++
elif test "$TRAVIS_OS_NAME" = "osx"; then
if test -n "$STRICTTESTS"; then
strict="-strict"
fi
make test${strict} TESTCC=clang TESTCXX=clang++
fi
make dist
env: # important, even though empty!

Expand All @@ -16,25 +38,33 @@ matrix:
sudo: true # for setcap so we can run the tests in chroot.
compiler: clang
dist: trusty
- os: osx
before_install:
- brew update
- brew install lzo docbook2x gdb ccache
- os: linux
sudo: true # for setcap so we can run the tests in chroot.
compiler: clang
env: VALGRIND=1
dist: trusty
- os: linux
sudo: true # for setcap so we can run the tests in chroot.
compiler: clang
env: BUILD_TYPE=asan
dist: trusty
# Sanitizer builds with newer travis fail for unknown reason without giving any message.
group: deprecated-2017Q4
- os: linux
sudo: true # for setcap so we can run the tests in chroot.
compiler: clang
env: BUILD_TYPE=lsan
dist: trusty
group: deprecated-2017Q4
- os: linux
sudo: true # for setcap so we can run the tests in chroot.
compiler: clang
env: BUILD_TYPE=ubsan
dist: trusty
- os: osx
before_install:
- brew update
- brew install lzo docbook2x
- compiler: gcc
env: BUILD_TYPE=cmake
script:
Expand All @@ -51,15 +81,13 @@ matrix:
- make -j 4 VERBOSE=1
- echo "tests not yet attempted"
allow_failures:
- compiler: clang
env: BUILD_TYPE=lsan
- compiler: gcc
env: BUILD_TYPE=cmake

before_script:
- |
if [ "$BUILD_TYPE" == "asan" ]; then
export SAN_FLAGS="-fsanitize=address -fno-omit-frame-pointer"
export SAN_FLAGS="-fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer"
fi
- |
if [ "$BUILD_TYPE" == "lsan" ]; then
Expand All @@ -84,9 +112,11 @@ before_script:
addons:
apt:
packages:
- clang
- gcc
- libcap-ng-dev
- libcap-ng-utils
- liblzo2-dev
- docbook2x
- realpath
- gdb
- valgrind
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ dist-hook:

test: install
$(MAKE) -C tests $@
test-strict: install
$(MAKE) -C tests $@
1 change: 0 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
1.2 (in progress)
C++11 is required

1.1
- revert "Add load control for preprocessing"
Expand Down
2 changes: 0 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ form of process accounting in there.
How to install icecream
=======================

You must have a compiler that supports at least C++11.

cd icecream
./autogen.sh
./configure --prefix=/opt/icecream
Expand Down
65 changes: 18 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Table of Contents
- [osc build](#osc-build)
- [some compilation node aren't
used](#some-compilation-node-arent-used)
- [build with -Werror fails when using icecream ](#build-with--werror-fails-when-using-icecream)
- [build with -Werror fails only when using icecream ](#build-with--werror-fails-only-when-using-icecream)
- [clang 4.0 tries to read /proc/cpuinfo and fails](#clang-tries-to-read-proccpuinfo-and-fails)

- [Supported platforms](#supported-platforms)
Expand Down Expand Up @@ -57,8 +57,8 @@ We recommend that you use packages maintained by your distribution if possible.
Your distribution should provide customized startup scripts that make icecream
fit better into the way your system is configured.

We highly recommend you install [icemon](https://github.com/icecc/icemon) with
icecream.
We highly recommend you install [icemon](https://github.com/icecc/icemon) or
[icecream-sundae](https://github.com/JPEWdev/icecream-sundae) with icecream.

If you want to install from source see the instructions in the README file
provided in the source package.
Expand Down Expand Up @@ -111,8 +111,7 @@ simple configuration change)

### make scheduler persistent:

By adding an option --scheduler-host for daemon and --persistent-client-connection for scheduler
,the client connections are not disconnected from the scheduler even there is an availability of better scheduler.
By adding an option --scheduler-host for daemon and --persistent-client-connection for scheduler, the client connections are not disconnected from the scheduler even there is an availability of better scheduler.

TroubleShooting
-------------------------------------------------------------------------------
Expand Down Expand Up @@ -178,45 +177,15 @@ being used at all for compilation, check you have the same icecream
version on all nodes, otherwise, nodes running older icecream version
might be excluded from available nodes.

The icecream version shipped with openSUSE 12.2 is partially incompatible
with nodes using other icecream versions. 12.2 nodes will not be used for compilation
by other nodes, and depending on the scheduler version 12.2 nodes will not compile
on other nodes either. These incompatible nodes can be identified by having
'Linux3_' prefix in the platform). Replace the openSUSE 12.2 package
with a different one (for example from the devel:tools:build repository).
### build with -Werror fails only when using icecream

### build with -Werror fails when using icecream

This happens with gcc when `-Werror` is used and preprocessor generates code that issues
warning. For example this code (taken from ltrace project):

assert(info->type != info->type);

When building locally, gcc performs preprocessing and compilation in one step
and ignores this warning (see gcc
[bugzilla](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80369)). But icecream splits
preprocessing (done locally) and compilation (done remotely), which makes gcc trigger
a warning message and compilation fails (because of `-Werror`).

There is no known workaround, either disable `-Werror` or fix the code.
This problem should not exist with a recent icecream version. If it does, try
using `ICECC_REMOTE_CPP=1` (see `icecc --help`).

### clang tries to read /proc/cpuinfo and fails

This is a bug in clang 4.0. https://bugs.llvm.org/show_bug.cgi?id=33008
It should be fixed in the future, but if you have a broken release you can work around this by
creating a custom environment and adding /proc/cpuinfo to it.

```
/usr/lib/icecc/icecc-create-env --clang /usr/bin/clang /usr/lib/icecc/compilerwrapper --addfile /proc/cpuinfo
```

Do not apply this work around if you do not need it. /proc/cpuinfo is machine specific so and this work
around will place wrong information in it. In the case of the bug in clang 4.0 this file is checked for
existence but the contents are not actually used, but it is possible future versions of clang/gcc will use
this file if it exists for something else.

see [Using icecream in heterogeneous environments](#using-icecream-in-heterogeneous-environments)
for more information on using icecc-create-env.
This is a problem of clang 4.0 and newer: https://bugs.llvm.org/show_bug.cgi?id=33008
The most recent Icecream version works around this problem.

Supported platforms
---------------------------------------------------------------------------------------
Expand All @@ -233,6 +202,11 @@ tricky parts. Supported are:
Note that all these platforms can be used both as server and as client -
meaning you can do full cross compiling between them.

The following platforms are known to work at least as a client, meaning that
you can run compilation on them that will compile on remote nodes using cross compilation.

- Cygwin

Using icecream in heterogeneous environments
-----------------------------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -367,14 +341,11 @@ for the same host architecture:
in the $PATH and before the path of the toolchains.

- Create a tarball file for each toolchain that you want to use with
icecream. The /usr/lib/icecc/icecc-create-env script can be used to
icecream. icecc-create-env script can be used to
create the tarball file for each toolchain, for example:

/usr/lib/icecc/icecc-create-env --gcc /work/toolchain1/bin/arm-eabi-gcc
/work/toolchain1/bin/arm-eabi-g++

/usr/lib/icecc/icecc-create-env --gcc /work/toolchain2/bin/arm-linux-androideabi-gcc
/work/toolchain2/bin/arm-linux-androideabi-gcc
icecc-create-env /work/toolchain1/bin/arm-eabi-gcc
icecc-create-env /work/toolchain2/bin/arm-linux-androideabi-gcc

- Set ICECC\_VERSION to point to the native tarball file and for each
tarball file created to the toolchains (e.g ICECC\_VERSION=/work/i386-native.tar.gz,/work/arm-eabi-toolchain1.tar.gz=arm-eabi,/work/arm-linux-androideabi-toolchain2.tar.gz=arm-linux-androideabi).
Expand Down Expand Up @@ -583,7 +554,7 @@ Icecream on gentoo
compiler errors, if not all computers have the same processor
type/version

**Be aware** that you have to change the CFLAGS during ich gcc update
**Be aware** that you have to change the CFLAGS during each gcc update
too.

- To use icecream with emerge/ebuild use PREROOTPATH=/opt/icecream/lib/icecc/bin
Expand Down
3 changes: 1 addition & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ TESTLIBTOOLIZE="glibtoolize libtoolize"

LIBTOOLIZEFOUND="0"

srcdir=`dirname $0`
srcdir=$(dirname $0)
test -z "$srcdir" && srcdir=.

olddir=`pwd`
cd $srcdir

aclocal --version > /dev/null 2> /dev/null || {
Expand Down
4 changes: 3 additions & 1 deletion client/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
bin_PROGRAMS = icecc
bin_SCRIPTS = icecc-create-env
bin_SCRIPTS = icecc-create-env icecc-test-env

noinst_LIBRARIES = libclient.a
libclient_a_SOURCES = \
arg.cpp \
argv.c \
cpp.cpp \
local.cpp \
remote.cpp \
Expand All @@ -19,6 +20,7 @@ icecc_LDADD = \
$(LIBRSYNC)

noinst_HEADERS = \
argv.h \
client.h \
md5.h \
util.h
Expand Down
Loading

0 comments on commit c90f48a

Please sign in to comment.