luohaha / CSpider

A scalable and convenient crawler framework in C:).
https://github.com/luohaha/CSpider
MIT License
367 stars 98 forks source link

Issues with compiling dev branch #34

Open AntonioCS opened 8 years ago

AntonioCS commented 8 years ago

I have compiled the master branch (before the addition of liburi) and I had no issues, but after switching to the dev branch and doing: make

I got the following output:

gcc -ggdb -o3 -w -I includes -I /usr/include/libxml2 -fpic -c -o pageProcesser/cs_page.o pageProcesser/cs_page.c In file included from pageProcesser/cs_page.c:1:0: includes/cs_page.h:37:3: error: unknown type name ‘cs_page’ cs_page _pages; ^ includes/cs_page.h:42:17: error: unknown type name ‘cs_page’ void clear_page(cs_page p); ^ includes/cs_page.h:44:19: error: unknown type name ‘cs_page’ void destroy_page(cs_page p); ^ includes/cs_page.h:46:14: error: unknown type name ‘cs_page’ int new_page(cs_page p, unsigned int capacity); ^ includes/cs_page.h:48:14: error: unknown type name ‘cs_page’ int set_page(cs_page p, char_ context, unsigned int length); ^ pageProcesser/cs_page.c:9:17: error: unknown type name ‘cs_page’ void clear_page(cs_page _p) { ^ pageProcesser/cs_page.c:23:19: error: unknown type name ‘cs_page’ void destroy_page(cs_page p) { ^ pageProcesser/cs_page.c:35:14: error: unknown type name ‘cs_page’ int new_page(cs_page p, unsigned int capacity) { ^ pageProcesser/cs_page.c:55:14: error: unknown type name ‘cs_page’ int set_page(cspage *p, char context, unsigned int length) { ^ make: *\ [pageProcesser/cs_page.o] Error 1

Am I missing anything? Or is this an actual makefile issue?

ghost commented 8 years ago

in includes/cs_page.h <-- ADD :

#include "CS.h"
#define BadPageID ((unsigned int) -1)
typedef unsigned int page_queue_id;
typedef unsigned int page_id;

in includes/cs_string.h <-- ADD:

#include <stdbool.h>

in pageProcesser/page_queue.c line 76:

remove int i in for loop, [ c99 loop variable declaration ].

then you are good to go. This is a dirty fix if you just want to test the dev branch. Probably tomorrow guys will take care of that .

luohaha commented 8 years ago

I think about leave this job to mzer0-yu. Everyone should be responsible for his code. Make sure it run normally before push.

AntonioCS commented 8 years ago

@luohaha Yes that should be obvious. The code should work on their branch and then merged to dev or master

luohaha commented 8 years ago

I have moved luohaha/CSpider to xonce/CSpider already.

mzer0-yu commented 8 years ago

feel free to modify.

mzer0-yu commented 8 years ago

@luohaha why?

luohaha commented 8 years ago

@mzer0-yu Make sure your code work on your branch, and then push. If you can't, do not push it.

mzer0-yu commented 8 years ago

@luohaha OK. Something changed in my codes since the URI part pushed. Why moved to the xonce repository?

luohaha commented 8 years ago

I accept @mitghi 's suggestion to do that. I am kind of busy to deal with CSpider alone.

mzer0-yu commented 8 years ago

@mitghi the moved one didn't have a dev branch.

ghost commented 8 years ago

@mzer0-yu dev branch has been added.

mzer0-yu commented 8 years ago

@luohaha @mitghi I found the reason of failing in master branch: one of PRs wasn't merged, whatever it should have been.