rtracklayer
rtracklayer copied to clipboard
CURLINFO_FILETIME_T not available in ubuntu 18.04
CURLINFO_FILETIME_T
was added to curl
in v. 7.59.0
.
Latest curl
version available on Ubuntu 18.04 is 7.58.0
, hence rtracklayer
install fails on Ubuntu 18.04.
Some systems still rely on Ubuntu 18.04.
FYI, rtracklayer
install works on Ubuntu 18.04 by replacing the only occurence of CURLINFO_FILETIME_T
by CURLINFO_FILETIME
(here: https://github.com/lawremi/rtracklayer/blob/master/src/ucsc/net.c#L16). I don't know anything about curl
so unsure how this would impact rtracklayer
.
Of note, install also works by manually installing curl 7.59.0
, of course.
This issue should be closed immediately if you are not planning on supporting Ubuntu 18.04 anymore. Otherwise let me know, I'd be happy to open a PR to change this.
BiocManager::install("rtracklayer")
output:
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
CRAN: https://cloud.r-project.org
Bioconductor version 3.19 (BiocManager 1.30.23), R 4.4.0 (2024-04-24)
Installing package(s) 'rtracklayer'
trying URL 'https://bioconductor.org/packages/3.19/bioc/src/contrib/rtracklayer_1.64.0.tar.gz'
Content type 'application/x-gzip' length 3951281 bytes (3.8 MB)
==================================================
downloaded 3.8 MB
* installing *source* package 'rtracklayer' ...
** using staged installation
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for OPENSSL... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
using C compiler: 'gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0'
[...]
gcc -I"/usr/share/R/include" -DNDEBUG -DUSE_SSL -D_FILE_OFFSET_BITS=64 -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/S4Vectors/include' -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/IRanges/include' -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/XVector/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-U1b9am/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c ucsc/errAbort.c -o ucsc/errAbort.o
ucsc/errAbort.c: In function 'getThreadVars':
ucsc/errAbort.c:255:5: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
write(STDERR_FILENO, errMsg, strlen(errMsg));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -I"/usr/share/R/include" -DNDEBUG -DUSE_SSL -D_FILE_OFFSET_BITS=64 -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/S4Vectors/include' -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/IRanges/include' -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/XVector/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-U1b9am/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c ucsc/hash.c -o ucsc/hash.o
[...]
gcc -I"/usr/share/R/include" -DNDEBUG -DUSE_SSL -D_FILE_OFFSET_BITS=64 -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/S4Vectors/include' -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/IRanges/include' -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/XVector/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-U1b9am/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c ucsc/udc.c -o ucsc/udc.o
gcc -I"/usr/share/R/include" -DNDEBUG -DUSE_SSL -D_FILE_OFFSET_BITS=64 -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/S4Vectors/include' -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/IRanges/include' -I'/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/XVector/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-U1b9am/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c ucsc/net.c -o ucsc/net.o
In file included from /usr/include/x86_64-linux-gnu/curl/curl.h:2739:0,
from ucsc/net.c:7:
ucsc/net.c: In function 'header_get_last_modified':
ucsc/net.c:16:47: error: 'CURLINFO_FILETIME_T' undeclared (first use in this function); did you mean 'CURLINFO_FILETIME'?
CURLcode status = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &last_modified);
^
ucsc/net.c:16:47: note: each undeclared identifier is reported only once for each function it appears in
make: *** [/usr/lib/R/etc/Makeconf:195: ucsc/net.o] Error 1
ERROR: compilation failed for package 'rtracklayer'
* removing '/home/rsg/R/x86_64-pc-linux-gnu-library/4.4/rtracklayer'
The downloaded source packages are in
'/tmp/Rtmpj7uAy8/downloaded_packages'
Warning message:
In install.packages(...) :
installation of package 'rtracklayer' had non-zero exit status
BiocManager::valid()
output:
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
CRAN: https://cloud.r-project.org
* sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 18.04.6 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so; LAPACK version 3.7.1
locale:
[1] LC_CTYPE=en_IN.utf8 LC_NUMERIC=C LC_TIME=en_IN.utf8 LC_COLLATE=en_IN.utf8 LC_MONETARY=en_IN.utf8
[6] LC_MESSAGES=en_IN.utf8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
time zone: Europe/Paris
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] BiocManager_1.30.23 compiler_4.4.0 tools_4.4.0
Bioconductor version '3.19'
* 1 packages out-of-date
* 0 packages too new
create a valid installation with
BiocManager::install("microbiomeDataSets", update = TRUE, ask = FALSE, force = TRUE)
more details: BiocManager::valid()$too_new, BiocManager::valid()$out_of_date
Warning message:
1 packages out-of-date; 0 packages too new
Happy to look at a PR.
I have the same problem when using R 4.4.0.
I've run into the same issue with ubuntu 18.04 and R 4.4.0. Any solution for this?
I fixed this in my case by manually installing curl v7.59.0 using the instructions here
Hi All, any update on this? I am facing the same issue on Ubuntu 18.04. I have also tried to install latest curl available (curl-8.3.0) but no luck.
Any help is very appreciated thanks
It should be resolved if you downgrade your curl. I posted instructions I followed above
Thanks @drneavin but unfortunatelly this did not work either
sorted :) thanks
Hi. Thank you for fixing this. But I think I get a related error even if I am using the fixed version, which says:
[...] In file included from /usr/include/curl/curl.h:2251, from ucsc/net.c:7: ucsc/net.c: In function ‘header_get_content_length’: ucsc/net.c:40:47: error: ‘CURLINFO_CONTENT_LENGTH_DOWNLOAD_T’ undeclared (first use in this function); did you mean ‘CURLINFO_CONTENT_LENGTH_DOWNLOAD’? 40 | CURLcode status = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ucsc/net.c:40:47: note: each undeclared identifier is reported only once for each function it appears in ucsc/net.c: In function ‘netUrlOpenSockets’: ucsc/net.c:163:37: error: ‘CURLINFO_ACTIVESOCKET’ undeclared (first use in this function); did you mean ‘CURLINFO_LASTSOCKET’? 163 | curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &ctrlSocket); | ^~~~~~~~~~~~~~~~~~~~~ ucsc/net.c: In function ‘netSkipHttpHeaderLinesHandlingRedirect’: ucsc/net.c:204:29: error: ‘CURLINFO_ACTIVESOCKET’ undeclared (first use in this function); did you mean ‘CURLINFO_LASTSOCKET’? 204 | curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &nsd); | ^~~~~~~~~~~~~~~~~~~~~ make: *** [ucsc/net.o] Error 1 ERROR: compilation failed for package ‘rtracklayer’ [...]
I think this indicates that CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
(here: https://github.com/lawremi/rtracklayer/blob/master/src/ucsc/net.c#L40) should also be changed to CURLINFO_CONTENT_LENGTH_DOWNLOAD
when using a lower version of curl
.
Here is the related commit for curl
: 3b80d3c
I happen to have a very old curl version, and I managed to install rtracklayer successfully in R 4.4. Could you check my take at the forked repository here? https://github.com/hyein-cbio/rtracklayer/commit/99945c88cd76e0dbe314168dd078652940ca4c30
hi, I am still not able to fixed this by manually installing curl v7.59.0. I am on Ubuntu 18.04 and R 4.4.0. Any help is much appreciated. curl --version curl 7.59.0 (x86_64-pc-linux-gnu) libcurl/8.3.0 OpenSSL/1.1.1 zlib/1.2.11 Release-Date: 2018-03-14 Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy But when I check in R
library(curl) Using libcurl 7.58.0 with OpenSSL/1.1.1
so I think there is something wrong with libcurl.
@sanchit-saini would you be able to clean this up? If possible, please try to test it with the older libcurl (might be easiest in a container).
@lawremi okay, I will create a PR for it.