CSpider icon indicating copy to clipboard operation
CSpider copied to clipboard

Issues with compiling dev branch

Open AntonioCS opened this issue 9 years ago • 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?

AntonioCS avatar Dec 27 '15 22:12 AntonioCS

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 .

ghost avatar Dec 27 '15 23:12 ghost

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

luohaha avatar Dec 28 '15 00:12 luohaha

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

AntonioCS avatar Dec 28 '15 00:12 AntonioCS

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

luohaha avatar Dec 28 '15 02:12 luohaha

feel free to modify.

mzer0-yu avatar Dec 28 '15 02:12 mzer0-yu

@luohaha why?

mzer0-yu avatar Dec 28 '15 02:12 mzer0-yu

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

luohaha avatar Dec 28 '15 02:12 luohaha

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

mzer0-yu avatar Dec 28 '15 03:12 mzer0-yu

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

luohaha avatar Dec 28 '15 03:12 luohaha

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

mzer0-yu avatar Dec 28 '15 03:12 mzer0-yu

@mzer0-yu dev branch has been added.

ghost avatar Dec 28 '15 08:12 ghost

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

mzer0-yu avatar Dec 28 '15 13:12 mzer0-yu