public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/63801] New: error: templates must have C++ linkage
@ 2014-11-10 5:51 gcc at ryandesign dot com
2014-11-10 5:54 ` [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: gcc at ryandesign dot com @ 2014-11-10 5:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63801
Bug ID: 63801
Summary: error: templates must have C++ linkage
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc at ryandesign dot com
Hello, I'm a developer with the MacPorts project. I'm not the maintainer of our
gcc ports, but I am the one who created our gcc5 port and kept it updated until
version 5-20140824. No later snapshot of gcc5 has successfully built for me on
OS X, failing instead with the following message:
ccache /usr/bin/clang++ -arch x86_64 -c -g -DIN_GCC -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fno-common -DHAVE_CONFIG_H -I. -I.
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/.
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../include
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../libcpp/include
-I/opt/local/include -I/opt/local/include -I/opt/local/include
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../libdecnumber
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../libdecnumber/dpd
-I../libdecnumber
-I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/../libbacktrace
-DCLOOG_INT_GMP -I/opt/local/include -DCLOOG_INT_GMP -I/opt/local/include -o
graphite-clast-to-gimple.o -MT graphite-clast-to-gimple.o -MMD -MP -MF
./.deps/graphite-clast-to-gimple.TPo
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/graphite-clast-to-gimple.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is
deprecated
clang: warning: treating 'cpp-output' input as 'c++-cpp-output' when in C++
mode, this behavior is deprecated
In file included from
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/graphite-clast-to-gimple.c:36:
In file included from /opt/local/include/isl/val_gmp.h:4:
In file included from /opt/local/include/gmp.h:34:
In file included from
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:89:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:494:1:
error: templates must have C++ linkage
template <bool> struct __static_assert_test;
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:495:20:
error: explicit specialization of non-template struct '__static_assert_test'
template <> struct __static_assert_test<true> {};
^ ~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:496:1:
error: templates must have C++ linkage
template <unsigned> struct __static_assert_check {};
^~~~~~~~~~~~~~~~~~~
We are using gmp version 6.0.0 and isl version 0.14.
This was with the following OS X, Xcode and clang versions, but similar failure
occurs on earlier versions:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.10.1
BuildVersion: 14B17
$ xcodebuild -version
Xcode 6.1
Build version 6A1052d
$ clang -v
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
$
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang
2014-11-10 5:51 [Bug libgcc/63801] New: error: templates must have C++ linkage gcc at ryandesign dot com
@ 2014-11-10 5:54 ` pinskia at gcc dot gnu.org
2014-11-10 6:00 ` gcc at ryandesign dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-11-10 5:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63801
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|libgcc |middle-end
Summary|error: templates must have |error: templates must have
|C++ linkage |C++ linkage when building
| |with isl and clang
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This might be a bug in isl/gmp where it does an extern "C" around some include
files.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang
2014-11-10 5:51 [Bug libgcc/63801] New: error: templates must have C++ linkage gcc at ryandesign dot com
2014-11-10 5:54 ` [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang pinskia at gcc dot gnu.org
@ 2014-11-10 6:00 ` gcc at ryandesign dot com
2014-11-10 6:09 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gcc at ryandesign dot com @ 2014-11-10 6:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63801
--- Comment #2 from Ryan Schmidt <gcc at ryandesign dot com> ---
Isn't the extern "C" coming from lines 32-38 of gcc/graphite-clast-to-gimple.c
which in version 5-20141109 say:
#if defined(__cplusplus)
extern "C" {
#endif
#include <isl/val_gmp.h>
#if defined(__cplusplus)
}
#endif
The first 4 lines of /opt/local/include/isl/val_gmp.h are simply:
#ifndef ISL_VAL_GMP_H
#define ISL_VAL_GMP_H
#include <gmp.h>
Lines 31-36 of /opt/local/include/gmp.h (the first non-comment lines) are:
#ifndef __GMP_H__
#if defined (__cplusplus)
#include <iosfwd> /* for std::istream, std::ostream, std::string */
#include <cstdio>
#endif
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang
2014-11-10 5:51 [Bug libgcc/63801] New: error: templates must have C++ linkage gcc at ryandesign dot com
2014-11-10 5:54 ` [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang pinskia at gcc dot gnu.org
2014-11-10 6:00 ` gcc at ryandesign dot com
@ 2014-11-10 6:09 ` pinskia at gcc dot gnu.org
2014-11-10 6:22 ` gcc at ryandesign dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-11-10 6:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63801
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |build
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://gcc.gnu.org/ml/gcc-patches/2014-02/msg00558.html
Looks like it was needed at one point because a bug in isl headers. But this
might have been fixed already
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang
2014-11-10 5:51 [Bug libgcc/63801] New: error: templates must have C++ linkage gcc at ryandesign dot com
` (2 preceding siblings ...)
2014-11-10 6:09 ` pinskia at gcc dot gnu.org
@ 2014-11-10 6:22 ` gcc at ryandesign dot com
2014-11-12 7:26 ` gcc at ryandesign dot com
2014-12-09 2:40 ` gcc at ryandesign dot com
5 siblings, 0 replies; 7+ messages in thread
From: gcc at ryandesign dot com @ 2014-11-10 6:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63801
--- Comment #4 from Ryan Schmidt <gcc at ryandesign dot com> ---
Thanks. If I remove the extern "C" then it fails with:
/opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_gcc5/libgcc-devel/work/gcc-5-20141109/gcc/graphite-optimize-isl.c:357:12:
error: use of undeclared identifier 'isl_band_member_is_zero_distance'
if (isl_band_member_is_zero_distance (Band, i))
^
The isl changelog, under the heading "Changes since isl-0.12", says "The
function isl_band_member_is_zero_distance has been removed. Essentially the
same functionality is available through isl_band_member_is_coincident, except
that is requires setting up coincidence constraints. The option
schedule_outer_zero_distance has accordingly been replaced by the option
schedule_outer_coincidence."
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang
2014-11-10 5:51 [Bug libgcc/63801] New: error: templates must have C++ linkage gcc at ryandesign dot com
` (3 preceding siblings ...)
2014-11-10 6:22 ` gcc at ryandesign dot com
@ 2014-11-12 7:26 ` gcc at ryandesign dot com
2014-12-09 2:40 ` gcc at ryandesign dot com
5 siblings, 0 replies; 7+ messages in thread
From: gcc at ryandesign dot com @ 2014-11-12 7:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63801
--- Comment #5 from Ryan Schmidt <gcc at ryandesign dot com> ---
I see a patch for this has been provided on the mailing list:
https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg95468.html
It is a long thread and I haven't read all of it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang
2014-11-10 5:51 [Bug libgcc/63801] New: error: templates must have C++ linkage gcc at ryandesign dot com
` (4 preceding siblings ...)
2014-11-12 7:26 ` gcc at ryandesign dot com
@ 2014-12-09 2:40 ` gcc at ryandesign dot com
5 siblings, 0 replies; 7+ messages in thread
From: gcc at ryandesign dot com @ 2014-12-09 2:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63801
Ryan Schmidt <gcc at ryandesign dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Ryan Schmidt <gcc at ryandesign dot com> ---
I see that with version 5-20141207 this patch is no longer needed, so I guess
the problem is fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-12-09 2:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-10 5:51 [Bug libgcc/63801] New: error: templates must have C++ linkage gcc at ryandesign dot com
2014-11-10 5:54 ` [Bug middle-end/63801] error: templates must have C++ linkage when building with isl and clang pinskia at gcc dot gnu.org
2014-11-10 6:00 ` gcc at ryandesign dot com
2014-11-10 6:09 ` pinskia at gcc dot gnu.org
2014-11-10 6:22 ` gcc at ryandesign dot com
2014-11-12 7:26 ` gcc at ryandesign dot com
2014-12-09 2:40 ` gcc at ryandesign dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).