Building R igraph package in Win7 -
i made small change source code of igraph package because want implement forest fire method based on breadth first search method.
i used rtools build package , followed steps link. but, got error message:
foreign-graphml.c:38:29: fatal error: libxml/encoding.h: no such file or directory. i tested using source code, still had same error.
i used install.packages() method. still showed same error.
update: downloaded libxml2 , set bin location path. libxml/encoding.h file in 'include' folder. why error show?
you can build @ http://win-builder.r-project.org/upload.aspx, don't forget change description file include email address maintainer.
it quite tricky build because rtools has fixed (?) paths , looking libraries @ specific places, need put them there. build like
... if ! (subst | grep -qi ^d:); subst d: c:\\ fi pkg=`ls igraph*.tar.gz` zip=`echo $pkg | sed 's/.tar.gz/.zip/'` rfile="r-win/${zip}" oldpath=$path path=/cygdrive/c/program\ files/r/r-default/bin:/cygdrive/c/rtools/bin:/cygdrive/c/rtools/gcc-4.6.3/bin:$path lib_xml=c:/rcompile/cranpkg/extralibs64/local r cmd install -l . $pkg zip -r ${zip} igraph path=$oldpath ... this uses cygwin shell. can libraries here: http://www.stats.ox.ac.uk/pub/rtools/libs.html
Comments
Post a Comment