<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class=""><div class=""><div></div><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 15, 2021, at 9:20 PM, Kemal Akat <<a href="mailto:kma460414@gmail.com" class="">kma460414@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Duncan and Simon,<div class=""><br class=""></div><div class="">Thanks for getting back to me.</div><div class=""><br class=""></div><div class="">The R version I use(d) is </div><div class=""><br class=""></div><div class="">R Under development (unstable) (2021-01-15 r79833)</div><div class=""><br class=""></div><div class="">This was installed via the installer package downloaded from <a href="https://mac.r-project.org/" class="">https://mac.r-project.org</a>. It was not compiled from source. That was the case on all Macs.</div><div class=""><br class=""></div><div class="">Please note that the partially log at the bottom of my original message is from a successful compilation on a Mac where ‘install.packages(“XML”) works. It includes references to the CommandLineTools/SDK but that was completely without my doing. I tried it explicitly in various forms, though, when I thought this is the right way. Thanks for clarifying it is not.</div><div class=""><br class=""></div><div class="">Now, on the Mac where I still have trouble, the output from ‘install.packages(“XML”) is (rather brief):</div><div class=""><br class=""></div><div class=""><div class="">> install.packages("XML")</div><div class="">Warning: unable to access index for repository <a href="https://mac.r-project.org/bin/macosx/contrib/4.1:" class="">https://mac.R-project.org/bin/macosx/contrib/4.1:</a></div><div class=""> cannot open URL '<a href="https://mac.r-project.org/bin/macosx/contrib/4.1/PACKAGES" class="">https://mac.R-project.org/bin/macosx/contrib/4.1/PACKAGES</a>'</div><div class="">Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘XML’</div><div class="">Do you want to attempt to install these from sources? (Yes/no/cancel) Yes</div><div class="">installing the source package ‘XML’</div><div class=""><br class=""></div><div class="">trying URL '<a href="https://mac.r-project.org/src/contrib/XML_3.99-0.5.tar.gz" class="">https://mac.R-project.org/src/contrib/XML_3.99-0.5.tar.gz</a>'</div><div class="">Content type 'application/x-gzip' length 968563 bytes (945 KB)</div><div class="">==================================================</div><div class="">downloaded 945 KB</div><div class=""><br class=""></div><div class="">* installing *source* package ‘XML’ ...</div><div class="">** package ‘XML’ successfully unpacked and MD5 sums checked</div><div class="">** using staged installation</div><div class="">checking for gcc... gcc</div><div class="">checking whether the C compiler works... yes</div><div class="">checking for C compiler default output file name... a.out</div><div class="">checking for suffix of executables...</div><div class="">checking whether we are cross compiling... no</div><div class="">checking for suffix of object files... o</div><div class="">checking whether we are using the GNU C compiler... yes</div><div class="">checking whether gcc accepts -g... yes</div><div class="">checking for gcc option to accept ISO C89... none needed</div><div class="">checking how to run the C preprocessor... gcc -E</div><div class="">checking for sed... /usr/bin/sed</div><div class="">checking for pkg-config... /usr/local/bin/pkg-config</div><div class="">checking for xml2-config... /usr/bin/xml2-config</div><div class="">USE_XML2 = yes</div><div class="">SED_EXTENDED_ARG: -E</div><div class="">Minor 9, Patch 4 for 2.9.4</div><div class="">Located parser file -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/parser.h</div><div class="">Checking for 1.8: -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include</div><div class="">Using libxml2.*</div><div class="">checking for gzopen in -lz... yes</div><div class="">checking for xmlParseFile in -lxml2... yes</div><div class="">You are trying to use a version 2.* edition of libxml</div><div class="">but an incompatible library. The header files and library seem to be</div><div class="">mismatched. If you have specified LIBXML_INCDIR, make certain to also</div><div class="">specify an appropriate LIBXML_LIBDIR if the libxml2 library is not in the default</div><div class="">directories.</div><div class="">ERROR: configuration failed for package ‘XML’</div><div class="">* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/XML’</div><div class="">* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/XML’</div><div class=""><br class=""></div><div class="">The downloaded source packages are in</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>‘/private/var/folders/j8/1gn6jwcx4bv8td2h83ghk1hh0000gp/T/RtmpXuYoas/downloaded_packages’</div><div class="">Warning message:</div><div class="">In install.packages("XML") :</div><div class=""> installation of package ‘XML’ had non-zero exit status</div><div class="">></div></div><div class=""><br class=""></div><div class="">Best,</div><div class="">Kemal</div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 15, 2021, at 5:42 PM, Simon Urbanek <<a href="mailto:simon.urbanek@R-project.org" class="">simon.urbanek@R-project.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Kemal,<br class=""><br class="">what Duncan said, since what you provided does not include any of the information needed.<br class=""><br class="">In addition, you should not include SDK paths directly - SDK is used by the dev tools and does *not* include the actual libraries. So when you say /foo/bar it is actually searched inside the SDK the compiler is using. If you happen to use compilers that don't use SDKs (non-Apple) then you can use -isysroot to specify the SDK root (hopefully not your case as that is a whole can of worms). In addition, the issue may come from your version of R as well so the exact information about that is also need (how you compiled it, which flags etc.).<br class=""><br class="">Cheers,<br class="">Simon<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Feb 16, 2021, at 4:26 AM, Duncan Temple Lang via R-SIG-Mac <<a href="mailto:r-sig-mac@r-project.org" class="">r-sig-mac@r-project.org</a>> wrote:<br class=""><br class="">Hi Kemal<br class="">Can you please send the output from the entire installation attempt, and<br class="">also the config.log file.<br class=""><br class="">Thanks<br class="">Duncan<br class=""><br class=""><br class="">On Mon, Feb 15, 2021 at 5:14 AM Kemal Akat <<a href="mailto:kma460414@gmail.com" class="">kma460414@gmail.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">Hello all,<br class=""><br class="">I have to compile the XML package from source for R 4.1 (development<br class="">version) on a Mac with OS version 10.15.7. It works well on all machines<br class="">that do not come with any significant ballast on developer tools. One<br class="">machine, however, that I have used for some time returns a mismatch of<br class="">header files and library. I looked into possible offenders and purged what<br class="">I could (e.g. deleted Homebrew although the other machines have Homebrew<br class="">and Miniconda installed as well) but to no avail.<br class=""><br class="">install.packages(“XML”) fails and install.packages("XML",<br class="">configure.args=c("LIBXML_INCDIR=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2",<br class="">"LIBXML_LIBDIR=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib”))<br class="">also fails.<br class=""><br class="">There are obviously differences I cannot track down so far but I am<br class="">running out of ideas. Both machines have MacOSX10.14.sdk and<br class="">MacOSX10.15.sdk installed with MacOSX.sdk linking to MacOSX10.15.sdk.<br class=""><br class="">Here is part of the log of a successful compilation, and I was hoping<br class="">someone could point me towards a solution.<br class=""><br class="">libxml include directory:<br class="">-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include<br class="">libxml library directory:<br class="">-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lxml2 -lz<br class="">-lpthread -licucore -lm -lz -lxml2<br class="">libxml 2: -DLIBXML2=1<br class=""><br class="">Compilation flags: -DLIBXML<br class="">-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include<br class="">-DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1<br class="">-DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1<br class="">-DNO_XML_HASH_SCANNER_RETURN=1 -DLIBXML_NAMESPACE_HAS_CONTEXT=1<br class="">-DHAVE_R_CETYPE_T=1 -DHAVE_XML_WITH_ZLIB=1 -DHAVE_XML_HAS_FEATURE=1<br class="">-DUSE_R=1 -D_R_=1 -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1<br class="">Link flags:<br class="">-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lxml2 -lz<br class="">-lpthread -licucore -lm -lz -lxml2<br class=""><br class=""><br class="">Thanks,<br class="">Kemal<br class="">_______________________________________________<br class="">R-SIG-Mac mailing list<br class=""><a href="mailto:R-SIG-Mac@r-project.org" class="">R-SIG-Mac@r-project.org</a><br class=""><a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mac" class="">https://stat.ethz.ch/mailman/listinfo/r-sig-mac</a><br class=""><br class=""></blockquote><br class=""><br class="">-- <br class="">===============================<br class="">Duncan Temple Lang<br class="">Associate Dean for Graduate Programs<br class="">Professor, Department of Statistics<br class="">UC Davis<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>[[alternative HTML version deleted]]<br class=""><br class="">_______________________________________________<br class="">R-SIG-Mac mailing list<br class=""><a href="mailto:R-SIG-Mac@r-project.org" class="">R-SIG-Mac@r-project.org</a><br class=""><a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mac" class="">https://stat.ethz.ch/mailman/listinfo/r-sig-mac</a><br class=""><br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></body></html>