Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install issue due to XML dependency #19

Closed
rgommers opened this issue Jun 11, 2018 · 3 comments
Closed

install issue due to XML dependency #19

rgommers opened this issue Jun 11, 2018 · 3 comments
Assignees

Comments

@rgommers
Copy link

Hi, clifro looks quite nice, but unfortunately I have trouble installing it. This is due to the XML dependency; XML is orphaned and seems to be superceded by xml2 which installs fine.

The install traceback is below. It's the same issue as https://stackoverflow.com/questions/31780379/error-installing-r-package-clifro. Note that I do have libxml2 and its dev headers installed, but somehow XML doesn't like it (while xml2 does). There are many other reports on StackOverflow and on issue trackers about the same XML problem. I don't know how much work it is, but transitioning to xml2 would probably be really helpful.

> install.packages('clifro')
--- Please select a CRAN mirror for use in this session ---
Secure CRAN mirrors 

 1: 0-Cloud [https]                   2: Algeria [https]                
 3: Australia (Canberra) [https]      4: Australia (Melbourne 1) [https]
 5: Australia (Melbourne 2) [https]   6: Australia (Perth) [https]      
 7: Austria [https]                   8: Belgium (Ghent) [https]        
 9: Brazil (PR) [https]              10: Brazil (RJ) [https]            
11: Brazil (SP 1) [https]            12: Brazil (SP 2) [https]          
13: Bulgaria [https]                 14: Chile 1 [https]                
15: Chile 2 [https]                  16: China (Guangzhou) [https]      
17: China (Lanzhou) [https]          18: China (Shanghai 1) [https]     
19: China (Shanghai 2) [https]       20: Colombia (Cali) [https]        
21: Czech Republic [https]           22: Denmark [https]                
23: East Asia [https]                24: Ecuador (Cuenca) [https]       
25: Ecuador (Quito) [https]          26: Estonia [https]                
27: France (Lyon 1) [https]          28: France (Lyon 2) [https]        
29: France (Marseille) [https]       30: France (Montpellier) [https]   
31: France (Paris 2) [https]         32: Germany (Erlangen) [https]     
33: Germany (Göttingen) [https]      34: Germany (Münster) [https]      
35: Greece [https]                   36: Iceland [https]                
37: India [https]                    38: Indonesia (Jakarta) [https]    
39: Ireland [https]                  40: Italy (Padua) [https]          
41: Japan (Tokyo) [https]            42: Japan (Yonezawa) [https]       
43: Korea (Seoul 1) [https]          44: Korea (Ulsan) [https]          
45: Malaysia [https]                 46: Mexico (Mexico City) [https]   
47: Norway [https]                   48: Philippines [https]            
49: Serbia [https]                   50: Spain (A Coruña) [https]       
51: Spain (Madrid) [https]           52: Sweden [https]                 
53: Switzerland [https]              54: Turkey (Denizli) [https]       
55: Turkey (Mersin) [https]          56: UK (Bristol) [https]           
57: UK (Cambridge) [https]           58: UK (London 1) [https]          
59: USA (CA 1) [https]               60: USA (IA) [https]               
61: USA (KS) [https]                 62: USA (MI 1) [https]             
63: USA (NY) [https]                 64: USA (OR) [https]               
65: USA (TN) [https]                 66: USA (TX 1) [https]             
67: Vietnam [https]                  68: (other mirrors)                


Selection: 64
also installing the dependency ‘XML’

trying URL 'https://ftp.osuosl.org/pub/cran/src/contrib/XML_3.98-1.11.tar.gz'
Content type 'application/x-gzip' length 1599533 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

trying URL 'https://ftp.osuosl.org/pub/cran/src/contrib/clifro_3.1-5.tar.gz'
Content type 'application/x-gzip' length 2512434 bytes (2.4 MB)
==================================================
downloaded 2.4 MB

* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /usr/bin/sed
checking for pkg-config... no
checking for xml2-config... /Users/rgommers/anaconda3/envs/R/bin/xml2-config
USE_XML2 = yes
SED_EXTENDED_ARG: -E
Minor 9, Patch 8 for 2.9.8
Located parser file -I/Users/rgommers/anaconda3/envs/R/include/libxml2 -I/Users/rgommers/anaconda3/envs/R/include/parser.h
Checking for 1.8:  -I/Users/rgommers/anaconda3/envs/R/include/libxml2 -I/Users/rgommers/anaconda3/envs/R/include
Using libxml2.*
checking for gzopen in -lz... yes
checking for xmlParseFile in -lxml2... yes
You are trying to use a version 2.* edition of libxml
but an incompatible library. The header files and library seem to be
mismatched. If you have specified LIBXML_INCDIR, make certain to also
specify an appropriate LIBXML_LIBDIR if the libxml2 library is not in the default
directories.
ERROR: configuration failed for package ‘XML’
* removing ‘/Users/rgommers/anaconda3/envs/R/lib/R/library/XML’
ERROR: dependency ‘XML’ is not available for package ‘clifro’
* removing ‘/Users/rgommers/anaconda3/envs/R/lib/R/library/clifro’

The downloaded source packages are in
	‘/private/var/folders/jx/kgbqlb9d79bdryknhdp7wb040000gn/T/RtmpmaAjWJ/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("clifro") :
  installation of package ‘XML’ had non-zero exit status
2: In install.packages("clifro") :
  installation of package ‘clifro’ had non-zero exit status
> 
@blasee blasee self-assigned this Jun 15, 2018
@blasee
Copy link
Contributor

blasee commented Jun 15, 2018

Hi @rgommers,

Thanks for this. It seems as though updating clifro to rely on more modern packages for parsing the HTML/XML is the way to go. I'm not sure how big a job this is yet, but I'll check it out.

Cheers,
Blake

@blasee
Copy link
Contributor

blasee commented Jun 28, 2018

Hi @rgommers,

Can you please try installing the latest development version of clifro:

devtools::install_github("ropensci/clifro")

I've removed the XML dependency. Let me know if this solves the issue.

Cheers,
Blake

@rgommers
Copy link
Author

That works like a charm; examples from the README give the expected results. Thanks a lot @blasee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants