[kde-freebsd] [package - 93amd64-default][graphics/digikam-kde4] Failed for digikam-4.2.0_3, 2 in build

Adriaan de Groot groot at kde.org
Wed Mar 23 18:27:19 UTC 2016


On Wednesday, March 23, 2016 07:12:35 PM Andriy Gapon wrote:
> Interesting that clang on head does complain about this as well.
> http://article.gmane.org/gmane.os.freebsd.devel.pkg-fallout/285895

Here's a very short example:

===
[adridg at beastie /tmp]$ cat t.cpp
extern "C" {
#include <lensfun/lensfun.h>
}
[adridg at beastie /tmp]$ g++ --version
g++ (FreeBSD Ports Collection) 4.8.5
Copyright (C) 2015 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.

[adridg at beastie /tmp]$ c++ --version
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.3
Thread model: posix
===


Results (only clang34 thinks it's ok):


===
[adridg at beastie /tmp]$ g++ -I /usr/local/include -c t.cpp
In file included from t.cpp:2:0:
/usr/local/include/lensfun/lensfun.h:2506:5: error: template with C linkage
     template<typename T> static void ModifyColor_Vignetting_PA (
     ^
/usr/local/include/lensfun/lensfun.h:2508:5: error: template with C linkage
     template<typename T> static void ModifyColor_DeVignetting_PA (
     ^
[adridg at beastie /tmp]$ clang++36 -I /usr/local/include -c t.cpp
In file included from t.cpp:2:
/usr/local/include/lensfun/lensfun.h:2506:5: error: templates must have C++
      linkage
    template<typename T> static void ModifyColor_Vignetting_PA (
    ^~~~~~~~~~~~~~~~~~~~
/usr/local/include/lensfun/lensfun.h:2508:5: error: templates must have C++
      linkage
    template<typename T> static void ModifyColor_DeVignetting_PA (
    ^~~~~~~~~~~~~~~~~~~~
2 errors generated.
[adridg at beastie /tmp]$ clang++ -I /usr/local/include -c t.cpp
===



But this sample program:

===
[adridg at beastie /tmp]$ cat t.cpp
extern "C" {
template<typename T> void foo(T t) {};   
}
===


Yields an error with all three compilers. Apparently linkage state is reset at 
#include boundaries in clang 3.4 (or something like that). An interesting edge 
case, but moot nonetheless.


[ade]


More information about the kde-freebsd mailing list