From ripley at stats.ox.ac.uk  Fri Sep 29 12:48:46 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri, 29 Sep 2006 11:48:46 +0100 (BST)
Subject: [Rd] Build error/zlib question
In-Reply-To: <451CE715.1090701@statistik.uni-dortmund.de>
References: <451BF61E.47B0.00EE.0@med.umich.edu>
	<451CE715.1090701@statistik.uni-dortmund.de>
Message-ID: <Pine.LNX.4.64.0609291143430.19030@gannet.stats.ox.ac.uk>

On Fri, 29 Sep 2006, Uwe Ligges wrote:

>
>
> James MacDonald wrote:
>> Hi,
>>
>> I am unable to build a package I maintain using a relatively current
>> build of R-2.4.0 alpha, whereas the package builds just fine on R-2.3.1.
>> Both versions of R were built from source. I'm hoping a guRu might be
>> able to give some help.
>
> The entry points are no longer exported, you probably have to specify
> the zlib header files (which reside in R/src/extra/zlib).

I think Uwe meant to say '-L$(RHOME)/src/extra/zlib -lz' is needed in 
PKG_LIBS.

Note that this package would not build in an installed version of R, so it 
did not 'builds just fine on R-2.3.1' as claimed.

However, this is all against the advice of 'Writing R Extensions', and the 
change is documented in the CHANGES file.  What you should really do is to 
supply your own zlib compiled to your own requirements.  If you make use 
of private entry points, expect self-imposed trouble!

>
> Uwe Ligges
>
>
>> Some snippets from the build process:
>>
>> R-2.3.1
>>
>>   making DLL ...
>> gcc  -Ic:/R-2.3.1/src/extra/zlib -DHAVE_ZLIB -Ic:/R-2.3.1/include -Wall
>> -O2   -c read_cdffile.c -o read_cdffile.o
>> read_cdffile.c: In function `readQC':
>> read_cdffile.c:565: warning: unused variable `param_unit'
>> windres --include-dir c:/R-2.3.1/include  -i makecdfenv_res.rc -o
>> makecdfenv_res.o
>> gcc  -shared -s  -o makecdfenv.dll makecdfenv.def read_cdffile.o
>> makecdfenv_res.o  -Lc:/R-2.3.1/bin   -lR
>>   ... DLL made
>>
>> R-2.4.0 beta
>>
>>    making DLL ...
>> gcc  -Ic:/rw2040dev/src/extra/zlib -DHAVE_ZLIB -Ic:/rw2040dev/include
>> -Wall -O2 -std=gnu99   -c read_cdffile.c -o read_cdffile.o
>> read_cdffile.c: In function `readQC':
>> read_cdffile.c:565: warning: unused variable `param_unit'
>> windres --include-dir c:/rw2040dev/include  -i makecdfenv_res.rc -o
>> makecdfenv_res.o
>> gcc  -shared -s  -o makecdfenv.dll makecdfenv.def read_cdffile.o
>> makecdfenv_res.o  -Lc:/rw2040dev/bin   -lR
>> read_cdffile.o:read_cdffile.c:(.text+0x42): undefined reference to
>> `gzgets'
>> read_cdffile.o:read_cdffile.c:(.text+0xf3): undefined reference to
>> `gzopen'
>> read_cdffile.o:read_cdffile.c:(.text+0x10f): undefined reference to
>> `gzgets'
>> read_cdffile.o:read_cdffile.c:(.text+0x140): undefined reference to
>> `gzrewind'
>> read_cdffile.o:read_cdffile.c:(.text+0x177): undefined reference to
>> `gzclose'
>> collect2: ld returned 1 exit status
>> make[3]: *** [makecdfenv.dll] Error 1
>> make[2]: *** [srcDynlib] Error 2
>> make[1]: *** [all] Error 2
>> make: *** [pkg-makecdfenv] Error 2
>>
>>> version
>>                _
>> platform       i386-pc-mingw32
>> arch           i386
>> os             mingw32
>> system         i386, mingw32
>> status         alpha
>> major          2
>> minor          4.0
>> year           2006
>> month          09
>> day            10
>> svn rev        39242
>> language       R
>> version.string R version 2.4.0 alpha (2006-09-10 r39242)
>>
>> TIA,
>>
>> Jim
>>
>> James W. MacDonald, M.S.
>> Biostatistician
>> Affymetrix and cDNA Microarray Core
>> University of Michigan Cancer Center
>> 1500 E. Medical Center Drive
>> 7410 CCGC
>> Ann Arbor MI 48109
>> 734-647-5623
>>
>>
>> **********************************************************
>> Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
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




[Rd] Build error/zlib question
Prof Brian Ripley