luohaha/CSpider

Issues with compiling dev branch

Opened this issue · 12 comments

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(cs_page *p, char
context, unsigned int length) {
^
make: *** [pageProcesser/cs_page.o] Error 1

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

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 .

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

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

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

feel free to modify.

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

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

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

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

@mzer0-yu dev branch has been added.

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