Possible bug in latest RGtk2 package in Win7 64bit environment in R 2.13

584 views
Skip to first unread message

Mekki

unread,
Jun 19, 2011, 5:15:25 PM6/19/11
to GGobi users
Summary:

- I believe there is a bug in the latest RGtk2 package, specifically
in library RGtk2.dll which causes it to not load with the following
error "LoadLibrary failure: The device is not ready." under certain
circumstances

Long version:

- I've been able to reproduce this bug in the latest version of R
(2.13) and versions 2.12.1 and 2.12.2 with RGtk 2.20.14. However,
using the older R version 2.11.1 and RGtk 2.20.8 seems to work fine.

- To reproduce, using Windows 7, 64bit edition, install a fresh copy
of R version 2.13, lauch either of the i386 or 64-bit versions and
install the package RGtk2 from any CRAN mirror. After install, load
the package with the standard command: library(RGtk2);. It will fail
with the above error and then attempt to load the GTK runtime
environment. If you attempt to install the GTK runtime environment,
it will also fail when it attempts to locate the extract path of the
ZIP file it downloads.

- Note that this error is different (The device is not ready) from the
error that is thrown if the GTK runtime environment is not found or
due to not being installed or PATH problems. I've reproduced the
error with 3 or 4 different GTK runtime environment configurations
(not installed in parallel to prevent version conflicts) and PATH
entries (all of which work fine in the older version setup as listed
above).

If you would like additional info to help debut, I'd be glad to
assist. It seems that this bug breaks any R module that depends on
RGtk2, which was RQDA in my case, so it might be affecting quite a few
people. Of course, it's possible that, despite my extensive
troubleshooting, I missed something obvious and it's not actually a
bug. If such is the case, my apologies, and your advice on what I
missed would be appreciated.

Thanks,

Mekki

--
Mekki MacAulay
B.Eng., B.A., M.A.Sc., P.Eng.
me...@yorku.ca
http://mekki.ca

Tengfei Yin

unread,
Jun 20, 2011, 1:24:45 AM6/20/11
to Mekki, GGobi users
Hi Mekki,

I guess Michael updated the package recently, I have trouble install RGtk2 on my windows7 64bit on Thursday which gave me the error message saying cannot locate the file, but today, I successfully installed the RGtk2 on my laptop, and also could  run some demos without problems. Could you please try to install latest RGtk2 again to see if the update could fix the problem?

Regards

Tengfei


--
You received this message because you are subscribed to the Google Groups "GGobi users" group.
To post to this group, send email to gg...@googlegroups.com.
To unsubscribe from this group, send email to ggobi+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ggobi?hl=en.




--
Tengfei Yin
MCDB PhD student
1620 Howe Hall, 2274,
Iowa State University
Ames, IA,50011-2274
Homepage: www.tengfei.name


MekTek Solutions

unread,
Jun 20, 2011, 3:10:17 PM6/20/11
to John Lewis, gg...@googlegroups.com
Hi John,

The version numbers are listed under my "long version" description in my
initial post (below). Since then I've also done a fair bit of
additional troubleshooting which I've included for your reference at the
end of this post.

Summary: I am running RGtk2 2.20.8 on R 2.11 (both 32-bit) successfully
in my environment (Win7 64-bit), but cannot get RGtk2 2.20.14 + R2.13 to
work (32-bit or 64-bit, regardless of GTK version installed (tried 6
versions) or PATH (tried dozens of combinations). In a clean-build Win7
64-bit environment on a different PC the default downloads with R 2.13
and RGtk2 2.20.14 work fine (both 32bit and 64bit) for reasons I cannot
explain.

Sorry I can't be more helpful, but I'm glad to see at least one person
has been able to reproduce the "The device is not ready." error besides
me as I was becoming afraid that it was idiosyncratic to my system.

Cheers,

Mekki

me...@yorku.ca


On 20/06/2011 2:58 PM, John Lewis wrote:
> Hi,
> What version of RGtk2 are you using? I recently downloaded ‘RGtk2’
> version 2.20.14. I have been having all kinds of problems with this
> library on Win7. I am using R2.13. I gave up about two weeks ago on 64
> bit program and just stayed with the 32 bit one. That was running until
> now. The original problem was solved by using the 32bit version of GTK+
> and by putting the path to GTK to the first position in my environment
> variable path but now nothing works. I keep getting the same error as
> you do -
>
> Error in inDL(x, as.logical(local), as.logical(now), ...) :
> unable to load shared object
> 'C:/R-2.13.0/library/RGtk2/libs/i386/RGtk2.dll':


>
> LoadLibrary failure: The device is not ready.
>

> As you can see I am still working on the 32bit version using gtk+ 2.22.0
> win32 bundle. I tried the 64 bit one this morning without success again
> so that is why I am just trying to get the one working that I had
> previous success with. Right now nothing is working!
> How did you get your RGtk2 to run?
> Thanks.
> John Lewis

> B.Eng., B.A., M.A.Sc <http://M.A.Sc>., P.Eng.
> me...@yorku.ca <mailto:me...@yorku.ca>


> http://mekki.ca
>
> --
> You received this message because you are subscribed to the Google
> Groups "GGobi users" group.
> To post to this group, send email to gg...@googlegroups.com

> <mailto:gg...@googlegroups.com>.


> To unsubscribe from this group, send email to
> ggobi+un...@googlegroups.com

> <mailto:ggobi%2Bunsu...@googlegroups.com>.


> For more options, visit this group at
> http://groups.google.com/group/ggobi?hl=en.
>
>

Hi,

One last email on additional tests. I was unable to reproduce this on a
different Win7 64-bit machine, leaving me to believe that there is
something strange about my setup that doesn't make sense (as you
theorized). In my environment I could not find any means of getting
RGtk2 2.20.14 + R 2.13.0 to run. The version of GTK that is installed on
the system and the PATH environment variables have no effect. It always
errors " LoadLibrary failure: The device is not ready" no matter what.
I've tried every combination of 32-bit and 64-bit versions of R, RGtk2
and GTK (2.16 and 2.22) to no avail. The only way I can get anything to
work in this environment is to use R 2.11 + RGtk2 2.20.8, which works
fine. Something changed in either R 2.13 or RGtk2 2.20.14 (or both)
which broke my environment but not a clean environment.

