From apjaworski at mmm.com  Thu Oct 27 23:47:35 2005
From: apjaworski at mmm.com (apjaworski@mmm.com)
Date: Thu, 27 Oct 2005 16:47:35 -0500
Subject: [Rd] R-devel CHTML problem
Message-ID: <OF643E0C35.EC24E314-ON862570A7.0072D6A2-862570A7.0077B6BF@mmm.com>

Hi,

I encountered this problem just before the 2.2.0 release.  Then it went
away for a while and came back at the beginning of this week.  Here is what
is happening (I am on Win2000 machine with all the necessary tools
installed).

I compile R-devel and R-patched trees every couple of days and install them
in separate directories.  Everything seems to work fine for R-patched.
Compilation of R-devel also goes without a problem, but when I try to use
help with the chmhelp=TRUE I get two errors:
1.  A separate error windows pops up saying: "The procedure entry point
HtmlHelpA at 16 could not be located in the dynamic link library hhctrl.ocx"
2.  I get the following on the R console
      Error in dyn.load(x, as.logical(local), as.logical(now)) :
                 unable to load shared library
'C:/local/R/rw230/bin/Rchtml.dll':
       LoadLibrary failure:  The specified procedure could not be found.

I tried to track down the problem but I do not know much about CHTML.  Here
is what I discovered:
1.  The problem is with the Rchtml.dll (as 2 above suggests).  If I simply
replace the Rchtml.dll in the bin directory of version 2.3 with Rchtml.dll
from version 2.2 everything works fine!!
2.  Rchtml.dll is being built in the .../R-devel/src/gnuwin32/help folder.
The contents of this folder is:
      Makefile  libhhctrl.a  Rchtml.c  hhctrl.def   Rchtml.o
      MkChmDll  logo.bmp     Rchm.css  Rchtml.dll*  R.stp
     This is identical to the corresponding help folder in R-patched.
3.  All files in the help folders in both versions are identical (under
diff) except: libhhctrl.a and Rchtml.dll
4.  Doing ar -t  libhhctrl.a produces:
      dclact.o
      dclach.o
      dclacs00000.o
      in R-dvel but
      dquxbt.o
      dquxbh.o
      dquxbs00000.o
      in R-patched.
5.  The make process output for building  libhhctrl.a and Rchtml.dll is
identical:
      ...
      echo EXPORTS > hhctrl.def
      echo HtmlHelpA at 16 >> hhctrl.def
      dlltool --as as -k --dllname hhctrl.ocx  --def hhctrl.def
--output-lib libhhctrl.a
      gcc   -I "C:/Program Files/HTML Help Workshop/include" -c Rchtml.c -o
Rchtml.o
      gcc  --shared  -s -o Rchtml.dll Rchtml.def Rchtml.o -L.  -lhhctrl
      cp Rchtml.dll ../../../bin/Rchtml.dll
      ...

I am not sure if this is a problem with my particular setup (version of
hhctrl.ocx perhaps, which BTW is 5.2.3790.309) or a bug in R-devel.  Again,
I do not understand the CHTML building process at all, so it is hard for me
to figure out what is going on.

Any help will be appreciated,

Andy


__________________________________
Andy Jaworski
518-1-01
Process Laboratory
3M Corporate Research Laboratory
-----
E-mail: apjaworski at mmm.com
Tel:  (651) 733-6092
Fax:  (651) 736-3122



[Rd] R-devel CHTML problem
apjaworski@mmm.com