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

Error Building #53

Closed
legonigel opened this issue Feb 1, 2016 · 7 comments
Closed

Error Building #53

legonigel opened this issue Feb 1, 2016 · 7 comments

Comments

@legonigel
Copy link

I cloned the repo, ran ./configure then make and I get the following error I have no idea what this issue is:

make[3]: Entering directory `/home/nigel/git/libconfig/lib'
  CC       libconfig_la-libconfig.lo
  CC       libconfig_la-scanner.lo
scanner.l: In function 'libconfig_yylex':
scanner.l:137:53: warning: passing argument 3 of 'scanctx_push_include' from incompatible pointer type [enabled by default]
                     char c[2] = { (char)(strtol(yytext + 2, NULL, 16) & 0xFF),
                                                     ^
In file included from scanner.l:46:0:
scanctx.h:66:14: note: expected 'const char *' but argument is of type 'const char **'
 extern FILE *scanctx_push_include(struct scan_context *ctx, void *prev_buffer,
              ^
scanner.l:137:53: error: too few arguments to function 'scanctx_push_include'
                     char c[2] = { (char)(strtol(yytext + 2, NULL, 16) & 0xFF),
                                                     ^
In file included from scanner.l:46:0:
scanctx.h:66:14: note: declared here
 extern FILE *scanctx_push_include(struct scan_context *ctx, void *prev_buffer,
              ^
make[3]: *** [libconfig_la-scanner.lo] Error 1
make[3]: Leaving directory `/home/nigel/git/libconfig/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/nigel/git/libconfig/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nigel/git/libconfig'
make: *** [all] Error 2

Full Configure information Pastebin

@plangevin
Copy link

Same thing here. On Ubuntu 15.10 with make 4.0.

Edit:---
Seems to be the same problem than issue #47

@luongnv89
Copy link

I got the same problem. Ubuntu Server 14.04 with make 3.81
@legonigel @plangevin Did you find any solution?

@ilovezfs
Copy link

ilovezfs commented Jun 6, 2016

Actually this seems to be sufficient:

diff --git a/lib/scanner.c b/lib/scanner.c
index dc07eb0..3afc606 100644
--- a/lib/scanner.c
+++ b/lib/scanner.c
@@ -1072,6 +1072,7 @@ YY_RULE_SETUP
                     const char *error;
                     FILE *fp = scanctx_push_include(yyextra,
                                                     (void *)YY_CURRENT_BUFFER,
+                                                    scanctx_getpath(yyextra),
                                                     &error);
                     if(fp)
                     {

@ilovezfs
Copy link

ilovezfs commented Jun 6, 2016

And actually it seems you can even just delete the file, and run configure, which makes since since it's a generated file, so probably shouldn't be checked into source control anyway.

@jmccrohan
Copy link

Any update on this?

I'd like to upload 1.6.1 to Debian soon.

Cheers,
Jon

@hyperrealm
Copy link
Owner

I've removed the generated files from the repo.

oleg-st added a commit to oleg-st/libconfig that referenced this issue Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants