vmg / sundown

Standards compliant, fast, secure markdown processing library in C
1.99k stars 385 forks source link

No longer builds. Missing stack.h? #63

Closed finsprings closed 13 years ago

finsprings commented 13 years ago

I just pulled b9670c1570b92b585d202815933aa097dc980448 and it doesn't build for me on OS X Lion:

$ make
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o src/markdown.o src/markdown.c
src/markdown.c:21:19: error: stack.h: No such file or directory
src/markdown.c:111: error: array type has incomplete element type
src/markdown.c: In function ‘rndr_newbuf’:
src/markdown.c:127: error: dereferencing pointer to incomplete type
src/markdown.c:127: error: dereferencing pointer to incomplete type
src/markdown.c:128: error: dereferencing pointer to incomplete type
src/markdown.c:128: error: dereferencing pointer to incomplete type
src/markdown.c:129: error: dereferencing pointer to incomplete type
src/markdown.c:129: error: dereferencing pointer to incomplete type
cc1: warnings being treated as errors
src/markdown.c:133: warning: implicit declaration of function ‘stack_push’
src/markdown.c: In function ‘add_link_ref’:
src/markdown.c:183: warning: implicit declaration of function ‘calloc’
src/markdown.c:183: warning: incompatible implicit declaration of built-in function ‘calloc’
src/markdown.c: In function ‘free_link_refs’:
src/markdown.c:228: warning: implicit declaration of function ‘free’
src/markdown.c: In function ‘parse_table_header’:
src/markdown.c:1910: warning: incompatible implicit declaration of built-in function ‘calloc’
src/markdown.c: In function ‘sd_markdown_new’:
src/markdown.c:2227: warning: implicit declaration of function ‘malloc’
src/markdown.c:2227: warning: incompatible implicit declaration of built-in function ‘malloc’
src/markdown.c:2233: warning: implicit declaration of function ‘stack_init’
src/markdown.c: In function ‘sd_markdown_free’:
src/markdown.c:2354: warning: implicit declaration of function ‘stack_free’
vmg commented 13 years ago

Apologies, forgot to add the new files. On a related topic, don't use this on production until I tag 2.0 (soon). The library is kind of unstable right now. Cheers!

finsprings commented 13 years ago

Thanks for the heads up on stability. sundown builds now but the examples fail:

$ make
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o src/markdown.o src/markdown.c
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o src/stack.o src/stack.c
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o src/buffer.o src/buffer.c
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o src/autolink.o src/autolink.c
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o html/html.o html/html.c
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o html/html_smartypants.o html/html_smartypants.c
gcc -g -O3 -Wall -Werror  -shared -Wl src/markdown.o src/stack.o src/buffer.o src/autolink.o html/html.o html/html_smartypants.o -o libsundown.so.1
ln -f -s libsundown.so.1 libsundown.so
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o examples/sundown.o examples/sundown.c
gcc -g -O3 -Wall -Werror  examples/sundown.o src/markdown.o src/stack.o src/autolink.o src/buffer.o html/html.o html/html_smartypants.o -o sundown
gcc -c -g -O3 -fPIC -Wall -Werror -Isrc -Ihtml    -c -o examples/smartypants.o examples/smartypants.c
gcc -g -O3 -Wall -Werror  examples/smartypants.o src/buffer.o html/html_smartypants.o html/html.o src/autolink.o -o smartypants
make: *** No rule to make target `html_block_names.txt', needed by `src/html_blocks.h'.  Stop.