google / gumbo-parser

An HTML5 parsing library in pure C99
Apache License 2.0
5.16k stars 663 forks source link

make error #420

Closed 873578156 closed 1 year ago

873578156 commented 4 years ago

Makefile:63: .depend: No such file or directory rm -f ./.depend cc -O2 -Wall -Wextra -Wshadow -rdynamic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"1.2.0\" pkg-config --cflags-only-I gumbo libcurl fuse uuid expat -MM src/cache.c src/fuse_local.c src/link.c src/main.c src/network.c src/sonic.c src/util.c -MF ./.depend; Package uuid was not found in the pkg-config search path. Perhaps you should add the directory containing uuid.pc' to the PKG_CONFIG_PATH environment variable No package 'uuid' found cc -O2 -Wall -Wextra -Wshadow -rdynamic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"1.2.0\"pkg-config --cflags-only-I gumbo libcurl fuse uuid expat`pkg-config --libs-only-L gumbo libcurl fuse uuid expat -c -o main.o src/main.c Package uuid was not found in the pkg-config search path. Perhaps you should add the directory containing uuid.pc' to the PKG_CONFIG_PATH environment variable No package 'uuid' found Package uuid was not found in the pkg-config search path. Perhaps you should add the directory containinguuid.pc' to the PKG_CONFIG_PATH environment variable No package 'uuid' found src/main.c: In function ‘main’: src/main.c:47:5: error: ‘for’ loop initial declarations are only allowed in C99 mode src/main.c:47:5: note: use option -std=c99 or -std=gnu99 to compile your code make: *** [main.o] Error 1 root@localhost:~/httpdirfs-master# aptcget install libcurl -bash: aptcget: command not found root@localhost:~/httpdirfs-master# apt-get install libcurl Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libcurl

ryandesign commented 2 years ago

You didn't mention what OS or compiler you're using, but the error messages are pretty clear...

Package uuid was not found in the pkg-config search path.

Install the uuid package.

src/main.c:47:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/main.c:47:5: note: use option -std=c99 or -std=gnu99 to compile your code

Add -std=c99 to your CFLAGS or use a compiler that defaults to C99 mode (or newer).