[Rd] Finding windows DLLs

Martin Morgan mtmorgan at fhcrc.org
Mon Jan 7 22:51:00 CET 2008


Thanks Duncan for the hints.

libxml2.dll is not in my c:/WINDOWS/system32, but in that of a user of
a package of mine. I guess installed by some other application, though
I don't really know what it's doing there (or the consequences of
removing it).

The MSDN site seemed in the long term to point in the direction of
side-by-side assemblies, which would require cooperation /
infrastructure from R.

Martin

Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> On Mon, 7 Jan 2008, Oleg Sklyar wrote:
>
>> Should adding PREFIX/library/XML/libs to PATH before system32 solve the
>> issue as Windows relies on PATH when searching for libs as well?
>
> The Windows code for package XML says
>
>> XML:::.onLoad
> function (libname, pkgname)
> {
>      if (.Platform$OS.type == "windows") {
>          temp <- Sys.getenv("PATH")
>          Sys.setenv(PATH = paste(utils::normalizePath(file.path(libname,
>              pkgname, "libs")), temp, sep = ";"))
>          on.exit(Sys.setenv(PATH = temp))
>      }
>      library.dynam("XML", pkgname, libname)
>      if (exists("setMethod")) {
>      }
>      .C("RSXML_setErrorHandlers")
> }
> <environment: namespace:XML>
>
> so it does already do that.
>
> The order depends on the version of Windows *and* its settings: see
>
> http://msdn2.microsoft.com/en-us/library/ms682586(VS.85).aspx
>
> There is a way to change this:
>
> http://msdn2.microsoft.com/en-us/library/ms686203(VS.85).aspx
>
> but it would preclude Windows 2000.
>
> Perhaps Martin can explain how libxml2.dll got into c:/WINDOWS/system32/?
> My suggestion is that we rename the DLL when copied into
> library/XML/libs to something like libRxml2.dll.
>
>>
>> Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466
>>
>>
>> Martin Morgan wrote:
>>> The XML package relies on libxml2.dll (e.g., bundled with the CRAN
>>> binary) installed in library/XML/libs. Unfortunately,
>>> c:/WINDOWS/system32/libxml2.dll will be found and loaded before
>>> this.
>>>
>>> Is there any programatic solution?
>>>
>>> Thanks,
>>>
>>> Martin
>
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M2 B169
Phone: (206) 667-2793



More information about the R-devel mailing list