Git Product home page Git Product logo

Comments (11)

mlin2017 avatar mlin2017 commented on June 13, 2024 1

Thanks, Brian.

from vcfr.

knausb avatar knausb commented on June 13, 2024

Hi Mao,

This appears to be a compilation error and appears specific to your system. You did not report any system information but you appear to be using some flavor of Unix. Is this correct? If you're using Windows or Mac you should install from pre-compiled binaries.

I'm not sure your system is finding a compiler. Below is an example of the output I generate when installing vcfR.

  • installing source package ‘vcfR’ ...
    ** package ‘vcfR’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I"/home/local/USDA-ARS/knausb/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c NM2winNM.cpp -o NM2winNM.o

Note that my command begins with 'g++ -std=c++11' while yours does not. Could you try:

g++ --version

from your shell to validate that your system can find a compiler?

Thank you!

from vcfr.

mlin2017 avatar mlin2017 commented on June 13, 2024

Hi Brian,

Here is what I get:
g++ (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5

When I install other packages, I do see the similar command as yours:

  • installing source package ‘vegan’ ...
    ** package ‘vegan’ successfully unpacked and MD5 sums checked
    ** libs
    gfortran -fpic -O3 -pipe -g -c cepin.f -o cepin.o
    gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -O3 -pipe -g -c data2hill.c -o data2hill.o

Please let me know if you need more information.

Thanks,
Mao

from vcfr.

knausb avatar knausb commented on June 13, 2024

Hi Mao,

Thank you for validating that you have access to g++ on your system! Your example is a step in the right direction, but it does not test that g++ is found by R. Your example validates that gfortran and gcc are found. Could you try:

install.packages('valr')

to validate that you see 'g++ -std=c++11'. (This is simply a package that uses g++ and c++11, any package meeting these requirements will do.)

from vcfr.

mlin2017 avatar mlin2017 commented on June 13, 2024

Hi Brian,

Thanks for the quick reply.
g++ was found:

 *installing *source* package ‘purrr’ ...
** package ‘purrr’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I../inst/include -DCOMPILING_DPLYR  -I"/net/fantasia/home/maoxuanl/R/local_lib/Rcpp/include" -I"/net/fantasia/home/maoxuanl/R/local_lib/dplyr/include" -I"/net/mario/cluster/lib/R/site-libra
ry/BH/include"   -fpic  -O3 -pipe  -g  -c extract.c -o extract.o
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include -DCOMPILING_DPLYR  -I"/net/fantasia/home/maoxuanl/R/local_lib/Rcpp/include" -I"/net/fantasia/home/maoxuanl/R/local_lib/dplyr/include" -I"/net/mario/cluster/lib/R/site-library/BH/inclu
de"  -DBOOST_NO_INT64_T -DBOOST_NO_INTEGRAL_INT64_T -DBOOST_NO_LONG_LONG -fpic  -O3 -pipe  -g  -c fast-copy.cpp -o fast-copy.o

but the installation failed and the same error showed up:

/bin/bash: I/usr/share/R/include: No such file or directory
make: [utils.o] Error 127 (ignored)
-o valr.so RcppExports.o absdist.o closest.o complement.o coverage.o intersect.o merge.o random.o reldist.o shuffle.o subtract.o utils.o -L/usr/lib/R/lib -lR
/bin/bash: line 2: -o: command not found
make: *** [valr.so] Error 127
ERROR: compilation failed for package ‘valr’

I believe it should have something to do with cluster settings, not the "vcfR", since I successfully installed the package on the local computer.

Thanks,
Mao

from vcfr.

knausb avatar knausb commented on June 13, 2024

Hi Mao,

You appear to have validated that R can find g++ but this does not appear to include '-std=c++11'. This later part adds functionality to C++ that is required by vcfR. I suspect this is the issue. And I agree that this probably has to do with your system and not vcfR. Let me know if you have any other questions!

from vcfr.

mlin2017 avatar mlin2017 commented on June 13, 2024

Hi Brian,

I am not sure you can still see this post after you closed this issue, but here are what my system administrator found after hours' efforts:

`it's truncating the first character of that compiler flag, which is supposed to be:

-I/usr/share/R/include

but it ends up as:

I/usr/share/R/include

The compiler doesn't pick this up as a valid flag (rightfully) so it errors out. Editing /etc/R/Makeconf to clear R_XTRA_CPPFLAGS just shifts the compiler parameter that is truncated. Whatever the first parameter is, loses the first character and this will always give an error.`

Also, do you have any specific info regarding what versions of Linux it's known to work on (if any) or what version of GCC it needs?

Could you please see if these info could give you some hints for possible solutions?

Thanks,
Mao

from vcfr.

knausb avatar knausb commented on June 13, 2024

HI Mao,

Apologies if I closed this too soon. I do see your message. Are you aware of #58? Is this a colleague? If so, I think we need to merge the discussion.

Info on other builds:
https://travis-ci.org/knausb/vcfR
https://cran.r-project.org/web/checks/check_results_vcfR.html

Incidentally, Several month ago I migrated from ubuntu 12 to 16 and skipped 14. So I don't have much experience with that version.

Could you confirm that your edit to R/Makeconf did not resolve the issue? Thanks!

from vcfr.

mlin2017 avatar mlin2017 commented on June 13, 2024

Hi Brian,

Yes, #58 was opened by my colleague. You can close this one and we can discuss over there.

Thanks,
Mao

from vcfr.

knausb avatar knausb commented on June 13, 2024

Thank you!

from vcfr.

wbsimey avatar wbsimey commented on June 13, 2024

I recently experienced a similar issue installing vcfR after I upgraded from ubuntu 16 to 18. I solved this issue by running
apt-get install devscripts (you may need sudo privileges).

from vcfr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.