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

build fail with 0.5 release on CentOS 6 #13

Closed
z0mbix opened this issue Mar 8, 2016 · 8 comments
Closed

build fail with 0.5 release on CentOS 6 #13

z0mbix opened this issue Mar 8, 2016 · 8 comments

Comments

@z0mbix
Copy link

z0mbix commented Mar 8, 2016

I'm trying to build jo from the 0.5 release tarball on CentOS 6.7, but make check is failing with:

$ make check
  CC       json.o
In file included from json.c:24:
json.h:66: warning: declaration does not declare anything
json.c: In function ‘json_delete’:
json.c:414: error: ‘JsonNode’ has no member named ‘string_’
json.c:420: error: ‘JsonNode’ has no member named ‘children’
json.c: In function ‘json_first_child’:
json.c:482: error: ‘JsonNode’ has no member named ‘children’
json.c: In function ‘json_mkbool’:
json.c:503: error: ‘JsonNode’ has no member named ‘bool_’
json.c: In function ‘mkstring’:
json.c:510: error: ‘JsonNode’ has no member named ‘string_’
json.c: In function ‘json_mknumber’:
json.c:522: error: ‘JsonNode’ has no member named ‘number_’
json.c: In function ‘append_node’:
json.c:539: error: ‘JsonNode’ has no member named ‘children’
json.c:542: error: ‘JsonNode’ has no member named ‘children’
json.c:543: error: ‘JsonNode’ has no member named ‘children’
json.c:545: error: ‘JsonNode’ has no member named ‘children’
json.c:546: error: ‘JsonNode’ has no member named ‘children’
json.c: In function ‘prepend_node’:
json.c:553: error: ‘JsonNode’ has no member named ‘children’
json.c:555: error: ‘JsonNode’ has no member named ‘children’
json.c:556: error: ‘JsonNode’ has no member named ‘children’
json.c:558: error: ‘JsonNode’ has no member named ‘children’
json.c:559: error: ‘JsonNode’ has no member named ‘children’
json.c: In function ‘json_remove_from_parent’:
json.c:609: error: ‘JsonNode’ has no member named ‘children’
json.c:613: error: ‘JsonNode’ has no member named ‘children’
json.c: In function ‘emit_value’:
json.c:982: error: ‘JsonNode’ has no member named ‘bool_’
json.c:985: error: ‘JsonNode’ has no member named ‘string_’
json.c:988: error: ‘JsonNode’ has no member named ‘number_’
json.c: In function ‘emit_value_indented’:
json.c:1009: error: ‘JsonNode’ has no member named ‘bool_’
json.c:1012: error: ‘JsonNode’ has no member named ‘string_’
json.c:1015: error: ‘JsonNode’ has no member named ‘number_’
json.c: In function ‘emit_array_indented’:
json.c:1043: error: ‘JsonNode’ has no member named ‘children’
json.c: In function ‘emit_object_indented’:
json.c:1082: error: ‘JsonNode’ has no member named ‘children’
json.c: In function ‘json_check’:
json.c:1328: error: ‘JsonNode’ has no member named ‘bool_’
json.c:1328: error: ‘JsonNode’ has no member named ‘bool_’
json.c:1331: error: ‘JsonNode’ has no member named ‘string_’
json.c:1333: error: ‘JsonNode’ has no member named ‘string_’
json.c:1336: error: ‘JsonNode’ has no member named ‘children’
json.c:1337: error: ‘JsonNode’ has no member named ‘children’
make: *** [json.o] Error 1

Configure output:

$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for working strtod... yes
checking for strchr... yes
checking for strrchr... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for pandoc... no
configure: WARNING: pandoc not found, man pages rebuild will not be possible
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands

GCC version:

$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
@albix
Copy link
Contributor

albix commented Mar 8, 2016

it works w/o autoconf

# cat /etc/centos-release
CentOS release 6.7 (Final)
# gcc -Wall -c json.c json.h
# gcc -D"PACKAGE_VERSION=\"0.5\"" -Wall -o jo jo.c json.o
# ./jo foo=bar
{"foo":"bar"}

Update: -std=c99 is bad. But I've got no idea how to fix it

@jpmens
Copy link
Owner

jpmens commented Mar 8, 2016

I'm a bit stumped, and I must confess, I'm a complete autoconf newbie!
Any idea what's going on? I had to add AC_USE_SYSTEM_EXTENSIONS; is it that?

@jpmens
Copy link
Owner

jpmens commented Mar 8, 2016

@z0mbix Can you try with version 0.3 please? Does that work?

@jpmens
Copy link
Owner

jpmens commented Mar 8, 2016

@z0mbix No need to: I can reproduce on a CentOS 6 here.

@jpmens jpmens closed this as completed in 0b850c8 Mar 8, 2016
@jpmens
Copy link
Owner

jpmens commented Mar 8, 2016

I've built 0.6.

@albix
Copy link
Contributor

albix commented Mar 8, 2016

👍

@z0mbix
Copy link
Author

z0mbix commented Mar 8, 2016

@jpmens Many thanks for the quick turnaround. That's done the trick! I can now build an RPM and deploy this everywhere 😄

@jpmens
Copy link
Owner

jpmens commented Mar 8, 2016

Thanks for your patience and feedback. :-)

gromgit added a commit to gromgit/jo that referenced this issue Jun 12, 2017
This also changes the result of test jpmens#13. KV pairs are now output
in the order of *first definition*, instead of *last change*.
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

3 participants