[Rd] using zlib in a package: problems in windows

Ramon Diaz-Uriarte rdiaz02 at gmail.com
Tue May 20 00:59:54 CEST 2008


Dear All,

I am having trouble getting an R package to build and install
correctly under Windows. In this package, which builds and checks OK
under Linux, I use zlib (among other functions, gzprintf).

As mentioned by Prof. Ripley a while back, the file "CHANGES" under
src/gnuwin32 says explains that to, to use zlib, one has to set
$(ZLIB_LIBS) in PKG_LIBS. I have a Makefile.win with just that.

I have also downloaded the Windows toolset (Rtools.exe) which I have
used to successfully build R-patched. However, I still cannot get the
package to compile.

>From the log, it seems that in fact the build is trying to use zlib,
but the gzprintf symbol is not found. However, gzprintf is in the
zlib.h header.  00install.out follows below.

What am I doing wrong?

Thanks,

R.

P.D. I am using Windows 2000 (under vmware).




---------- Making package RJaCGH ------------

   **********************************************
   WARNING: this package has a configure script
         It probably needs manual configuration
   **********************************************

  adding build stamp to DESCRIPTION
  installing NAMESPACE file and metadata
  making DLL ...
making nnhl.d from nnhl.c
gcc  -std=gnu99  -Ic:/R/R-patc~1/include     -O3 -Wall  -c nnhl.c -o nnhl.o
windres --preprocessor="gcc -E -xc -DRC_INVOKED" -I
c:/R/R-patc~1/include  -i RJaCGH_res.rc -o RJaCGH_res.o
gcc  -std=gnu99  -shared -s  -o RJaCGH.dll RJaCGH.def nnhl.o
RJaCGH_res.o  -Lc:/R/R-patc~1/bin -lRzlib   -lR
nnhl.o:nnhl.c:(.text+0x138f): undefined reference to `gzprintf'
nnhl.o:nnhl.c:(.text+0x13ae): undefined reference to `gzprintf'
nnhl.o:nnhl.c:(.text+0x13d2): undefined reference to `gzprintf'
nnhl.o:nnhl.c:(.text+0x13f6): undefined reference to `gzprintf'
nnhl.o:nnhl.c:(.text+0x1415): undefined reference to `gzprintf'
nnhl.o:nnhl.c:(.text+0x1451): more undefined references to `gzprintf' follow
collect2: ld returned 1 exit status
make[3]: *** [RJaCGH.dll] Error 1
make[2]: *** [srcDynlib] Error 2
make[1]: *** [all] Error 2
make: *** [pkg-RJaCGH] Error 2
*** Installation of RJaCGH failed ***




-- 
Ramon Diaz-Uriarte
Statistical Computing Team
Structural Biology and Biocomputing Programme
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz



More information about the R-devel mailing list