[3.5 Release] Release Candidate 1 Sources and Binaries Available

The binaries are coming in from our testers. There are also sources, so you can compile them yourselves. Please visit this webpage and try out the binaries! File PRs for any issues you found. (Please CC me on the PR and mark it as a release blocker.)

http://llvm.org/pre-releases/3.5/

-bw

Hi Bill,

I downloaded:

http://llvm.org/pre-releases/3.5/rc1/cfe.src-3.5rc1.src.tar.gz
http://llvm.org/pre-releases/3.5/rc1/llvm.src-3.5rc1.src.tar.gz
http://llvm.org/pre-releases/3.5/rc1/compiler-rt.src-3.5rc1.src.tar.gz

as well as the .sig files. The signatures all checked.

I then unzipped and untarred all. Then, noting there were symlinks:

~/dwnlds/llvm/3.5rc1 $ ls -ld llvm.src/tools/clang
lrwxrwxrwx 1 evansl evansl 13 2014-07-22 21:19
llvm.src/tools/clang -> ../../cfe.src
~/dwnlds/llvm/3.5rc1 $ ls -ld llvm.src/projects/compiler-rt
lrwxrwxrwx 1 evansl evansl 21 2014-07-22 21:19
llvm.src/projects/compiler-rt -> ../../compiler-rt.src
~/dwnlds/llvm/3.5rc1 $

I figured all I needed to do was the:

  Building Clang and Working with the Code
  On Unix-like Systems
  6. Build LLVM and Clang:

step as documented here:

  http://clang.llvm.org/get_started.html

However, when make was run, I got:

make[1]: Entering directory `/home/evansl/dwnlds/llvm/3.5rc1/build/lib/IR'
llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
/home/evansl/dwnlds/llvm/3.5rc1/build/Release+Asserts/bin/llvm-tblgen:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not
found (required by
/home/evansl/dwnlds/llvm/3.5rc1/build/Release+Asserts/bin/llvm-tblgen)
make[1]: ***
[/home/evansl/dwnlds/llvm/3.5rc1/build/lib/IR/Release+Asserts/Intrinsics.gen.tmp]
Error 1
make[1]: Leaving directory `/home/evansl/dwnlds/llvm/3.5rc1/build/lib/IR'
make: *** [all] Error 1
Tue Jul 29 07:45:47 2014

I've got the missing GLIBCXX; however, instead of being in /usr/lib,
it's in /usr/local/lib*:

/usr/local/lib64 $ strings libstdc++.so.6.0.20|grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_DEBUG_MESSAGE_LENGTH
/usr/local/lib64 $

Is there something I should pass to the configure call to make the build
step look in the right place for GLIBCXX_3.4.20?

My operating system is ubuntu 14.04LTS:

uname -a
Linux lje-OptiPlex-9020 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15
03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

TIA.

-regards,
Larry

Setting LD_LIBRARY_PATH environment variable got me past that problem:

-*- mode: compilation; default-directory: "~/dwnlds/llvm/3.5rc1/" -*-
Compilation started at Tue Jul 29 08:27:20

make -f my.mk
LD_LIBRARY_PATH=/usr/local/lib64 make --directory=./build
make[1]: Entering directory `/home/evansl/dwnlds/llvm/3.5rc1/build'
make[2]: Entering directory
`/home/evansl/dwnlds/llvm/3.5rc1/build/lib/Support'
make[2]: Nothing to be done for `all'.
.
.
.
make[2]: Entering directory `/home/evansl/dwnlds/llvm/3.5rc1/build/lib/IR'
llvm[2]: Building Intrinsics.gen.tmp from Intrinsics.td
llvm[2]: Updated Intrinsics.gen because Intrinsics.gen.tmp changed
significantly.
llvm[2]: Compiling AsmWriter.cpp for Release+Asserts build
llvm[2]: Compiling Attributes.cpp for Release+Asserts build
.
.
.

