Skip to content
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

c++ support for r3 can't compile on gcc-4.1.2 #84

Open
coney opened this issue Oct 12, 2015 · 2 comments
Open

c++ support for r3 can't compile on gcc-4.1.2 #84

coney opened this issue Oct 12, 2015 · 2 comments
Labels

Comments

@coney
Copy link

coney commented Oct 12, 2015

when compiling the example simple_cpp.cpp, the typedef from pcre header causes a compile error:

In file included from ../include/r3.hpp:11,
                 from simple_cpp.cpp:4:
../include/r3.h:50: error: declaration of ‘pcre_extra* _node::pcre_extra’
/usr/local/include/pcre.h:385: error: changes meaning of ‘pcre_extra’ from ‘typedef struct pcre_extra pcre_extra’
In file included from simple_cpp.cpp:4:

the code snippet from pcre.h:385:

typedef struct pcre_extra {
  unsigned long int flags;        /* Bits for which fields are set */
  void *study_data;               /* Opaque data from pcre_study() */
  unsigned long int match_limit;  /* Maximum number of calls to match() */
  void *callout_data;             /* Data passed back in callouts */
  const unsigned char *tables;    /* Pointer to character tables */
  unsigned long int match_limit_recursion; /* Max recursive calls to match() */
  unsigned char **mark;           /* For passing back a mark pointer */
  void *executable_jit;           /* Contains a pointer to a compiled jit code */
} pcre_extra;
@c9s c9s added the bug label Oct 26, 2015
@zhiyong0804
Copy link

yes, i encounter this error on centos 6, what‘s should we do?

@bjosv
Copy link
Collaborator

bjosv commented Oct 26, 2023

When building r3 and simple_cpp.cpp using an old compiler like g++-4.4.7 you get this build error.
It compiles just fine if you use a later GCC like 4.8 (from March 2013), so the recommendation is to use a more recent compiler.

Since CentOS 6 is EOF (End of life) since 2020 you should at least use CentOS 7, which provides g++-4.8.5 and works fine when I compared.

Are we OK with closing this issue with above recommendation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants