[erlang-questions] Erlang/OTP 20.0-rc2 is available for testing

Adam Jensen hanzer@REDACTED
Mon Jun 5 23:22:18 CEST 2017


Hi,

I am attempting to build Erlang/OTP 20.0-rc2 with clang/llvm Release 4.0 on Scientific Linux 7.3 (a RHEL clone). "$ERL_TOP/HOWTO/INSTALL.md" seems to suggest that compiling with clang is supported/possible but "configure" dies fairly early [for me].

[hanzer@REDACTED otp]$ ./configure --prefix=$HOME/.local/otp-20.0-rc2
Ignoring the --cache-file argument since it can cause the system to be erroneously configured
Disabling caching
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... /home/hanzer/.local/llvm/bin/clang
checking whether the C compiler works... no
configure: error: in `/home/hanzer/build/otp':
configure: error: C compiler cannot create executables
See `config.log' for more details

[hanzer@REDACTED otp]$ cat config.log | nc termbin.com 9999
http://termbin.com/74uzy

<http://www.scientificlinux.org/>
<http://releases.llvm.org/4.0.0/docs/index.html>


If anyone wants to reproduce this, the entire process so far is:

----
sudo rpm -Uvh http://ftp.scientificlinux.org/linux/scientific/7x/external_products/softwarecollections/yum-conf-softwarecollections-2.0-1.el7.noarch.rpm
# See <http://linux.web.cern.ch/linux/centos7/docs/softwarecollections.shtml>
scl enable {devtoolset-6,python27} bash

mkdir build
export BASE=$HOME/build
cd $BASE
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_400/final/ llvm_Rel400
cd $BASE/llvm_Rel400/tools
svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_400/final/ clang
svn co http://llvm.org/svn/llvm-project/lld/tags/RELEASE_400/final/ lld
svn co http://llvm.org/svn/llvm-project/polly/tags/RELEASE_400/final/ polly
cd $BASE/llvm_Rel400/tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_400/final/ extra
cd $BASE/llvm_Rel400/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_400/final/ compiler-rt
svn co http://llvm.org/svn/llvm-project/openmp/tags/RELEASE_400/final/ openmp
svn co http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_400/final/ libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_400/final/ libcxxabi
svn co http://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_400/final/ test-suite
mkdir $BASE/build_llvm
cd $BASE/build_llvm

cmake3 -G "Unix Makefiles" \
  -C $BASE/llvm_Rel400/tools/clang/cmake/caches/PGO-stage2-instrumented.cmake \
  -DLLVM_TARGETS_TO_BUILD=all \
  -DLLVM_BUILD_TOOLS=on \
  -DLLVM_BUILD_EXAMPLES=on \
  -DLLVM_BUILD_TESTS=on \
  -DCMAKE_INSTALL_PREFIX=$HOME/.local/llvm \
  -DCMAKE_BUILD_TYPE=Release $BASE/llvm_Rel400 \
  $BASE/llvm_Rel400

make -j4 2>&1 | tee build.log
make -j4 check-llvm 2>&1 | tee check-llvm.log
make -j4 check-clang 2>&1 | tee check-clang.log
make install

export PATH=$PATH:$HOME/.local/llvm/bin

export LANG=C
export CC=clang
export CXX=clang++
export CPP=clang-cpp
export LD=lld
export RANLIB=llvm-ranlib
export AR=llvm-ar
export GETCONF=llvm-config
export CFLAGS="-O4"
export CXXFLAGS="-O4"
export CPPFLAGS="-I/usr/include -I /usr/local/include -I$HOME/.local/llvm/include"
export LDFLAGS="-L/usr/lib -L/usr/lib64 -L/usr/local/lib -L/usr/local/lib64 -L$HOME/.local/llvm/lib"
export LIBS=/usr/lib:/usr/lib64:/usr/local/lib:/usr/local/lib64:$HOME/.local/llvm/lib/

cd $BASE
git clone https://github.com/erlang/otp.git
cd $BASE/otp
git checkout OTP-20.0-rc2
export ERL_TOP=`pwd`
./otp_build autoconf
export MAKEFLAGS=-j4
./configure --prefix=$HOME/.local/otp-20.0-rc2
make 2>&1 | tee build.log

make release_tests
cd release/tests/test_server
$ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop
make install
cd $ERL_TOP
export PATH=$ERL_TOP/bin:$PATH
make docs
make install-docs




More information about the erlang-questions mailing list