I was also not able to reproduce the zip file extraction failure during
the auto install of GTK in the clean Win7 64-bit environment, however it
seemed to fail in both the WinXP and my environment, so that is likely a
separate issue.

Sorry if I wasted your time. It seems that there are incompatibilities
going on in the background in my Win7 and WinXP environments that I
can't cleanly account for. Maybe this information will help future
users with similar issues.

Thanks,

Mekki

--------------

Hi,

I've done some additional testing and attempted to reproduce this in
Windows XP (SP3) 32-bit. The result is similar, but with a different
error message in the case of the Glade package, but work ok with the
manually (automated doesn't work) downloaded zip package.

Steps:

- I installed the Glade windows package as per the GTK2 website and set
the PATH environment variable to the bin folder and verified via
GTK-demo that it worked fine.

- Installed R 2.13.0

- Installed RGtk2 with dependencies

- Attempting to load RGtk2 results in a pop-up window appearing which
says "R Console: Rgui.exe - Entry Point Not Found" in the title bar, and
the text "The procedure entry point gdk_cairo_reset_clip could not be
loaded in the dynamic link library libgdkwin32-2.0-0.dll". Upon
clicking "Ok" on the popup window the following error appears in the R log:
--------------
> library(RGtk2)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'C:/Program
Files/R/R-2.13.0/library/RGtk2/libs/i386/RGtk2.dll':
LoadLibrary failure: The specified procedure could not be found.
--------------

- It then attempts to install GTK as before. It tries to download the
zip file, downloads it, and then fails to extract it, the same as before:
-------------
Failed to load RGtk2 dynamic library, attempting to install it.
trying URL
'http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip'
Content type 'application/zip' length 24516284 bytes (23.4 Mb)
opened URL
downloaded 23.4 Mb

Error : .onLoad failed in loadNamespace() for 'RGtk2', details:
call: unzip(path, exdir = .windows_gtk_path)
error: 'exdir' does not exist
Error: package/namespace load failed for 'RGtk2'

-------------

I then uninstalled the Glade package and manually installed the zip
package that it tried to download and set the PATH environment variable
to the bin directory in the install location, and verified via GTK-demo
that it installed fine. RGtk2 then launched ok, producing only the Warning:

----------
Warning message:
In inDL(x, as.logical(local), as.logical(now), ...) :
DLL attempted to change FPU control word from 8001f to 9001f
----------

So it would seem that there is some sort of version incompatibility with
the Glade GTK and, possibly separately, with Windows7, though the
specifics are still unclear.

Hope this additional information is helpful.

Cheers,

Mekki
me...@yorku.ca


---------------------
Hi,

Thanks for the quick response. Here's the complete error text produced
when attempting to load RGtk2, including when RGtk2 attempts to install
the gtk package:

----------------------------

> library(RGtk2)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'C:/Program
Files/R/R-2.13.0/library/RGtk2/libs/i386/RGtk2.dll':


LoadLibrary failure: The device is not ready.

Failed to load RGtk2 dynamic library, attempting to install it.
trying URL
'http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip'
Content type 'application/zip' length 24516284 bytes (23.4 Mb)
opened URL
downloaded 23.4 Mb

Error : .onLoad failed in loadNamespace() for 'RGtk2', details:
call: unzip(path, exdir = .windows_gtk_path)
error: 'exdir' does not exist
Error: package/namespace load failed for 'RGtk2'

---------------------------------------

It looks like that it is the unzip command that is failing specifically.
I manually downloaded this same zip package and manually installed it to
its default location and then added that location to the PATH
environment variable and the result was the same. It failed to load and
tried to install it.

I find it odd that the same setup works with the older versions of
R/RGtk, but not with the newer versions. Did any of the defaults for
where it looks for GTK+ change in the newer version? That being said, it
seems to find the dll fine, but have some other issue with loading it.

Please let me know if I can assist with additional information.

Thanks,

Mekki

me...@yorku.ca

On 19/06/2011 5:23 PM, Michael Lawrence wrote:
>
>
> ---------- Forwarded message ----------
> From: *Michael Lawrence* <mich...@gene.com <mailto:mich...@gene.com>>
> Date: Sun, Jun 19, 2011 at 2:21 PM
> Subject: Re: Possible Bug in Latest version of RGTK2
> To: mek...@yorku.ca <mailto:mek...@yorku.ca>
>
>
>
>
> On Sun, Jun 19, 2011 at 1:54 PM, MekTek Solutions <mek...@mektek.ca
> <mailto:mek...@mektek.ca>> wrote:
>
> Good day,
>
> I got your email address from the RGTK2 CRAN homepage. If I should
> be reporting this bug elsewhere, please advise.


>
> Summary:
>
> - I believe there is a bug in the latest RGtk2 package, specifically
> in library RGtk2.dll which causes it to not load with the following
> error "LoadLibrary failure: The device is not ready." under certain
> circumstances
>
> Long version:
>
> - I've been able to reproduce this bug in the latest version of R
> (2.13) and versions 2.12.1 and 2.12.2 with RGtk 2.20.14. However,
> using the older R version 2.11.1 and RGtk 2.20.8 seems to work fine.
>
> - To reproduce, using Windows 7, 64bit edition, install a fresh copy
> of R version 2.13, lauch either of the i386 or 64-bit versions and
> install the package RGtk2 from any CRAN mirror. After install, load
> the package with the standard command: library(RGtk2);. It will
> fail with the above error and then attempt to load the GTK runtime
> environment. If you attempt to install the GTK runtime environment,
> it will also fail when it attempts to locate the extract path of the
> ZIP file it downloads.
>
>

> It would be great if you could forward me the details of this missed
> extraction. I tested this on 32 bit but not on 64 bit.


>
> - Note that this error is different (The device is not ready) from
> the error that is thrown if the GTK runtime environment is not found
> or due to not being installed or PATH problems. I've reproduced the
> error with 3 or 4 different GTK runtime environment configurations

> and PATH entries (all of which work fine in the older version setup
> as listed above).
>
>

> I think if we fix the above error, RGtk2 should do a better job of
> finding the right DLLs. Then again, I've never heard of this "device not
> ready" error before. This is something specific to your system, I think.
>
> Thanks for the detailed report,
> Michael


>
> If you would like additional info to help debut, I'd be glad to
> assist. It seems that this bug breaks any R module that depends on
> RGtk2, which was RQDA in my case, so it might be affecting quite a
> few people. Of course, it's possible that, despite my extensive
> troubleshooting, I missed something obvious and it's not actually a
> bug. If such is the case, my apologies, and your advice on what I
> missed would be appreciated.
>
> Thanks,
>
> Mekki
>
> --
> Mekki MacAulay

> B.Eng., B.A., M.A.Sc <http://M.A.Sc>., P.Eng.
> me...@yorku.ca <mailto:me...@yorku.ca>
> http://mekki.ca

Michael Lawrence

unread,
Jun 20, 2011, 7:54:30 PM6/20/11
to Mekki MacAulay, John Lewis, GGobi users
The only change that might have affected things is the passing of a DLLpath argument to library.dynam(). This lets the GTK+ path supersede the system directories and stuff on PATH. An alternative would be to prepend the GTK+ directory onto PATH, but that is messier. I have no idea why DLLpath would cause this issue though.

You could test this by doing a dyn.load() on the RGtk2.dll and seeing whether that works.

Michael

--
You received this message because you are subscribed to the Google Groups "GGobi users" group.
To post to this group, send email to gg...@googlegroups.com.
To unsubscribe from this group, send email to ggobi+unsubscribe@googlegroups.com.

Michael Lawrence

unread,
Jun 20, 2011, 11:37:59 PM6/20/11
to Mekki MacAulay, Michael Lawrence, John Lewis, GGobi users


On Mon, Jun 20, 2011 at 7:05 PM, Mekki MacAulay Abdelwahab <me...@mektek.ca> wrote:
Hi Michael,

I am able to execute dyn.load() in the RGtk2.dll without error, however the library will still not load with the same "The device is not ready".  Prepending the GTK directory on the PATH environment variable has no effect.


It looks like passing the DLLpath argument is causing this issue. Perhaps if DLLpath points to a non-existent directory, Windows issues that error (but apparently this is not so for every system, the CRAN build machine seems to have no issue). That directory is only missing, because the installation failed. The installation is failing for a reasons I do not understand. At least in R 2.14, the help for unzip states that 'exdir' will be created if it does not exist -- so how can it complain about it not existing? Probably a permissions issue. Maybe I need to explicitly dir.create() it.
 
When you say "GTK+ path" do you mean a separate environment variable for GTK besides the standard PATH environment variable?  If so, I have no such variable, and none appears in any of the instructions (unless I missed something?).  Should I have one?


Cheers,

Mekki

me...@yorku.ca




   On 20/06/2011 2:58 PM, John Lewis wrote:

       Hi,
       What version of RGtk2 are you using? I recently downloaded ‘RGtk2’
       version 2.20.14.  I have been having all kinds of problems with this
       library on Win7. I am using R2.13. I gave up about two weeks ago
       on 64
       bit program and just stayed with the 32 bit one. That was
       running until
       now. The original problem was solved by using the 32bit version
       of GTK+
       and by putting the path to GTK to the first position in my
       environment
       variable path but now nothing works. I keep getting the same
       error as
       you do -

         Error in inDL(x, as.logical(local), as.logical(now), ...) :
          unable to load shared object
       'C:/R-2.13.0/library/RGtk2/__libs/i386/RGtk2.dll':


          LoadLibrary failure:  The device is not ready.

       As you can see I am still working on the 32bit version using
       gtk+ 2.22.0
       win32 bundle. I tried the 64 bit one this morning without
       success again
       so that is why I am just trying to get the one working that I had
       previous success with. Right now nothing is working!
       How did you get your RGtk2 to run?
       Thanks.
       John Lewis



       On Sun, Jun 19, 2011 at 5:15 PM, Mekki <mek...@gmail.com
       <mailto:mek...@gmail.com>
           B.Eng., B.A., M.A.Sc <http://M.A.Sc> <http://M.A.Sc>., P.Eng.
       me...@yorku.ca <mailto:me...@yorku.ca> <mailto:me...@yorku.ca

       <mailto:me...@yorku.ca>>
       http://mekki.ca

           --
           You received this message because you are subscribed to the
       Google
           Groups "GGobi users" group.
           To post to this group, send email to gg...@googlegroups.com
       <mailto:gg...@googlegroups.com>
       <mailto:gg...@googlegroups.com <mailto:gg...@googlegroups.com>__>.

           To unsubscribe from this group, send email to
       ggobi+unsubscribe@__googlegroups.com
       <mailto:ggobi%2Bunsubscribe@googlegroups.com>
       <mailto:ggobi%2Bunsubscribe@__googlegroups.com
       <mailto:ggobi%252Bunsubscribe@googlegroups.com>>.

           For more options, visit this group at
   Files/R/R-2.13.0/library/__RGtk2/libs/i386/RGtk2.dll':

     LoadLibrary failure:  The specified procedure could not be found.
   --------------

   - It then attempts to install GTK as before.  It tries to download
   the zip file, downloads it, and then fails to extract it, the same
   as before:
   -------------
   Failed to load RGtk2 dynamic library, attempting to install it.
   trying URL



   ---------------------
   Hi,

   Thanks for the quick response.  Here's the complete error text
   produced when attempting to load RGtk2, including when RGtk2
   attempts to install the gtk package:

   ----------------------------

    > library(RGtk2)
   Error in inDL(x, as.logical(local), as.logical(now), ...) :
     unable to load shared object 'C:/Program
   Files/R/R-2.13.0/library/__RGtk2/libs/i386/RGtk2.dll':

     LoadLibrary failure:  The device is not ready.

   Failed to load RGtk2 dynamic library, attempting to install it.
   trying URL

   <http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip>'
   Content type 'application/zip' length 24516284 bytes (23.4 Mb)
   opened URL
   downloaded 23.4 Mb

   Error : .onLoad failed in loadNamespace() for 'RGtk2', details:
     call: unzip(path, exdir = .windows_gtk_path)
     error: 'exdir' does not exist
   Error: package/namespace load failed for 'RGtk2'

   ------------------------------__---------


   It looks like that it is the unzip command that is failing
   specifically. I manually downloaded this same zip package and
   manually installed it to its default location and then added that
   location to the PATH environment variable and the result was the
   same. It failed to load and tried to install it.

   I find it odd that the same setup works with the older versions of
   R/RGtk, but not with the newer versions.  Did any of the defaults
   for where it looks for GTK+ change in the newer version? That being
   said, it seems to find the dll fine, but have some other issue with
   loading it.

   Please let me know if I can assist with additional information.

   Thanks,

   Mekki









   On 19/06/2011 5:23 PM, Michael Lawrence wrote:
    >
    >
    > ---------- Forwarded message ----------
    > From: *Michael Lawrence* <mich...@gene.com
   <mailto:mich...@gene.com> <mailto:mich...@gene.com
   <mailto:mich...@gene.com>>>
    > Date: Sun, Jun 19, 2011 at 2:21 PM
    > Subject: Re: Possible Bug in Latest version of RGTK2
    > To: mek...@yorku.ca <mailto:mek...@yorku.ca>
   <mailto:mek...@yorku.ca <mailto:mek...@yorku.ca>>
    >
    >
    >
    >
    > On Sun, Jun 19, 2011 at 1:54 PM, MekTek Solutions
   <mek...@mektek.ca <mailto:mek...@mektek.ca>
    >     B.Eng., B.A., M.A.Sc <http://M.A.Sc> <http://M.A.Sc>., P.Eng.
    > me...@yorku.ca <mailto:me...@yorku.ca> <mailto:me...@yorku.ca

   <mailto:me...@yorku.ca>>
    > http://mekki.ca

   --
   You received this message because you are subscribed to the Google
   Groups "GGobi users" group.
   To post to this group, send email to gg...@googlegroups.com
   <mailto:gg...@googlegroups.com>.
   To unsubscribe from this group, send email to
   ggobi+unsubscribe@__googlegroups.com

   <mailto:ggobi%2Bunsubscribe@googlegroups.com>.
   For more options, visit this group at

ahmed darwish

unread,
Aug 3, 2011, 8:12:32 AM8/3/11
to GGobi users
I'm having the very same problem.

Is there a resolution on how to fix this? I'm trying to get Rattle
working, but there's an issue with RGtk2 in the process. ggobi
similarly won't install.

Should I be creating the exdir directory somewhere?

I'm not all too familiar with R, so the more detailed the help the
better. Thanks so much.

On Jun 20, 8:37 pm, Michael Lawrence <lawrence.mich...@gene.com>
wrote:
> >>        'C:/R-2.13.0/library/RGtk2/__**libs/i386/RGtk2.dll':
> >>            Groups "GGobi users" group.>>            To post to this group, send email tog...@googlegroups.com>>        <mailto:gg...@googlegroups.com**>>>        <mailto:gg...@googlegroups.com<mailto:gg...@googlegroups.com**
> >> >__>.
>
> >>            To unsubscribe from this group, send email to>>        ggobi+unsubscribe@__googlegrou**ps.com<http://googlegroups.com>>>        <mailto:ggobi%2Bunsubscribe@**googlegroups.com<ggobi%252Bunsubscribe@google groups.com>
>
> >>        <mailto:ggobi%2Bunsubscribe@__**googlegroups.com<http://googlegroups.com>>>        <mailto:ggobi%252Bunsubscribe@**googlegroups.com<ggobi%25252Bunsubscribe@go oglegroups.com>
> >> >>.
>
> >>            For more options, visit this group at
> >>        http://groups.google.com/__**group/ggobi?hl=en<http://groups.google.com/__group/ggobi?hl=en>
> >>        <http://groups.google.com/**group/ggobi?hl=en<http://groups.google.com/group/ggobi?hl=en>
> ...
>
> read more »

Jon Olav Vik

unread,
Aug 24, 2011, 9:25:07 AM8/24/11
to GGobi users, me...@mektek.ca
[Mekki]
> > >>    Summary: I am running RGtk2 2.20.8 on R 2.11 (both 32-bit)
> > >>    successfully in my environment (Win7 64-bit), but cannot get RGtk2
> > >>    2.20.14 + R2.13 to work (32-bit or 64-bit, regardless of GTK version
> > >>    installed (tried 6 versions) or PATH (tried dozens of combinations).
> > >>      In a clean-build Win7 64-bit environment on a different PC the
> > >>    default downloads with R 2.13 and RGtk2 2.20.14 work fine (both
> > >>    32bit and 64bit) for reasons I cannot explain.
>
> > >>    Sorry I can't be more helpful, but I'm glad to see at least one
> > >>    person has been able to reproduce the "The device is not ready."
> > >>    error besides me as I was becoming afraid that it was idiosyncratic
> > >>    to my system.

Same problem here, steps to reproduce on my system follow below.

Windows 7 64-bit running 32-bit R.
Removed previous install of GTK and R, including package libraries (in
subdirectories of C:\Program Files\R, presumably installed as
administrator, and in subdirectories of C:\Users\jonvi\R\win-library
\).
Installed gtk-2-12.9-win32-2.exe for all users.
Installed R-2.13.1-win.exe with default options.
PATH has c:\gtk first, and c:\Program Files\R\R-2.13.1\bin later.
Other environment variables:
R_HOME=c:\Program Files\R\R-2.13.1
R_USER=c:\users\jonvi
GTK_BASEPATH=C:\GTK

Started 32-bit R 2.13.1.
Installed ggplot2 and dependencies just to see that
C:\Users\jonvi\R\win-library\2.13
got created. (I was not running as administrator, so install.packages
offered to install to my home folder instead).
Installed RGtk2 without error; the DLL got written to
C:\Users\jonvi\R\win-library\2.13\RGtk2\libs\i386\RGtk2.dll
Installed cairoDevice.
Tried library(RGtk2), failed with "device is not ready".
Tried dyn.load() on RGtk2.dll, got a message in Norwegian which I
think translates to
"The procedure entry point cairo_glyph_allocate could not be located
in the dynamic link library libcairo-2.dll".

> install.packages("RGtk2")
Installing package(s) into ‘c:/Users/jonvi/R/win-library/2.13’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://cran.uib.no/bin/windows/contrib/2.13/
RGtk2_2.20.16.zip'
Content type 'application/zip' length 13178166 bytes (12.6 Mb)
opened URL
downloaded 12.6 Mb

package 'RGtk2' successfully unpacked and MD5 sums checked

The downloaded packages are in
C:\Users\jonvi\AppData\Local\Temp\RtmpY36ESx
\downloaded_packages
> utils:::menuInstallPkgs()
trying URL 'http://cran.uib.no/bin/windows/contrib/2.13/
cairoDevice_2.15.zip'
Content type 'application/zip' length 52390 bytes (51 Kb)
opened URL
downloaded 51 Kb

package 'cairoDevice' successfully unpacked and MD5 sums checked

The downloaded packages are in
C:\Users\jonvi\AppData\Local\Temp\RtmpY36ESx
\downloaded_packages
> library(RGtk2)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'c:/Users/jonvi/R/win-library/2.13/
RGtk2/libs/i386/RGtk2.dll':
LoadLibrary failure: Enheten er ikke klar.
[Translates to "DEVICE IS NOT READY".]

Failed to load RGtk2 dynamic library, attempting to install it.
Learn more about GTK+ at http://www.gtk.org
If the package still does not load, please ensure that GTK+ is
installed and that it is on your PATH environment variable
IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN
> dyn.load('c:/Users/jonvi/R/win-library/2.13/RGtk2/libs/i386/RGtk2.dll')
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'c:/Users/jonvi/R/win-library/2.13/
RGtk2/libs/i386/RGtk2.dll':
LoadLibrary failure: Den angitte prosedyren ble ikke funnet.
[Translates to "THE SPECIFIED PROCEDURE WAS NOT FOUND".]


I've tried downgrading to R-2.11.1-win32.exe and/or gtk-2.10.11-
win32-1.exe in various combinations, but with no success. It would be
nice to get this sorted out, as so many of the interactive graphics
facilities for R rely on it.

Best regards,
Jon Olav Vik

Jon Olav Vik

unread,
Aug 25, 2011, 4:40:29 AM8/25/11
to Michael Lawrence, GGobi users, me...@mektek.ca
[I hope this reply makes it to groups.google.com --
I do not yet see your message there, and so reply by e-mail.]

On Wed, Aug 24, 2011 at 8:51 PM, Michael Lawrence
<lawrence...@gene.com> wrote:
> Thanks for this detailed report.
>
> When RGtk2 says "attempting to install it" do you let it go ahead and
> install GTK+?

In my previous report, I had installed GTK separately first,
though possibly an outdated version (a link at the Gtk2 homepage may need
updating, see below).
However, I have previously tried leaving the
installation to library(RGtk2). I've retried this now (uninstalling R, and
GTK and \win-library if applicable), see transcript below.

(I also tried this as administrator; the output was identical except libraries
were installed in "c:/Program Files/R/R-2.13.1/library" rather than in my home
directory, and accordingly there was no warning about
'lib = "c:/Program Files/R/R-2.13.1/library"' is not writable.)

Summary:
Uninstall GTK and R 2.13.1 and C:\Users\jonvi\R\win-library.
Also, I put %R_HOME%\bin\i386 on PATH, rather than just %R_HOME%\bin
(the location of the binaries changed in 2.13, I think -- I'd forgot to update
this PATH entry. It may not relate to the current issue, though.)
Reinstall R 2.13.1 with default settings.
install.packages("RGtk2") # RGtk2_2.20.16.
library(RGtk2)
Answer "Install GTK+" at the "Need GTK+ ?" prompt.
Download gtk+-bundle_2.22.1-20101227_win32.zip
Install failed with "exdir does not exist".

Transcript (slightly abridged):
###
R version 2.13.1 (2011-07-08)
Platform: i386-pc-mingw32/i386 (32-bit)
> install.packages("RGtk2")
Warning in install.packages("RGtk2") :
'lib = "c:/Program Files/R/R-2.13.1/library"' is not writable


--- Please select a CRAN mirror for use in this session ---
trying URL 'http://cran.uib.no/bin/windows/contrib/2.13/RGtk2_2.20.16.zip'

package 'RGtk2' successfully unpacked and MD5 sums checked

> library(RGtk2)


Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object
'c:/Users/jonvi/R/win-library/2.13/RGtk2/libs/i386/RGtk2.dll':

LoadLibrary failure: Enheten er ikke klar. ["Device is not ready."]

Failed to load RGtk2 dynamic library, attempting to install it.

trying URL 'http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip'


Content type 'application/zip' length 24516284 bytes (23.4 Mb)
opened URL
downloaded 23.4 Mb
Error : .onLoad failed in loadNamespace() for 'RGtk2', details:
call: unzip(path, exdir = .windows_gtk_path)
error: 'exdir' does not exist
Error: package/namespace load failed for 'RGtk2'

###

> If so, if you then look into your
> C:\Users\jonv\R\win-library\2.13\RGtk2\ directory and see if there is
> something like "gtk" in there?

There is no directory called \gtk under
C:\Users\jonvi\R\win-library\2.13\RGtk2 (when running as normal user)
C:\Program Files\R\R-2.13.1\library\RGtk2 (when running as admin)

As for other files or directories whose name contains "gtk" but not "RGtk2":

dir C:\Users\jonvi\R\win-library\2.13\RGtk2\*gtk* /s
omitting results relating to "RGtk2" and these directories: \demo
\examples \help \images.

Innhold i C:\Users\jonvi\R\win-library\2.13\RGtk2\include\RGtk2
2011-08-25 09:33 3 921 gtk.h
2011-08-25 09:33 13 291 gtkClasses.h
2011-08-25 09:33 48 228 gtkClassImports.c
2011-08-25 09:33 12 796 gtkImports.c
2011-08-25 09:33 18 752 gtkUserFuncImports.c
2011-08-25 09:33 6 515 gtkUserFuncs.h

> I don't understand this "Device is not ready"
> error that keeps popping up on Windows 7 64 bit. I don't have that OS, so it
> is tough for me to test it. Either (a) the internal installation of gtk+ is
> failing or (b) the use of DLLpath in dyn.load() is causing the problem.

Maybe this can help:
I did manage to get dyn.load() to succeed by manually downloading
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32.zip
unpacking it to c:\GTK, and prepending c:\gtk\bin to PATH.
###


> library(RGtk2)
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object
'c:/Users/jonvi/R/win-library/2.13/RGtk2/libs/i386/RGtk2.dll':
LoadLibrary failure: Enheten er ikke klar.

Failed to load RGtk2 dynamic library, attempting to install it.
Learn more about GTK+ at http://www.gtk.org
If the package still does not load, please ensure that GTK+ is
installed and that it is on your PATH environment variable
IN ANY CASE, RESTART R BEFORE TRYING TO LOAD THE PACKAGE AGAIN
> dyn.load('c:/Users/jonvi/R/win-library/2.13/RGtk2/libs/i386/RGtk2.dll')

> # no error
###

> I will say that gtk+ 2.12.x is too old for the 2.20.x RGtk2. You need the
> latest binaries.

Yes, I see that the automatic installation under library(RGtk2) downloads
gtk+-bundle_2.22.1-20101227_win32.zip
whereas I used gtk-2.10.11-win32-1.exe.

However, then it seems the instructions and links on http://ggobi.org/rgtk2/
need to be updated. I followed the "If you're on Windows, download" link to
http://sourceforge.net/projects/gladewin32/files/gtk%2B-win32-runtime/2.10.11/gtk-2.10.11-win32-1.exe/download
I also tried backing up to
http://sourceforge.net/projects/gladewin32/files/gtk%2B-win32-runtime/
and went with the most recent version I could find, which was
http://sourceforge.net/projects/gladewin32/files/gtk%2B-win32-runtime/2.12.9/

Whether the "bundle" downloaded by library(RGtk2) differs from "gladewin32",
I don't know. However, libcairo-2.dll seems to be included in the bundle but
not in gladewin32.

Hope this helps,
Jon Olav

Jon Olav Vik

unread,
Aug 25, 2011, 7:03:04 PM8/25/11
to Michael Lawrence, GGobi users, me...@mektek.ca
On Thu, Aug 25, 2011 at 2:12 PM, Michael Lawrence
<lawrence...@gene.com> wrote:

> On Thu, Aug 25, 2011 at 1:40 AM, Jon Olav Vik <jon...@gmail.com> wrote:
>>
>> [I hope this reply makes it to groups.google.com --
>> I do not yet see your message there, and so reply by e-mail.]
>
> My Google account is apparently broken, so I cannot post to any Google group
> lists. Not sure how to resolve this.

I'll quote your reply in full, then 8-)

>> Transcript (slightly abridged):
>> ###
>> R version 2.13.1 (2011-07-08)
>> Platform: i386-pc-mingw32/i386 (32-bit)
>> > install.packages("RGtk2")
>> Warning in install.packages("RGtk2") :
>>  'lib = "c:/Program Files/R/R-2.13.1/library"' is not writable
>

> I see at least one problem: for some stupid reason I was generating the
> installation path outside of the function, so that lazy loading
> precalculated it on whichever system built the binary. This is obviously
> invalid for your user. This does not explain though why it failed when you
> were running it with Administrator.

I think the warning is benign; it is what happens the first time I
install an R package as a normal user. It is followed by a dialog
asking if I would like to create a win-library directory to install
into.

>> There is no directory called \gtk under
>> C:\Users\jonvi\R\win-library\2.13\RGtk2 (when running as normal user)
>> C:\Program Files\R\R-2.13.1\library\RGtk2 (when running as admin)
>

> This is confusing. So even though dir.create() did not complain about lack
> of permissions with admin, it somehow still failed to create the directory.
> Actually, I see that I failed to specify recursive=TRUE in the dir.create()
> call. This should have emitted some sort of error though. Also, unzip() does
> try to create its exdir argument using recursive=TRUE, so it should never
> say that "exdir" does not exist unless its dir.create() call fails (which we
> would not see since it hides any warnings).
>
> Maybe you could show me the exact transcript for the administrator
> installation? I've found at least a couple bugs, so we're getting close.

The transcripts were identical (as compared using WinMerge) except for:
* the warning not being issued when run as admin
* C:\Program Files\R\R-2.13.1\library\RGtk2 being used as admin
(instead of C:\Users\jonvi\R\win-library\2.13\RGtk2)

> One quick test would be:
>
> gtk_path <- file.path(system.file(package = "RGtk2"), "gtk",
> .Platform$r_arch)
> dir.create(gtk_path, recursive = TRUE)
>
> Does that succeed?

Yes, it does:

> gtk_path <- file.path(system.file(package = "RGtk2"), "gtk", .Platform$r_arch)
> gtk_path
[1] "c:/Users/jonvi/R/win-library/2.13/RGtk2/gtk/i386"
> dir.create(gtk_path, recursive = TRUE)

After this, I have an empty directory called
C:\Users\jonvi\R\win-library\2.13\RGtk2\gtk\i386

> I sincerely grateful that you have provided me with this debug information.
> I have requested this in the past from others, but never received it.

True; it is often hard to tell what information is required. I'm glad
this could be of some help.

Jon Olav Vik

unread,
Aug 26, 2011, 7:13:46 PM8/26/11
to Michael Lawrence, GGobi users, me...@mektek.ca
On Fri, Aug 26, 2011 at 2:07 PM, Michael Lawrence
<lawrence...@gene.com> wrote:
> I just uploaded RGtk2 2.20.17 to CRAN. It's been built for Windows but is
> not quite up there yet. Please try that version and let me know what
> happens.

This works! Thank you so much for your persistence in working this
out. Packages "playwith", "latticist" and "rggobi" seem to work fine
now. I am very much looking forward to more interactive plotting in R.

Details follow below.

Best regards,
Jon Olav


For 64-bit R (R x64 2.13.1), packages RGtk2, playwith and latticist
work just as for 32-bit, but noticeably faster. However, rggobi does
not have a 64-bit version at the moment.
> library(rggobi)
Error: package 'rggobi' is not installed for 'arch=x64'


Steps to replicate:
> # My usual mirror isn't updated yet, so specify "repos"
> install.packages("RGtk2", repos="http://cran.r-project.org")
> library(RGtk2)
## Asks to install GTK; I accept, then quit and restart R
> library(RGtk2)
# No problem

> install.packages("playwith")
> library(playwith)
> example(playwith)
# Almost all examples run fine, except a couple
# errors concerning date conversion or
# "figure margins too large", presumably
# unrelated to RGtk2.

> install.packages("latticist")
> library(latticist)
> latticist(iris)

# After installing http://ggobi.org/downloads/ggobi-2.1.10.exe
> install.packages("rggobi")
> library(rggobi)
> ggobi(mtcars)

Kyle Chow

unread,
Aug 28, 2011, 10:13:58 PM8/28/11
to GGobi users
I'm a new user to the "rattle" package which depends on "RGtk2".
Would just like to thank Michael and Jon for resolving this issue.
Both "RGtk2" and "rattle" now seem to run perfectly without issues on
my laptop with R 64-bit running on Win 7 64-bit. Thank you.

Kind regards,
Kyle

On Aug 27, 7:13 am, Jon Olav Vik <jono...@gmail.com> wrote:
> On Fri, Aug 26, 2011 at 2:07 PM, Michael Lawrence
>
> # After installinghttp://ggobi.org/downloads/ggobi-2.1.10.exe
>
>
>
> > install.packages("rggobi")
> > library(rggobi)
> > ggobi(mtcars)- Hide quoted text -
>
> - Show quoted text -

John Lewis

unread,
Aug 29, 2011, 4:05:22 PM8/29/11
to GGobi users
Hello
I would like to seconded that thanks to Michael Lawrence for updating RGtk2. All  I had to do was update the new version of the RGtk2 package from CRAN and everything is working fine ("without doing anything else"). This is for R 2.13.0 64bit Win 7.
I appreciate the effort. Thanks again.
John Lewis

--
You received this message because you are subscribed to the Google Groups "GGobi users" group.
To post to this group, send email to gg...@googlegroups.com.
To unsubscribe from this group, send email to ggobi+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ggobi?hl=en.


grass...@aliyun.com

unread,
Feb 10, 2016, 9:35:40 AM2/10/16
to GGobi users, mek...@gmail.com
Rstudio works for the latest gtk2.dll,  but I got the same failure when try to use the RScript.exe.  Any clues about how to fix the RScript.exe problem?

在 2011年6月20日星期一 UTC+8上午5:15:25,Mekki写道:

Michael Lawrence

unread,
Feb 10, 2016, 4:00:55 PM2/10/16
to grass...@aliyun.com, GGobi users, mek...@gmail.com
I thought this issue was resolved (5 years ago), quoting:

One last email on additional tests.  I was unable to reproduce this on a different Win7 64-bit machine, leaving me to believe that there is something strange about my setup that doesn't make sense (as you theorized).  In my environment I could not find any means of getting RGtk2 2.20.14 + R 2.13.0 to run. The version of GTK that is installed on the system and the PATH environment variables have no effect.  It always errors " LoadLibrary failure:  The device is not ready" no matter what.  I've tried every combination of 32-bit and 64-bit versions of R, RGtk2 and GTK (2.16 and 2.22) to no avail.  The only way I can get anything to work in this environment is to use R 2.11 + RGtk2 2.20.8, which works fine.  Something changed in either R 2.13 or RGtk2 2.20.14 (or both) which broke my environment but not a clean environment.

I was also not able to reproduce the zip file extraction failure during the auto install of GTK in the clean Win7 64-bit environment, however it seemed to fail in both the WinXP and my environment, so that is likely a separate issue.
Sorry if I wasted your time.  It seems that there are incompatibilities going on in the background in my Win7 and WinXP environments that I can't cleanly account for.  Maybe this information will help future users with similar issues.

So perhaps this is something particular to your R installation/environment.

--
You received this message because you are subscribed to the Google Groups "GGobi users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggobi+un...@googlegroups.com.

To post to this group, send email to gg...@googlegroups.com.
Visit this group at https://groups.google.com/group/ggobi.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages