Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issue on R-4.4.1/Ubuntu 18 #324

Open
kodiweera opened this issue Jul 31, 2024 · 3 comments
Open

Installation issue on R-4.4.1/Ubuntu 18 #324

kodiweera opened this issue Jul 31, 2024 · 3 comments

Comments

@kodiweera
Copy link

kodiweera commented Jul 31, 2024

Hi,
I'm trying to install RMINC on R-4.4.1 on Ubuntu 18. I get the following error msg. Do you see what's wrong? hdf5 version: 1.8.18 and gcc version is 7. As a matter of fact, I tried installing with different versions of hdf5 and gcc versions, but no luck! I also tried the previous release and get the same error msg. Thanks for any suggestion.

..........................................................................................................................................................
In file included from /usr/share/R/include/R.h:78,
from minc_reader.h:12,
from modelling_functions.c:1:
modelling_functions.c: In function ‘voxel_lm’:
modelling_functions.c:541:12: error: too few arguments to function ‘dpotri_’
F77_CALL(dpotri)("Upper", &p, x, &n, &info);

after many lines..at the end of the day

/usr/lib/R/etc/Makeconf:195: recipe for target 'modelling_functions.o' failed
make: *** [modelling_functions.o] Error 1
.........................................................................................................................................................

full output:

Installing package into ‘/home/brain/R/x86_64-pc-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)

  • installing source package ‘RMINC’ ...
    ** using staged installation
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ -std=gnu++17 accepts -g... yes
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for a sed that does not truncate output... /bin/sed
    checking for gawk... gawk
    configure: Searching for libminc
    configure: MINC_TOOLKIT was specified
    configure: MINC_PATH set to /opt/minc/1.9.18
    configure: override by setting the environment variable MINC_PATH
    configure: or by setting --with-build-path as a configure argument
    checking zlib.h usability... yes
    checking zlib.h presence... yes
    checking for zlib.h... yes
    checking for h5cc... /usr/local/hdf5/bin/h5cc
    checking for HDF5 libraries... yes (version 1.8.18)
    checking hdf5.h usability... yes
    checking hdf5.h presence... yes
    checking for hdf5.h... yes
    checking for H5Fcreate in -lhdf5... yes
    checking for main in -lhdf5_hl... yes
    checking for matching HDF5 Fortran wrapper... /usr/local/hdf5/bin/h5fc
    checking for mifree_name in -lminc2... yes
    checking for stdbool.h that conforms to C99... yes
    checking for _Bool... yes
    checking for size_t... yes
    checking for error_at_line... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    configure: creating ./config.status
    config.status: creating src/Makevars
    ** libs
    using C compiler: ‘gcc (Ubuntu 8.4.0-1ubuntu118.04) 8.4.0’
    using C++ compiler: ‘g++ (Ubuntu 8.4.0-1ubuntu1
    18.04) 8.4.0’
    using C++11
    gcc -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c RMINC_init.c -o RMINC_init.o
    g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c RcppExports.cpp -o RcppExports.o
    g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c anat_summaries.cpp -o anat_summaries.o
    gcc -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c minc2_read.c -o minc2_read.o
    minc2_read.c: In function ‘read_voxel_from_files’:
    minc2_read.c:107:57: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
    if ( R_DEBUG_mincIO ) Rprintf("hSlab_count [0..3] = %d, %d, %d, %d\n",
    ~^
    %lld
    hSlab_count[0], hSlab_count[1], hSlab_count[2], hSlab_count[3]);
    ~~~~~~~~~~~~~~
    minc2_read.c:107:61: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
    if ( R_DEBUG_mincIO ) Rprintf("hSlab_count [0..3] = %d, %d, %d, %d\n",
    ~^
    %lld
    hSlab_count[0], hSlab_count[1], hSlab_count[2], hSlab_count[3]);
    ~~~~~~~~~~~~~~
    minc2_read.c:107:65: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
    if ( R_DEBUG_mincIO ) Rprintf("hSlab_count [0..3] = %d, %d, %d, %d\n",
    ~^
    %lld
    hSlab_count[0], hSlab_count[1], hSlab_count[2], hSlab_count[3]);
    ~~~~~~~~~~~~~~
    minc2_read.c:107:69: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
    if ( R_DEBUG_mincIO ) Rprintf("hSlab_count [0..3] = %d, %d, %d, %d\n",
    ~^
    %lld
    hSlab_count[0], hSlab_count[1], hSlab_count[2], hSlab_count[3]);
    ~~~~~~~~~~~~~~
    gcc -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c minc2_support.c -o minc2_support.o
    gcc -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c minc2_write.c -o minc2_write.o
    minc2_write.c: In function ‘write_volume’:
    minc2_write.c:156:55: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
    if ( R_DEBUG_mincIO ) Rprintf("hSlab_count [0..2] = %d, %d, %d\n",
    ~^
    %lld
    hSlab_count[0], hSlab_count[1], hSlab_count[2]);

minc2_write.c:156:59: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
if ( R_DEBUG_mincIO ) Rprintf("hSlab_count [0..2] = %d, %d, %d\n",
~^
%lld
hSlab_count[0], hSlab_count[1], hSlab_count[2]);
~~~~~~~~~~~~~~
minc2_write.c:156:63: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
if ( R_DEBUG_mincIO ) Rprintf("hSlab_count [0..2] = %d, %d, %d\n",
~^
%lld
hSlab_count[0], hSlab_count[1], hSlab_count[2]);
~~~~~~~~~~~~~~
gcc -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c minc_anova.c -o minc_anova.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c minc_apply.cpp -o minc_apply.o
minc_apply.cpp: In function ‘Rcpp::List rcpp_minc_apply(Rcpp::CharacterVector, bool, Rcpp::CharacterVector, double, double, Rcpp::RObject, bool, Rcpp::NumericVector, Rcpp::Function, Rcpp::List)’:
minc_apply.cpp:92:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
Rprintf("Number of slabs: %d\n", n_slabs[0] * n_slabs[1] * n_slabs[2]);
^~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
minc_apply.cpp:99:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
Rprintf("%d ", (i * n_slabs[1] * n_slabs[2]) +
^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(j * n_slabs[2]) +
~~~~~~~~~~~~~~~~~~
k);
~
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c minc_cpp.cpp -o minc_cpp.o
gcc -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c minc_reader.c -o minc_reader.o
minc_reader.c: In function ‘minc2_apply’:
minc_reader.c:436:27: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
Rprintf("Volume sizes: %i %i %i\n", sizes[0], sizes[1], sizes[2]);
~^ ~~~~~~~~
%lli
minc_reader.c:436:30: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
Rprintf("Volume sizes: %i %i %i\n", sizes[0], sizes[1], sizes[2]);
~^ ~~~~~~~~
%lli
minc_reader.c:436:33: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
Rprintf("Volume sizes: %i %i %i\n", sizes[0], sizes[1], sizes[2]);
~^ ~~~~~~~~
%lli
gcc -I"/usr/share/R/include" -DNDEBUG -I/opt/minc/1.9.18/include -I/usr/local/hdf5/include -I'/home/brain/R/x86_64-pc-linux-gnu-library/4.4/Rcpp/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-y8QyKA/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c modelling_functions.c -o modelling_functions.o
In file included from /usr/share/R/include/R.h:78,
from minc_reader.h:12,
from modelling_functions.c:1:
modelling_functions.c: In function ‘voxel_lm’:
modelling_functions.c:541:12: error: too few arguments to function ‘dpotri_’
F77_CALL(dpotri)("Upper", &p, x, &n, &info);
^~~~~~
/usr/share/R/include/R_ext/RS.h:77:22: note: in definition of macro ‘F77_CALL’

define F77_CALL(x) x ## _

                  ^

/usr/share/R/include/R_ext/Lapack.h:854:10: note: declared here
F77_NAME(dpotri)(const char* uplo, const La_INT* n,
^~~~~~
/usr/share/R/include/R_ext/RS.h:77:22: note: in definition of macro ‘F77_CALL’

define F77_CALL(x) x ## _

                  ^

/usr/share/R/include/R_ext/Lapack.h:854:1: note: in expansion of macro ‘F77_NAME’
F77_NAME(dpotri)(const char* uplo, const La_INT* n,
^~~~~~~~
modelling_functions.c: In function ‘minc2_model’:
modelling_functions.c:822:27: warning: format ‘%i’ expects argument of type ‘int’, but argument 2 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
Rprintf("Volume sizes: %i %i %i\n", sizes[0], sizes[1], sizes[2]);
~^ ~~~~~~~~
%lli
modelling_functions.c:822:30: warning: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
Rprintf("Volume sizes: %i %i %i\n", sizes[0], sizes[1], sizes[2]);
~^ ~~~~~~~~
%lli
modelling_functions.c:822:33: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘misize_t’ {aka ‘long long unsigned int’} [-Wformat=]
Rprintf("Volume sizes: %i %i %i\n", sizes[0], sizes[1], sizes[2]);
~^ ~~~~~~~~
%lli
/usr/lib/R/etc/Makeconf:195: recipe for target 'modelling_functions.o' failed
make: *** [modelling_functions.o] Error 1
ERROR: compilation failed for package ‘RMINC’

  • removing ‘/home/brain/R/x86_64-pc-linux-gnu-library/4.4/RMINC’
    Warning message:
    In i.p(...) :
    installation of package ‘/tmp/RtmpRPacg7/file2a382cb896b9/RMINC_1.5.3.0.tar.gz’ had non-zero exit status
@yohanyee
Copy link
Contributor

Hello, this appears to be a duplicate of issue #314 .

Can you try installing from the develop branch and let us know if that works?

@kodiweera
Copy link
Author

kodiweera commented Jul 31, 2024

Hi yohanyee,
That worked! I installed it on both Ubuntu 18 and 20 runing R-4.4.1.

Here's what I did:
git clone -b develop https://github.com/Mouse-Imaging-Centre/RMINC.git
cd RMIN
R CMD INSTALL .

Thanks you all for all your good work!

@yohanyee
Copy link
Contributor

Great, glad to know it works.

Another way to install is via devtools in R:

devtools::install_github("Mouse-Imaging-Centre/RMINC@develop")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants