Entering edit mode
Guido Hooiveld
★
4.1k
@guido-hooiveld-2020
Last seen 25 minutes ago
Wageningen University, Wageningen, the …
I upgraded my R
and Bioconductor
installation on my Fedora
machine. Upgrading all packages went fine, except for oligo
.
The reported errors are rather cryptic to me, so I would appreciate some pointers to fix this.
> BiocManager::install(c('oligo'),force=TRUE)
Bioconductor version 3.19 (BiocManager 1.30.23), R 4.4.0 (2024-04-24)
Installing package(s) 'oligo'
trying URL 'https://bioconductor.org/packages/3.19/bioc/src/contrib/oligo_1.68.0.tar.gz'
Content type 'application/x-gzip' length 28421969 bytes (27.1 MB)
==================================================
downloaded 27.1 MB
* installing *source* package 'oligo' ...
** using staged installation
** libs
using C compiler: 'gcc (GCC) 14.1.1 20240507 (Red Hat 14.1.1-1)'
gcc -I"/usr/include/R" -DNDEBUG -I'/usr/lib64/R/library/preprocessCore/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -c DABG.c -o DABG.o
gcc -I"/usr/include/R" -DNDEBUG -I'/usr/lib64/R/library/preprocessCore/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -c ParserGzXYS.c -o ParserGzXYS.o
ParserGzXYS.c: In function 'gzcountLines':
ParserGzXYS.c:18:17: error: passing argument 1 of 'gzeof' from incompatible pointer type [-Wincompatible-pointer-types]
18 | while (!gzeof(file)){
| ^~~~
| |
| struct gzFile_s **
In file included from ParserGzXYS.c:4:
/usr/include/zlib.h:1575:36: note: expected 'gzFile' {aka 'struct gzFile_s *'} but argument is of type 'struct gzFile_s **'
1575 | Z_EXTERN int Z_EXPORT gzeof(gzFile file);
| ~~~~~~~^~~~
ParserGzXYS.c:19:12: error: passing argument 1 of 'gzgets' from incompatible pointer type [-Wincompatible-pointer-types]
19 | gzgets(file, buffer, 1000);
| ^~~~
| |
| struct gzFile_s **
/usr/include/zlib.h:1472:40: note: expected 'gzFile' {aka 'struct gzFile_s *'} but argument is of type 'struct gzFile_s **'
1472 | Z_EXTERN char * Z_EXPORT gzgets(gzFile file, char *buf, int len);
| ~~~~~~~^~~~
ParserGzXYS.c: In function 'gzxys_header_field':
ParserGzXYS.c:46:6: error: assignment to 'struct gzFile_s **' from incompatible pointer type 'gzFile' {aka 'struct gzFile_s *'} [-Wincompatible-pointer-types]
46 | fp = gzopen(currentFile, "rb");
| ^
ParserGzXYS.c:50:10: error: passing argument 1 of 'gzgets' from incompatible pointer type [-Wincompatible-pointer-types]
50 | gzgets(fp, buffer, LINEMAX);
| ^~
| |
| struct gzFile_s **
/usr/include/zlib.h:1472:40: note: expected 'gzFile' {aka 'struct gzFile_s *'} but argument is of type 'struct gzFile_s **'
1472 | Z_EXTERN char * Z_EXPORT gzgets(gzFile file, char *buf, int len);
| ~~~~~~~^~~~
ParserGzXYS.c:51:11: error: passing argument 1 of 'gzclose' from incompatible pointer type [-Wincompatible-pointer-types]
51 | gzclose(fp);
| ^~
| |
| struct gzFile_s **
/usr/include/zlib.h:1611:38: note: expected 'gzFile' {aka 'struct gzFile_s *'} but argument is of type 'struct gzFile_s **'
1611 | Z_EXTERN int Z_EXPORT gzclose(gzFile file);
| ~~~~~~~^~~~
ParserGzXYS.c: In function 'R_read_gzxys_files':
ParserGzXYS.c:134:6: error: assignment to 'struct gzFile_s **' from incompatible pointer type 'gzFile' {aka 'struct gzFile_s *'} [-Wincompatible-pointer-types]
134 | fp = gzopen(CHAR(STRING_ELT(filenames, 0)), "rb");
| ^
ParserGzXYS.c:138:11: error: passing argument 1 of 'gzclose' from incompatible pointer type [-Wincompatible-pointer-types]
138 | gzclose(fp);
| ^~
| |
| struct gzFile_s **
/usr/include/zlib.h:1611:38: note: expected 'gzFile' {aka 'struct gzFile_s *'} but argument is of type 'struct gzFile_s **'
1611 | Z_EXTERN int Z_EXPORT gzclose(gzFile file);
| ~~~~~~~^~~~
make: *** [/usr/lib64/R/etc/Makeconf:195: ParserGzXYS.o] Error 1
ERROR: compilation failed for package 'oligo'
* removing '/usr/lib64/R/library/oligo'
* restoring previous '/usr/lib64/R/library/oligo'
The downloaded source packages are in
'/tmp/Rtmpv8fwJD/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Old packages: 'oligo'
Update all/some/none? [a/s/n]: n
Warning message:
In install.packages(...) :
installation of package 'oligo' had non-zero exit status
>
> sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: x86_64-redhat-linux-gnu
Running under: Fedora Linux 40 (Forty)
Matrix products: default
BLAS/LAPACK: FlexiBLAS OPENBLAS-OPENMP; LAPACK version 3.11.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Europe/Amsterdam
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.4.0
>
What version of zlib are you running? I can compile with 1.2.7
Aha, that is a good one!
Starting from release 40, as I just found out, Fedora apparently is not including/using
zlib
as such anymore, but has changed tozlib-ng
. See e.g. here or here.Compatibility would be maintained through
zlib-ng-compat
, which would providezlib
1.2.13.Currently installed on my machine:
zlib-ng-compat-2.1.6-2.fc40
. Link.So it seems
oligo
is not compatible withzlib
1.2.13?There is the
zlibbioc
package that provides the headers for zlib 1.2.5, that I think you should be able to use, although that would require intervention on your part to redirect the makefile to usezlibbioc
instead of the system headers.Wait a minute. The
oligo
package is supposed to be usingzlibbioc
, but apparently it is not. I get the same thing as you do, where it's pointing to the system zlib header instead of zlib.h in thezlibbioc
package.so whats the solution for this error?
I think the solution is for the C code in
oligo
to be updated to work with more modern versions ofzlib
. Thezlibbioc
package is really meant to allow Windows users to usezlib
, rather than as a header source for *nix based computers (the version ofzlib
is quite old, and a bunch of the underlying functions are remapped to have bioc_ prepended), so usingzlibbioc
is just a kludge that is likely suboptimal. It might just be easier to fix the C code instead.Thanks for all suggestions and getting to the bottom of this! Unfortunately, fixing C code goes way above my skill level, so I cannot contribute to that.
FYI, I emailed Benilton and he says he's working on a fix, so stay tuned!
Thanks James for your continuous attention to this!
Meanwhile Benilton has fixed the
zlib
problem (thanks for that as well!), andoligo
installed fine now.For completeness: