[Rd] Build error/zlib question
James W. MacDonald
jmacdon at med.umich.edu
Fri Sep 29 15:38:52 CEST 2006
Prof Brian Ripley wrote:
> 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.
Thank you for the hint. This does allow the package to build.
>
> 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.
I made no claim for this package building on an installed version; if
you read the sentence right after the one you quote, you will notice
that I state both versions of R were compiled from source.
>
> 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!
Thanks for the advice. When I get the chance I will look into supplying
such an animal with the package.
Best,
Jim
>
>>
>> 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
>>
>
--
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.
More information about the R-devel
mailing list