Hello all,
I am new to this mailing list so I hope this is the right place to post the
following question.
We are considering using Clang front end for our tool. I tried to compile
LLVM
(using configure followed by make from the llvm top directory) on LINUX
X86 with gcc 4.1.2.
I got several compilation error messages of the form
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c+
+/4.1.2/i386-redhat-linux/bits/gthr-default.h:117:1: error:
weakref declaration must have internal linkage
__gthrw(pthread_mutexattr_destroy)
Could you guide me on how to resolve these errors?
I downloaded the sources from the web page (not from SVN).
Thanks,
Sitvanit
Sitvanit Ruah
Formal Verification Group
IBM Haifa Research Laboratory
From: llvmdev-bounces@cs.uiuc.edu [mailto:llvmdev-bounces@cs.uiuc.edu] On Behalf Of Sitvanit Ruah
Subject: [LLVMdev] Compiling llvm and Clang on Linux
We are considering using Clang front end for our tool. I tried to compile
LLVM (using configure followed by make from the llvm top directory) on
LINUX X86 with gcc 4.1.2.
Since that version of gcc is over five years old, you might want to try something a bit newer.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
We are considering using Clang front end for our tool. I tried to compile
LLVM
(using configure followed by make from the llvm top directory) on LINUX
X86 with gcc 4.1.2.
I believe the GCC you're using is too old/buggy to compile LLVM/Clang,
please check [1].
I am running on a machine on which gcc44 is installed but whose default
installation is 4.1.2.
I ran
../llvm/configure CC=gcc44 CXX=g++44
make
and still got the same error (I checked and CC=gcc44 and CXX=g++44 now in
build/Makefile.config)..
I tried also
../llvm/configure CC=gcc44 CXX=g++44 --include_dir=<gcc44 include dir>
but it didn't help either.
I couldn't find in the gcc44 directories the the file gthr-default.h, on
which the error is issued.
The error is issued while compiling the line line #include <algorithm>
in llvm/projects/compiler-rt/lib/asan/asan_posix.cc
the line is preceded by the comment
// Should not add dependency on libstdc++
Below are the gcc44 directories installed on the machine. Do you know what
else is needed in order to resolve the problem?
and still got the same error (I checked and CC=gcc44 and CXX=g++44 now in
build/Makefile.config)..
is it exactly the same error? The original error referred to gcc-4.1 header
files. Does the new error still refer to gcc-4.1 header files, or is it now
talking about gcc-4.4 header files?
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c+
+/4.1.2/i386-redhat-linux/bits/gthr-default.h:114:1: error: weakref
declaration must have internal
linkage
__gthrw(pthread_key_delete)
There are several such errors.
Sitvanit Ruah
Formal Verification Group
IBM Haifa Research Laboratory
Tel: 972-4-828-1249
I couldn’t find in the gcc44 directories the the file gthr-default.h, on
which the error is issued.
The error is issued while compiling the line line #include
in llvm/projects/compiler-rt/lib/asan/asan_posix.cc
FYI: we’ve just got rid of #include in llvm trunk for an unrelated reason.
the line is preceded by the comment
// Should not add dependency on libstdc++
There was no contradiction.
The parts we were using were completely implemented in the STL headers and did not cause a link-time dependency on libstdc++.
Anyway, this code is gone now.