MantisBT - NetSurf
View Issue Details
0002632NetSurf[All Projects] Generalpublic2019-01-14 03:422019-07-19 08:33
ReporterSamuel Holland 
Assigned ToVincent Sanders 
PlatformLinuxOSmuslOS Version
Product Version 
Target VersionFixed in Version3.9 
Fixed in CI build #
Reported in CI build #
URL of problem page
Summary0002632: Duplicate definition of global variable in nsgenbind
DescriptionGlobal variable errtxt is defined in two separate files. This is a minor C standard conformance issue, and causes the build to fail with a duplicate symbol error when CFLAGS includes "-fno-common". The following patch fixes the issue by making the variables static.

--- nsgenbind-0.6/src/nsgenbind-parser.y.orig
+++ nsgenbind-0.6/src/nsgenbind-parser.y
@@ -91,7 +91,7 @@ typedef struct YYLTYPE {
 #include "webidl-ast.h"
 #include "nsgenbind-ast.h"
-char *errtxt;
+static char *errtxt;
 static void nsgenbind_error(YYLTYPE *locp,
                             char *filename,
--- nsgenbind-0.6/src/webidl-parser.y.orig
+++ nsgenbind-0.6/src/webidl-parser.y
@@ -32,7 +32,7 @@
 #include "webidl-ast.h"
-char *errtxt;
+static char *errtxt;
 static void
 webidl_error(YYLTYPE *locp, struct webidl_node **winbind_ast, const char *str)
TagsNo tags attached.
Attached Files

Vincent Sanders   
2019-02-15 18:06   
thanks for the report
fix applied to nsgenbind as commit 9298fea93f101a417bbd15a879f319fcdcf41cf0
Vincent Sanders   
2019-07-19 08:33   
we believe this issue has been resolved in NetSurf 3.9

Issue History
2019-01-14 03:42Samuel HollandNew Issue
2019-02-15 18:06Vincent SandersAssigned To => Vincent Sanders
2019-02-15 18:06Vincent SandersStatusnew => resolved
2019-02-15 18:06Vincent SandersResolutionopen => fixed
2019-02-15 18:06Vincent SandersFixed in Version => 3.9
2019-02-15 18:06Vincent SandersNote Added: 0001874
2019-07-19 08:33Vincent SandersStatusresolved => closed
2019-07-19 08:33Vincent SandersNote Added: 0002022