[tlbuild] TeX Live 2014, clang compilation, and a status update

Nelson H. F. Beebe beebe at math.utah.edu
Fri Apr 11 16:15:42 CEST 2014


In my big status report earlier this week, I said that clang
compilation of TeX Live 2014 had been a universal failure.  I had
never selected that compiler explicitly, so it got used by configure
only on those systems where it was visible in the Unix PATH directory
list.

Some list members responded with reports of successful builds with
clang, so I decided to do two projects:

       * try to build the latest clang everywhere

       * try builds of TeX Live 2014 with every available version of clang

For the first, the result is dismal failure: of 26 build attempts
using clang and gcc-4.[789] for bootstrapping, 22 have failed, and
four are still compiling.

Compilers are critical software tools and need to be written for
extreme portability, preferably in C89.  

Regrettably, clang and llvm are programmed in bleeding-edge C++, and
as a result, they cannot be compiled unless the build compiler can
handle such code.  There is even evidence from the build logs with
errors like this

	g++: error: unrecognized command line option '-std=c++11'
	cc1plus: error: unrecognized command line option '-std=c++11'

that conformance to the ISO C++ 2011 Standard is expected, but NO C++
COMPILER on any of my three dozen systems provides that, and such
support isn't expected to be widely available until at least 2021.
Argh.... such abysmal software engineering!

Perhaps it may be possible to bootstrap clang builds by installing
successive versions, but that is clearly a huge job that I have little
enthusiasm for doing.

For the second, I have done texlive-20140405 builds with clang
versions from 1.1 to 3.5 on the 18 platforms that have that compiler,
and to my surprise, 5 of those succeeded:

	i386-linux-fedora19-clang/  x86_64-linux-debian7-clang/
	i386-linux-ubuntu12-clang/  x86_64-linux-redhat7-clang/
	x86_64-darwin-clang/

To my greater surprise, one of those is Mac OS X x86-64 (currently,
Darwin 10.7.5), a platform for which NO BUILD HAS EVER SUCCEEDED here
since I began TeX Live builds in 2003.  I also attempted a build
with native gcc:

	% /usr/bin/clang --version
	Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)

	% /usr/bin/gcc --version
	i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple
	Inc. build 5658) (LLVM build 2336.11.00)

That failed.  I have 75 other versions of gcc on that system in
various snapshots for gcc-4.1 to 4.9, so I have lots of other gcc's to
try, and I may do so now.

We have some faculty-owned Macs here that are newer, but most have no
compilers.  However, on the newest one bought last month, I find newer
compilers:

	% sw_vers
	ProductName:    Mac OS X
	ProductVersion: 10.9.2
	BuildVersion:   13C64

	% /usr/bin/clang --version
	Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)

	% /usr/bin/gcc --version
	Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
	Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)

Thus, Apple is lying: this is not GNU gcc, but instead is an LLVM
compiler.

I'm reluctant to do TeX Live builds on machines with new O/S releases,
because they are likely to require shared libraries that are not
available on older systems with the same O/S.

Here, finally, is a status update with the platforms which I have
successful TeX Live 2014 builds, including for a new Debian 7.4 x86-64
system that I created yesterday:

	% cd /usr/local/texlive/2014/bin

	% find ./*/tex -mtime -30 |
	    sed -e 's@^./@@' -e 's@/tex$@@' |
	    pr -c2 -w64 -f
	alpha-linux-gentoo-2            x86_64-linux-debian6
	i386-freebsd9                   x86_64-linux-debian7-clang
	i386-linux-fedora19-clang       x86_64-linux-debian7
	i386-linux-fedora19             x86_64-linux-fedora19
	i386-linux-redhat5              x86_64-linux-opensuse11
	i386-linux-ubuntu12             x86_64-linux-opensuse12
	i386-solaris-11                 x86_64-linux-opensuse13
	ia64-linux                      x86_64-linux-redhat5
	powerpc32-linux-gentoo2         x86_64-linux-redhat6
	powerpc64-linux-gentoo2         x86_64-linux-redhat7-clang
	x86_64-darwin-clang             x86_64-linux-redhat7
	x86_64-dragonfly                x86_64-linux-slackware14
	x86_64-dragonflybsd3.6          x86_64-netbsd6
	x86_64-linux-arch

There are now 27 platforms for which I have TeX Live 2014 builds.

The Debian 7 executables run on Debian 6.

The NetBSD 6 build succeeded (also a first time for TeX Live on NetBSD
at Utah), thanks to a suggestion from Marc Baudoin
<babafou at babafou.eu.org>, with this recipe:

	set path=( /usr/pkg/bin /bin /usr/bin )
	env CC=gcc CXX=g++ TL_MAKE=gmake \
	    LDFLAGS='-L/usr/X11R7/lib -Wl,-rpath,/usr/X11R7/lib' \
	    ./source/Build

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe at math.utah.edu  -
- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



More information about the tlbuild mailing list