New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.0.0-betas fail to build with GCC 4.9, error: template with C linkage #5117

Merged
merged 1 commit into from Jul 10, 2015

Conversation

Projects
None yet
2 participants
@tbonfort
Member

tbonfort commented Jul 9, 2015

None of the MapServer 7.0 betas were able to build on Debian unstable (with GCC 4.9.3) due to template with C linkage errors. The build succeeds on Debian jessie (with GCC 4.9.2), but also fails with GCC 5 in experimental.

An example of the first error follows, but there are many more.

[ 55%] Building CXX object CMakeFiles/mapserver.dir/mapagg.cpp.o
/usr/bin/c++   -Dmapserver_EXPORTS -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2  -Wall -O2 -g -DNDEBUG -fPIC -I"/tmp/buildd/mapserver-7.0.0~beta2/obj-x86_64-linux-gnu" -I"/tmp/buildd/mapserver-7.0.0~beta2/renderers/agg/include" -I"/tmp/buildd/mapserver-7.0.0~beta2/mapscript/v8" -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/postgresql -I/usr/include/gdal -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2    -o CMakeFiles/mapserver.dir/mapagg.cpp.o -c "/tmp/buildd/mapserver-7.0.0~beta2/mapagg.cpp"
In file included from /usr/include/c++/4.9/bits/stringfwd.h:40:0,
                 from /usr/include/c++/4.9/string:39,
                 from /usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
                 from /usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
                 from /usr/include/x86_64-linux-gnu/unicode/strenum.h:14,
                 from /usr/include/x86_64-linux-gnu/unicode/uenum.h:24,
                 from /usr/include/x86_64-linux-gnu/unicode/ucnv.h:51,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1306,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapows.h:477,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapserver.h:2811,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapagg.cpp:30:
/usr/include/c++/4.9/bits/memoryfwd.h:63:3: error: template with C linkage
   template<typename>
   ^
/usr/include/c++/4.9/bits/memoryfwd.h:66:3: error: template specialization with C linkage
   template<>
   ^
/usr/include/c++/4.9/bits/memoryfwd.h:70:3: error: template with C linkage
   template<typename, typename>
   ^

tbonfort added a commit to tbonfort/mapserver that referenced this pull request Jul 9, 2015

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 9, 2015

Member

@sebastic I was unable to reproduce with gcc 5.1 on OSX. Could you however try out this patch and report back? thanks, thomas

Member

tbonfort commented Jul 9, 2015

@sebastic I was unable to reproduce with gcc 5.1 on OSX. Could you however try out this patch and report back? thanks, thomas

@sebastic

This comment has been minimized.

Show comment
Hide comment
@sebastic

sebastic Jul 9, 2015

Contributor

Thanks for looking into this issue and the proposed patch.

Unfortunately beta2 still fails to build in the same way as without the patch.

Contributor

sebastic commented Jul 9, 2015

Thanks for looking into this issue and the proposed patch.

Unfortunately beta2 still fails to build in the same way as without the patch.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 10, 2015

Member

@sebastic can you post the updated error message you get from gcc

Member

tbonfort commented Jul 10, 2015

@sebastic can you post the updated error message you get from gcc

@sebastic

This comment has been minimized.

Show comment
Hide comment
@sebastic

sebastic Jul 10, 2015

Contributor

The first error is still the same:

[ 55%] Building CXX object CMakeFiles/mapserver.dir/mapagg.cpp.o
/usr/bin/c++   -Dmapserver_EXPORTS -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2  -Wall -O2 -g -DNDEBUG -fPIC -I"/tmp/buildd/mapserver-7.0.0~beta2/obj-x86_64-linux-gnu" -I"/tmp/buildd/mapserver-7.0.0~beta2/renderers/agg/include" -I"/tmp/buildd/mapserver-7.0.0~beta2/mapscript/v8" -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/postgresql -I/usr/include/gdal -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2    -o CMakeFiles/mapserver.dir/mapagg.cpp.o -c "/tmp/buildd/mapserver-7.0.0~beta2/mapagg.cpp"
In file included from /usr/include/c++/4.9/bits/stringfwd.h:40:0,
                 from /usr/include/c++/4.9/string:39,
                 from /usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
                 from /usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
                 from /usr/include/x86_64-linux-gnu/unicode/strenum.h:14,
                 from /usr/include/x86_64-linux-gnu/unicode/uenum.h:24,
                 from /usr/include/x86_64-linux-gnu/unicode/ucnv.h:51,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1306,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapows.h:477,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapserver.h:2811,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapagg.cpp:30:
/usr/include/c++/4.9/bits/memoryfwd.h:63:3: error: template with C linkage
   template<typename>
   ^
/usr/include/c++/4.9/bits/memoryfwd.h:66:3: error: template specialization with C linkage
   template<>
   ^
/usr/include/c++/4.9/bits/memoryfwd.h:70:3: error: template with C linkage
   template<typename, typename>
   ^

The full build log is available at: http://linuxminded.nl/tmp/mapserver_7.0.0~beta2-1_pbuilder.log

Contributor

sebastic commented Jul 10, 2015

The first error is still the same:

[ 55%] Building CXX object CMakeFiles/mapserver.dir/mapagg.cpp.o
/usr/bin/c++   -Dmapserver_EXPORTS -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2  -Wall -O2 -g -DNDEBUG -fPIC -I"/tmp/buildd/mapserver-7.0.0~beta2/obj-x86_64-linux-gnu" -I"/tmp/buildd/mapserver-7.0.0~beta2/renderers/agg/include" -I"/tmp/buildd/mapserver-7.0.0~beta2/mapscript/v8" -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/postgresql -I/usr/include/gdal -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2    -o CMakeFiles/mapserver.dir/mapagg.cpp.o -c "/tmp/buildd/mapserver-7.0.0~beta2/mapagg.cpp"
In file included from /usr/include/c++/4.9/bits/stringfwd.h:40:0,
                 from /usr/include/c++/4.9/string:39,
                 from /usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
                 from /usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
                 from /usr/include/x86_64-linux-gnu/unicode/strenum.h:14,
                 from /usr/include/x86_64-linux-gnu/unicode/uenum.h:24,
                 from /usr/include/x86_64-linux-gnu/unicode/ucnv.h:51,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from /usr/include/libxml2/libxml/globals.h:18,
                 from /usr/include/libxml2/libxml/threads.h:35,
                 from /usr/include/libxml2/libxml/xmlmemory.h:218,
                 from /usr/include/libxml2/libxml/tree.h:1306,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapows.h:477,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapserver.h:2811,
                 from /tmp/buildd/mapserver-7.0.0~beta2/mapagg.cpp:30:
/usr/include/c++/4.9/bits/memoryfwd.h:63:3: error: template with C linkage
   template<typename>
   ^
/usr/include/c++/4.9/bits/memoryfwd.h:66:3: error: template specialization with C linkage
   template<>
   ^
/usr/include/c++/4.9/bits/memoryfwd.h:70:3: error: template with C linkage
   template<typename, typename>
   ^

The full build log is available at: http://linuxminded.nl/tmp/mapserver_7.0.0~beta2-1_pbuilder.log

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 10, 2015

Member

it would seem like you haven't applied the patch then, no? the ref to mapows.h from mapserver.h line 2811 was removed

Member

tbonfort commented Jul 10, 2015

it would seem like you haven't applied the patch then, no? the ref to mapows.h from mapserver.h line 2811 was removed

@sebastic

This comment has been minimized.

Show comment
Hide comment
@sebastic

sebastic Jul 10, 2015

Contributor

The patch was applied:

dpkg-source: info: applying missing-mapows.h-includes.patch

This is included in the patch:

From 6aa5873862fb86b2b418de990e0b1319ff05b9e7 Mon Sep 17 00:00:00 2001
From: Thomas Bonfort <thomas.bonfort@gmail.com>
Date: Thu, 9 Jul 2015 15:24:32 +0200
Subject: [PATCH] missing mapows.h includes

---
 mapcontext.c       | 2 +-
 mapdraw.c          | 1 +
 mapkmlrenderer.cpp | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

--- a/mapcontext.c
+++ b/mapcontext.c
@@ -27,7 +27,7 @@
  ****************************************************************************/

 #include "mapserver.h"
-
+#include "mapows.h"


 #if defined(USE_WMS_LYR) && defined(USE_OGR)
--- a/mapdraw.c
+++ b/mapdraw.c
@@ -33,6 +33,7 @@
 #include "maptime.h"
 #include "mapcopy.h"
 #include "mapfile.h"
+#include "mapows.h"


 /* msPrepareImage()
--- a/mapkmlrenderer.cpp
+++ b/mapkmlrenderer.cpp
@@ -34,6 +34,7 @@
 #include "maperror.h"
 #include "mapkmlrenderer.h"
 #include "mapio.h"
+#include "mapows.h"

 #if defined(USE_OGR)
 #  include "cpl_conv.h"
Contributor

sebastic commented Jul 10, 2015

The patch was applied:

dpkg-source: info: applying missing-mapows.h-includes.patch

This is included in the patch:

From 6aa5873862fb86b2b418de990e0b1319ff05b9e7 Mon Sep 17 00:00:00 2001
From: Thomas Bonfort <thomas.bonfort@gmail.com>
Date: Thu, 9 Jul 2015 15:24:32 +0200
Subject: [PATCH] missing mapows.h includes

---
 mapcontext.c       | 2 +-
 mapdraw.c          | 1 +
 mapkmlrenderer.cpp | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

--- a/mapcontext.c
+++ b/mapcontext.c
@@ -27,7 +27,7 @@
  ****************************************************************************/

 #include "mapserver.h"
-
+#include "mapows.h"


 #if defined(USE_WMS_LYR) && defined(USE_OGR)
--- a/mapdraw.c
+++ b/mapdraw.c
@@ -33,6 +33,7 @@
 #include "maptime.h"
 #include "mapcopy.h"
 #include "mapfile.h"
+#include "mapows.h"


 /* msPrepareImage()
--- a/mapkmlrenderer.cpp
+++ b/mapkmlrenderer.cpp
@@ -34,6 +34,7 @@
 #include "maperror.h"
 #include "mapkmlrenderer.h"
 #include "mapio.h"
+#include "mapows.h"

 #if defined(USE_OGR)
 #  include "cpl_conv.h"
@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort
Member

tbonfort commented Jul 10, 2015

@sebastic

This comment has been minimized.

Show comment
Hide comment
@sebastic

sebastic Jul 10, 2015

Contributor

Thanks, with the full patch the build succeeds (log)

Contributor

sebastic commented Jul 10, 2015

Thanks, with the full patch the build succeeds (log)

@tbonfort tbonfort merged commit 1754752 into mapserver:branch-7-0 Jul 10, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

tbonfort added a commit that referenced this pull request Jul 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment