On 8/27/13 6:31 PM, Dan Tenenbaum wrote:
> This means you have to supply a 'version' argument. See 
> ?makeTxDbPackageFromUCSC 

Dan:

This does fix the issue on OS X, however I'm still getting an error 
running the example from the help page on RHEL:

 > txdb <- makeTxDbPackageFromUCSC(version="0.01",
+                              maintainer="Some One <so@someplace.org>",
+                              author="Some One <so@someplace.com>",
+                              genome="sacCer2",
+                              tablename="ensGene")
Download the ensGene table ... OK
Extract the 'transcripts' data frame ... OK
Extract the 'splicings' data frame ... OK
Download and preprocess the 'chrominfo' data frame ... OK
Prepare the 'metadata' data frame ... OK
Make the TranscriptDb object ... Error in .Call2("svn_time", PACKAGE = 
"IRanges") :
   IRanges internal error in svn_time(): get_svn_time() failed

One of my colleagues did some investigation, and it looks like in the 
IRanges source code (str_utils.c) is where the problem is coming from:

/*
  * 'out_size' should be at least 45 (for year < 10000, 44 chars will be
  * printed to it + '\0').
  */
static int get_svn_time(time_t t, char *out, size_t out_size)
{
#if defined(__INTEL_COMPILER)
	return -1;
#else /* defined(__INTEL_COMPILER) */
	struct tm result;
	int utc_offset, n;

	static const char
	  *wday2str[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
	  *mon2str[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
			"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
	  *svn_format = "%d-%02d-%02d %02d:%02d:%02d %+03d00 (%s, %02d %s %d)";

	//localtime_r() not available on Windows+MinGW
	//localtime_r(&t, &result);
	result = *localtime(&t);
#if defined(__APPLE__) || defined(__FreeBSD__)
	//'struct tm' has no member named 'tm_gmtoff' on Windows+MinGW
	utc_offset = result.tm_gmtoff / 3600;
#else /* defined(__APPLE__) || defined(__FreeBSD__) */
	tzset();
	//timezone is not portable (is a function, not a long, on OS X Tiger)
	utc_offset = - (timezone / 3600);
	if (result.tm_isdst > 0)
		utc_offset++;
#endif /* defined(__APPLE__) || defined(__FreeBSD__) */
	n = snprintf(out, out_size, svn_format,
		result.tm_year + 1900,
		result.tm_mon + 1,
		result.tm_mday,
		result.tm_hour,
		result.tm_min,
		result.tm_sec,
		utc_offset,
		wday2str[result.tm_wday],
		result.tm_mday,
		mon2str[result.tm_mon],
		result.tm_year + 1900);
	return n >= out_size ? -1 : 0;
#endif /* defined(__INTEL_COMPILER) */
}

We are using the Intel compilers to build on Linux -- is this a bug, or 
is using the Intel compilers not supported?


-Mike
-- 
Michael Steeves (steeves@raingods.net)


	[[alternative HTML version deleted]]

