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

VC10 - build error #47

Closed
htalbot opened this issue Jan 2, 2016 · 24 comments
Closed

VC10 - build error #47

htalbot opened this issue Jan 2, 2016 · 24 comments
Assignees
Milestone

Comments

@htalbot
Copy link

htalbot commented Jan 2, 2016

Hi,

I try to build libconfig-1.6 with VC10 and I got this:

scanner.l(137): warning C4047: 'function' : 'const char ' differs in levels of indirection from 'const char *'
1>scanner.l(137): warning C4024: 'scanctx_push_include' : different types for formal and actual parameter 3
1>scanner.l(137): error C2198: 'scanctx_push_include' : too few arguments for call

Thanks

Hubert

@htalbot
Copy link
Author

htalbot commented Jan 3, 2016

Also, dirent.h is not part of Visual Studio by default.

scanctx.c(29): fatal error C1083: Cannot open include file: 'dirent.h': No such file or directory
1> scanner.c
1>scanner.l(137): warning C4047: 'function' : 'const char ' differs in levels of indirection from 'const char *'
1>scanner.l(137): warning C4024: 'scanctx_push_include' : different types for formal and actual parameter 3
1>scanner.l(137): error C2198: 'scanctx_push_include' : too few arguments for call
1> strbuf.c
1> Generating Code...
1>
1>Build FAILED.

Regards.

Hubert

@dnadlinger
Copy link

Also happens with Visual Studio 2015, see e.g. here: https://ci.appveyor.com/project/kinke/ldc/build/1.0.700/job/4y05cqr4eviabn77

@jltallon
Copy link
Collaborator

jltallon commented Jan 3, 2016

Yes, indeed. We know it.
A v1.6.1 release, with portability fixes, is on the works.

Meanwhile, v1.5 should compile fine on VS2010 --- though it lacks the new features, of course.

@jltallon jltallon self-assigned this Jan 3, 2016
@alspitz
Copy link

alspitz commented Jan 5, 2016

I get the same error using GCC 5.1.0:

scanner.l: In function 'libconfig_yylex':
scanner.l:137:53: warning: passing argument 3 of 'scanctx_push_include' from incompatible pointer type [-Wincompatible-pointer-types]
                     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:135:32: error: too few arguments to function 'scanctx_push_include'
 <STRING>\\\"      { scanctx_append_string(yyextra, "\""); }
                                ^
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,

Also when downgrading to 1.5, I noticed that Makefile.in is not included in the git release. The tar on your old website does however.

@scandariato
Copy link

I just cloned the repo and tried to build 1.6 (32-bit Ubuntu 14.04, gcc 4.9.3, flex 2.5.39, bison 3.02) and got the same error.

I deleted lib/scanner.{c,h}, reran make and all was well.

@jltallon jltallon added this to the libconfig1.6 milestone Jan 8, 2016
@ghost
Copy link

ghost commented Jan 12, 2016

I have the same error as @pumaking when compiling libconfig1.6 on ARM... removing lib/scanner.{c.h} fixed the error for me as well!

@jltallon
Copy link
Collaborator

Confirmed. The re-generated lib/scanner.[ch] were not included in the commits.
The version included in the repo/tarfile corresponds to a previous version of the library (1.5)

@CamilleScholtz
Copy link

Erm, is this ever gonna get fixed?

@hyperrealm
Copy link
Owner

Please just download the 1.5 tarball from http://www.hyperrealm.com/libconfig/
for now.

@TETYYS
Copy link

TETYYS commented Jul 6, 2016

that one doesn't work too, #65 but i guess i can modify it as said in the issue

@dnadlinger
Copy link

dnadlinger commented Jul 6, 2016

The tarball actually doesn't work for MSVC 2015, we (LDC) use have hardcoded the CI environment to use 7585cf6 for now.

@gdsotirov
Copy link

gdsotirov commented Aug 5, 2016

Same problem for me under Slackware 14.2 with GCC 5.3.0, but hopefully the workaround suggested by @scandariato works for me too, but I hope it's soon fixed upfront.

@dememax
Copy link

dememax commented Oct 11, 2016

Same problem for me under Gentoo with GCC 6.2.0, thanks to @scandariato I was able to regenerate problematic files.

I'm also surprised that other autoconf generated files are stored in the repository:

  • INSTALL
  • Makefile.in
  • ac_config.h.in
  • aux-build/config.guess
  • aux-build/config.sub
  • aux-build/ltmain.sh
  • configure
  • doc/Makefile.in
  • examples/Makefile.in
  • examples/c++/Makefile.in
  • examples/c/Makefile.in
  • lib/Makefile.in
  • m4/libtool.m4
  • m4/ltoptions.m4
  • m4/ltsugar.m4
  • m4/ltversion.m4
  • m4/lt~obsolete.m4
  • tests/Makefile.in
  • tinytest/Makefile.in

These files could be regenerated with the help of "autoreconf -f -v -i".

@atkawa7
Copy link

atkawa7 commented Jun 23, 2017

@hyperrealm Any progress?

@kyanha
Copy link

kyanha commented Aug 8, 2017

I'm getting a 500 server error when attempting to download from http://www.hyperrealm.com/libconfig/ .

@hyperrealm
Copy link
Owner

My latest commit should fix all these issues.

@mboisson
Copy link

Just hit this issue today. Neither release (1.5 or 1.6) currently available on github compiles, and the file for 1.5 is no longer there on the former site.

@atkawa7
Copy link

atkawa7 commented Oct 16, 2017

@mboisson If you are on windows you might take a look at vcpkg. They have a portfile

@mboisson
Copy link

@atkawa7 nope, on Linux, GCC 5.4.0

@hyperrealm
Copy link
Owner

Can you try the code from head?

I'll do a 1.7 label soon, but I need some more time to make a few more changes.

@mboisson
Copy link

The head seems to be building. However, since I'm building software for a cluster shared by thousands of users, I really don't want to build the head of anything, I want a release/version number.

@hyperrealm
Copy link
Owner

Understood. I'll try to get it done ASAP. I've been neglecting this project for the past couple of years because of other things tying up my time, so apologies for that.

@atkawa7
Copy link

atkawa7 commented Oct 16, 2017

@hyperrealm you do not have to apologize. It is because of guys like you who work on their free time that make this world of free and open source possible.

@jltallon
Copy link
Collaborator

jltallon commented Oct 16, 2017 via email

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

No branches or pull requests