Still, it would be nice to know what to pass to configure
so that one wouldn't have to set LD_LIBRARY_PATH.

-regards,
Larry

My guess is you're building with g++-4.9, so:

CC=gcc-4.8 CXX=g++-4.8 ./configure <stuff>

Ben

Thanks, Ben. I’m not well-versed enough with Linux builds to know how to debug them. :frowning:

-bw

Apparently I’m still learning :wink:

Yes:

~/dwnlds/llvm/3.5rc1 $ which gcc
/usr/local/bin/gcc
~/dwnlds/llvm/3.5rc1 $ gcc --version
gcc (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~/dwnlds/llvm/3.5rc1 $ /usr/bin/gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~/dwnlds/llvm/3.5rc1 $

So, using the gcc defined in /usr/local/bin, caused some object
fields to require the GLIBCXX in /usr/local/lib64; however,
the clang Makefiles only made provision for looking in /usr/lib64?
And changing the CC to /usr/bin/gcc would then cause the object
files to require the GLIBCXX in /usr/lib64, and that's what
the clang Makefiles expect? Is that how it works?
Just trying understand what's going on :frowning:

Thank for the help.

-regards,
Larry

to und

Lets try an experiment: with g++-4.9, compile a simple program that uses libstdc++.

g++ hello.cpp
./a.out
ldd a.out | grep libstdc++
chrpath -l a.out

ldd your_built_clang | grep libstdc++
chrpath -l your_built_clang

Let me know your findings.

Ben

Hmm, where "your_built_clang" should be the actual failing executable:
/home/evansl/dwnlds/llvm/3.5rc1/build/Release+Asserts/bin/llvm-tblgen

Ben

Here's the result:

-*- mode: compilation; default-directory:
"~/dwnlds/llvm/3.5rc1/build-variants/" -*-
Compilation started at Wed Jul 30 10:03:38

make -f my.mk chrpath
cat hello_world.cpp
#include <iostream>
int main()
{
    std::cout<<"Hello World!\n";
    return 0;
}
g++ --version
g++ (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ hello_world.cpp
./a.out
Hello World!
ldd a.out | grep libstdc++
  libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00002b30fdb04000)
chrpath -l a.out
a.out: no rpath or runpath tag found.
make: [chrpath] Error 2 (ignored)
ldd ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen | grep libstdc++
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not
found (required by ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen)
  libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00002aee42a0f000)
chrpath -l ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen: RPATH=$ORIGIN/../lib

Compilation finished at Wed Jul 30 10:03:38

OTHO, when LD_LIBRARY_PATH is set to /usr/local/...,
there's no "not found" error message:

-*- mode: compilation; default-directory:
"~/dwnlds/llvm/3.5rc1/build-variants/" -*-
Compilation started at Wed Jul 30 10:22:38

make -f my.mk libpath.chrpath
LD_LIBRARY_PATH=/usr/local/lib64 make -f my.mk chrpath
make[1]: Entering directory `/home/evansl/dwnlds/llvm/3.5rc1/build-variants'
cat hello_world.cpp
#include <iostream>
int main()
{
    std::cout<<"Hello World!\n";
    return 0;
}
g++ --version
g++ (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ hello_world.cpp
./a.out
Hello World!
ldd a.out | grep libstdc++
  libstdc++.so.6 => /usr/local/lib64/libstdc++.so.6 (0x00002ac7aded9000)
chrpath -l a.out
a.out: no rpath or runpath tag found.
make[1]: [chrpath] Error 2 (ignored)
ldd ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen | grep libstdc++
  libstdc++.so.6 => /usr/local/lib64/libstdc++.so.6 (0x00002b0112130000)
chrpath -l ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen: RPATH=$ORIGIN/../lib
make[1]: Leaving directory `/home/evansl/dwnlds/llvm/3.5rc1/build-variants'

Compilation finished at Wed Jul 30 10:22:38

ldd your_built_clang | grep libstdc++
chrpath -l your_built_clang

Hmm, where "your_built_clang" should be the actual failing executable:
/home/evansl/dwnlds/llvm/3.5rc1/build/Release+Asserts/bin/llvm-tblgen

Ben

Here's the result:

-*- mode: compilation; default-directory:
"~/dwnlds/llvm/3.5rc1/build-variants/" -*-
Compilation started at Wed Jul 30 10:03:38

make -f my.mk chrpath
cat hello_world.cpp
#include <iostream>
int main()
{
     std::cout<<"Hello World!\n";
     return 0;
}
g++ --version
g++ (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ hello_world.cpp
./a.out
Hello World!
ldd a.out | grep libstdc++
  libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00002b30fdb04000)
chrpath -l a.out
a.out: no rpath or runpath tag found.
make: [chrpath] Error 2 (ignored)
ldd ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen | grep libstdc++
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not
found (required by ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen)
  libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00002aee42a0f000)
chrpath -l ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen: RPATH=$ORIGIN/../lib

Compilation finished at Wed Jul 30 10:03:38

OTHO, when LD_LIBRARY_PATH is set to /usr/local/...,
there's no "not found" error message:

Is the test above without LD_LIBRARY_PATH set?

-*- mode: compilation; default-directory:
"~/dwnlds/llvm/3.5rc1/build-variants/" -*-
Compilation started at Wed Jul 30 10:22:38

make -f my.mk libpath.chrpath
LD_LIBRARY_PATH=/usr/local/lib64 make -f my.mk chrpath
make[1]: Entering directory `/home/evansl/dwnlds/llvm/3.5rc1/build-variants'
cat hello_world.cpp
#include <iostream>
int main()
{
     std::cout<<"Hello World!\n";
     return 0;
}
g++ --version
g++ (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ hello_world.cpp
./a.out
Hello World!
ldd a.out | grep libstdc++
  libstdc++.so.6 => /usr/local/lib64/libstdc++.so.6 (0x00002ac7aded9000)
chrpath -l a.out
a.out: no rpath or runpath tag found.
make[1]: [chrpath] Error 2 (ignored)
ldd ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen | grep libstdc++
  libstdc++.so.6 => /usr/local/lib64/libstdc++.so.6 (0x00002b0112130000)
chrpath -l ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen: RPATH=$ORIGIN/../lib
make[1]: Leaving directory `/home/evansl/dwnlds/llvm/3.5rc1/build-variants'

Compilation finished at Wed Jul 30 10:22:38

I'm not 100% sure on this, but you seem to be configured to build executables with g++, but not run them, a cross-compiler of sorts. I'm not sure under what conditions executables built with g++-4.9 require GLIBCXX_3.4.20, perhaps try compiling something new like hello_regex.cpp.

I think you have a few of options:

* Install g++-4.9 to /usr
* Add /usr/local/lib64 to /etc/ld.so.conf

The above two options means you're installing updated libstdc++ system-wide.

* Set the rpath of the binaries at build time: g++-4.9 -Wl,-rpath=/usr/local/lib64

You may want to set that into the compiler options and recompile g++.

* Copy /usr/local/lib64/libstdc++.so.6 to ./with_LD_LIBRARY_PATH/Release+Asserts/lib

I'm out of ideas.

Ben

On 07/30/2014 09:53 PM, Ben Pope wrote:> On Wednesday, July 30, 2014
11:26 PM, Larry Evans wrote:

ldd your_built_clang | grep libstdc++
chrpath -l your_built_clang

Hmm, where "your_built_clang" should be the actual failing executable:
/home/evansl/dwnlds/llvm/3.5rc1/build/Release+Asserts/bin/llvm-tblgen

Ben

Here's the result:

-*- mode: compilation; default-directory:
"~/dwnlds/llvm/3.5rc1/build-variants/" -*-
Compilation started at Wed Jul 30 10:03:38

make -f my.mk chrpath
cat hello_world.cpp
#include <iostream>
int main()
{
     std::cout<<"Hello World!\n";
     return 0;
}
g++ --version
g++ (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

g++ hello_world.cpp
./a.out
Hello World!
ldd a.out | grep libstdc++
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00002b30fdb04000)
chrpath -l a.out
a.out: no rpath or runpath tag found.
make: [chrpath] Error 2 (ignored)
ldd ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen | grep
libstdc++
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not
found (required by
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00002aee42a0f000)
chrpath -l ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen:
RPATH=$ORIGIN/../lib

Compilation finished at Wed Jul 30 10:03:38

OTHO, when LD_LIBRARY_PATH is set to /usr/local/...,
there's no "not found" error message:

Is the test above without LD_LIBRARY_PATH set?

-*- mode: compilation; default-directory:
"~/dwnlds/llvm/3.5rc1/build-variants/" -*-
Compilation started at Wed Jul 30 10:22:38

make -f my.mk libpath.chrpath
LD_LIBRARY_PATH=/usr/local/lib64 make -f my.mk chrpath
make[1]: Entering directory
`/home/evansl/dwnlds/llvm/3.5rc1/build-variants'
cat hello_world.cpp
#include <iostream>
int main()
{
     std::cout<<"Hello World!\n";
     return 0;
}
g++ --version
g++ (GCC) 4.9.0
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

g++ hello_world.cpp
./a.out
Hello World!
ldd a.out | grep libstdc++
    libstdc++.so.6 => /usr/local/lib64/libstdc++.so.6
(0x00002ac7aded9000)
chrpath -l a.out
a.out: no rpath or runpath tag found.
make[1]: [chrpath] Error 2 (ignored)
ldd ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen | grep
libstdc++
    libstdc++.so.6 => /usr/local/lib64/libstdc++.so.6
(0x00002b0112130000)
chrpath -l ./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen
./with_LD_LIBRARY_PATH/Release+Asserts/bin/llvm-tblgen:
RPATH=$ORIGIN/../lib
make[1]: Leaving directory
`/home/evansl/dwnlds/llvm/3.5rc1/build-variants'

Compilation finished at Wed Jul 30 10:22:38

I'm not 100% sure on this, but you seem to be configured to build
executables with g++, but not run them, a cross-compiler of sorts. I'm
not sure under what conditions executables built with g++-4.9 require
GLIBCXX_3.4.20, perhaps try compiling something new like hello_regex.cpp.

When I installed g++-4.9, I used:

bash ../../../src/configure --disable-multilib

from directory:

/home/evansl/dwnlds/gcc/4.9.0/build/default/object

where /home/evansl/dwnlds/gcc/4.9.0 contained the bunzip
and untar of:

http://gcc.petsads.us/releases/gcc-4.9.0/gcc-4.9.0.tar.bz2

The manpage for --enable-multilib:

https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html

says:

  This is part of the generic multilib support for building cross
  compilers.

So, using --disable-multilib, I think, would disable cross-compiling;
hence, your guess that the configuration was to build a
"cross-compiler of sorts" seems unlikely.

I think you have a few of options:

* Install g++-4.9 to /usr
* Add /usr/local/lib64 to /etc/ld.so.conf

The above two options means you're installing updated libstdc++
system-wide.

* Set the rpath of the binaries at build time: g++-4.9
-Wl,-rpath=/usr/local/lib64

While installing g++-4.9, the messages output to the terminal
included something like that:
{{{---cut here---
.
.
.

If the environment flag, LDFLAGS, is set before configure is run,
the make works:

make config.make.no
rm -r no_LD_LIBRARY_PATH
mkdir no_LD_LIBRARY_PATH
cd no_LD_LIBRARY_PATH ; LDFLAGS="-L/usr/local/lib64 -Wl,-rpath
-Wl,/usr/local/lib64" /home/evansl/dwnlds/llvm/3.5rc1/llvm.src/configure
checking for clang... clang
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes