tim-janik / rapicorn

Rapicorn is a toolkit for declarative UI construction and SVG-based theming
https://rapicorn.testbit.org/
Mozilla Public License 2.0
12 stars 2 forks source link

rapicorn 17.0.0 not building on archlinux #13

Open kolewu opened 7 years ago

kolewu commented 7 years ago

I have tried to compile rapicorn 17.0.0 under current archlinux. Since it has very recent versions of all tools and libraries, I have expected some problems. But since I'm not very comfortable with flex and bison, I can't make any sense of these error:

  CXX      ui/ui_librapicorn_17_la-sinfex.lo
ui/sinfex.cc: In function ‘int {anonymous}::bison_yylex({anonymous}::BISON_YYSTYPE*, {anonymous}::BISON_YYLTYPE*, void*)’:
ui/sinfex.cc:419:1: error: redefinition of ‘int {anonymous}::bison_yylex({anonymous}::BISON_YYSTYPE*, {anonymous}::BISON_YYLTYPE*, void*)’
 bison_yylex (YYSTYPE *yylval_param, // %union from sinfex.y
 ^~~~~~~~~~~

ui/sinfex.cc:428:16: error: ‘flex_yylex’ was not declared in this scope
   int result = flex_yylex (yylval_param, yylloc_param, yyscanner);
                ^~~~~~~~~~

To come to this point, I have to make the following changes:

diff --git a/rcore/aidasignal.hh b/rcore/aidasignal.hh
index 7d78145a..960c5305 100644
--- a/rcore/aidasignal.hh
+++ b/rcore/aidasignal.hh
@@ -2,6 +2,8 @@
 #ifndef __RAPICORN_AIDA_SIGNAL_HH__
 #define __RAPICORN_AIDA_SIGNAL_HH__

+#include <functional>
+
 namespace Rapicorn { namespace Aida {

 namespace Lib {
diff --git a/ui/sinfex.l b/ui/sinfex.l
index a1bc9b70..ff68208a 100644
--- a/ui/sinfex.l
+++ b/ui/sinfex.l
@@ -2,7 +2,7 @@
  *                                                 -*-mode:c++;-*-
  */
 %option 8bit reentrant stack noyywrap yylineno
-%option ansi-definitions ansi-prototypes nounistd
+%option nounistd
 %option bison-bridge bison-locations
 %option nodefault warn
 %option prefix="flex_yy"

and call configuration with

PYTHON=python2 ./autogen.sh

I'm not sure, why my version of flex 2.6.4 barks upon ansi-definitions and ansi-prototypes, even if the manual (for the same version) states, that they are deprecated and ignored.

tim-janik commented 7 years ago

Thanks for giving an arch build a try Uwe. I've not seen that error before (using flex 2.6.0 here). Is there an arch Dockerfile somewhere that I could use to reproduce this?

kolewu commented 7 years ago

https://hub.docker.com/r/base/archlinux/ or https://hub.docker.com/r/base/devel/ with base-devel package group installed. These are images referred to from the the Docker - ArchWiki and I don't have any experiences with them.