From jorismeys at gmail.com  Tue Apr 24 17:17:09 2018
From: jorismeys at gmail.com (Joris Meys)
Date: Tue, 24 Apr 2018 17:17:09 +0200
Subject: [Rd] Compile issues when building survival package from source
Message-ID: <CAO1zAVYwQeHP3gkH052Fz1ZSTFCA8pjsCCZnnZrZMTBSX6erpw@mail.gmail.com>

Hi,

I wanted to send a small patch for survival documentation. So I forked,
patched and tried to build locally using R CMD build, but this failed with
errors about undefined references. Upon closer inspection, the undefined
references relate to files that give a warning when compiled through
install.packages("survival", type = "source") on Windows, for example:

D:/Rtools/mingw_32/bin/gcc  -I"D:/R/R-35~1.0/include" -DNDEBUG          -O3
-Wall  -std=gnu99 -mtune=generic -c agfit4.c -o agfit4.o
agfit4.c: In function 'agfit4':
agfit4.c:334:20: warning: 'dtime' may be used uninitialized in this
function [-Wmaybe-uninitialized]
                 if (tstop[p] < dtime) break; /* no more to add */

When I build using R CMD build however, the file agfit4.c is never even
built. That explains the undefined references, but I have no clue what the
difference is between both methods.

I suspected a newer version so I downloaded the source from CRAN manually
and then tried to install locally using

install.packages("E:/GITHUBS/JoFAM/survival_2.42-3.tar.gz", repos = NULL,
type = "source")

This gives me the following error:

Error in rawToChar(block[seq_len(ns)]) :
  embedded nul in string:
'\037?\b\0???Z\0\003?[?o\033G???????_B\036?????(?\0??l???@?oo?Y,?3M??yezF\022c???????gH?\217\003?=\034.B\020?\217????W_U?]???[\235?y??????'

Yet, when using install.packages() to install the source package of
survival, that error doesn't pop up. I've hurt my brains trying to come up
with an explanation, but I can't come up with something that makes sense.

Anyone an idea?

Cheers
Joris
-- 
Joris Meys
Statistical consultant

Department of Data Analysis and Mathematical Modelling
Ghent University
Coupure Links 653, B-9000 Gent (Belgium)
<https://maps.google.com/?q=Coupure+links+653,%C2%A0B-9000+Gent,%C2%A0Belgium&entry=gmail&source=g>

-----------
Biowiskundedagen 2017-2018
http://www.biowiskundedagen.ugent.be/

-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

	[[alternative HTML version deleted]]



[Rd] Compile issues when building survival package from source
Joris Meys