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

Pmetrics installation #247

Open
Amitkolhe21 opened this issue Dec 10, 2024 · 11 comments
Open

Pmetrics installation #247

Amitkolhe21 opened this issue Dec 10, 2024 · 11 comments

Comments

@Amitkolhe21
Copy link

I am trying to install Pmetrics but I am gettinh this error:
Warning message:
In i.p(...) :
installation of package ‘C:/Users/salma/AppData/Local/Temp/RtmpaIkrwB/file1d1c188f4ebf/Pmetrics_2.1.1.tar.gz’ had non-zero exit status
Can you help me?
@mnneely

@Siel
Copy link
Member

Siel commented Dec 10, 2024 via email

@Amitkolhe21
Copy link
Author

12 errors generated.
make: *** [knn.o] Error 1
ERROR: compilation failed for package ‘Pmetrics’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Pmetrics’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/hs/xv0d3xt94pn8ks3hxqgrm17m0000gn/T//RtmpzD2sbg/file36866f77ab63/Pmetrics_2.1.1.tar.gz’ had non-zero exit status

@Amitkolhe21
Copy link
Author

I've shared the whole error message, can you help me with that? @Siel

@Siel
Copy link
Member

Siel commented Dec 12, 2024 via email

@Amitkolhe21
Copy link
Author

FYI, I'm using Mac,

And I have C language installed on it
PFA, I've attached the screenshot for your reference.
Screenshot 2024-12-12 at 9 53 31 AM

@Siel
Copy link
Member

Siel commented Dec 12, 2024

I understand. Now the error you are seeing is related to the building process of one of pmetrics internal dependencies (knn.cpp) I suppose you also have a working cpp compiler. I think your error might be related to #215. It is a problem only affecting newer MacOS systems and the solution is at the end of that thread.

@Siel
Copy link
Member

Siel commented Dec 12, 2024

I was expecting the error to be more verbose. As you can see in the issue I linked, the final error is the same but the compilation process gives more information as it fails. By the way, when writing the Makevars file, make sure you point it to the right version of the c++ compiler on your system (I usually use gcc)

@Siel
Copy link
Member

Siel commented Dec 12, 2024

If that does not work I could point you to some specific branch of Pmetrics that does not use that dependency anymore.

@Amitkolhe21
Copy link
Author

Siel, I followed the steps from the the above solution #215, but still I'm facing issue in installing the Pmetrics,
Following the error I received, for your reference.

library("remotes")
remotes::install_github("LAPKB/Pmetrics")
Downloading GitHub repo LAPKB/Pmetrics@HEAD
Running R CMD build...

  • checking for file ‘/private/var/folders/hs/xv0d3xt94pn8ks3hxqgrm17m0000gn/T/RtmpEU8h6d/remotes16dd41289e9c/LAPKB-Pmetrics-ee1b703/DESCRIPTION’ ... OK
  • preparing ‘Pmetrics’:
  • checking DESCRIPTION meta-information ... OK
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
    Removed empty directory ‘Pmetrics/inst/Examples/Runs’
    Omitted ‘LazyData’ and ‘LazyDataCompression’ from DESCRIPTION
  • building ‘Pmetrics_2.1.1.tar.gz’
  • installing source package ‘Pmetrics’ ...
    ** using staged installation
    ** libs
    sh: g++-13: command not found
    using SDK: ‘’
    g++-13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c knn.cpp -o knn.o
    /bin/sh: g++-13: command not found
    make: *** [knn.o] Error 127
    ERROR: compilation failed for package ‘Pmetrics’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Pmetrics’
    Warning messages:
    1: In missing_devel_warning(pkgdir) :
    Package Pmetrics has compiled code, but no suitable compiler(s) were found. Installation will likely fail.
    Install XCode and make sure it works.
    2: In i.p(...) :
    installation of package ‘/var/folders/hs/xv0d3xt94pn8ks3hxqgrm17m0000gn/T//RtmpEU8h6d/file16dd3247e718/Pmetrics_2.1.1.tar.gz’ had non-zero exit status

@mhovd
Copy link
Contributor

mhovd commented Jan 17, 2025

@Amitkolhe21, are you still experiencing this issue?
From the latest error message it appears that Pmetrics was unable to find the necessary compiler, e.g. gfortran.
Can you check if you have it installed by providing the output from running which gfortran in your Terminal?

@Amitkolhe21
Copy link
Author

@mhovd and @Siel I'm still facing the issue

I've installed gfortran, but still getting the following error

Terminal -

amitkolhe@Amits-MacBook-Air ~ % which gfortran
/usr/local/bin/gfortran
amitkolhe@Amits-MacBook-Air ~ % gfortran
gfortran: fatal error: no input files
compilation terminated.
amitkolhe@Amits-MacBook-Air ~ %

Pmetrics error in R Studio while installing -

R version 4.4.2 (2024-10-31) -- "Pile of Leaves"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

library("remotes")
remotes::install_github("LAPKB/Pmetrics")
Downloading GitHub repo LAPKB/Pmetrics@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: rlang (1.1.4 -> 1.1.5 ) [CRAN]
5: bit64 (4.5.2 -> 4.6.0-1) [CRAN]
6: igraph (2.1.2 -> 2.1.3 ) [CRAN]
7: systemfonts (1.1.0 -> 1.2.0 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
rlang (1.1.4 -> 1.1.5 ) [CRAN]
bit64 (4.5.2 -> 4.6.0-1) [CRAN]
igraph (2.1.2 -> 2.1.3 ) [CRAN]
systemfonts (1.1.0 -> 1.2.0 ) [CRAN]
Installing 4 packages: rlang, bit64, igraph, systemfonts
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.4/rlang_1.1.4.tgz'
Content type 'application/x-gzip' length 1903020 bytes (1.8 MB)

downloaded 1.8 MB

trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.4/bit64_4.6.0-1.tgz'
Content type 'application/x-gzip' length 575590 bytes (562 KB)

downloaded 562 KB

trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.4/igraph_2.1.2.tgz'
Content type 'application/x-gzip' length 9720193 bytes (9.3 MB)

downloaded 9.3 MB

trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.4/systemfonts_1.2.0.tgz'
Content type 'application/x-gzip' length 7138024 bytes (6.8 MB)

downloaded 6.8 MB

The downloaded binary packages are in
/var/folders/hs/xv0d3xt94pn8ks3hxqgrm17m0000gn/T//Rtmp0MoljX/downloaded_packages
Running R CMD build...

  • checking for file ‘/private/var/folders/hs/xv0d3xt94pn8ks3hxqgrm17m0000gn/T/Rtmp0MoljX/remotes3ead68d44eed/LAPKB-Pmetrics-ee1b703/DESCRIPTION’ ... OK
  • preparing ‘Pmetrics’:
  • checking DESCRIPTION meta-information ... OK
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
    Removed empty directory ‘Pmetrics/inst/Examples/Runs’
    Omitted ‘LazyData’ and ‘LazyDataCompression’ from DESCRIPTION
  • building ‘Pmetrics_2.1.1.tar.gz’
  • installing source package ‘Pmetrics’ ...
    ** using staged installation
    ** libs
    sh: g++-13: command not found
    using SDK: ‘’
    g++-13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c knn.cpp -o knn.o
    /bin/sh: g++-13: command not found
    make: *** [knn.o] Error 127
    ERROR: compilation failed for package ‘Pmetrics’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/Pmetrics’
    Warning messages:
    1: In missing_devel_warning(pkgdir) :
    Package Pmetrics has compiled code, but no suitable compiler(s) were found. Installation will likely fail.
    Install XCode and make sure it works.
    2: In i.p(...) :
    installation of package ‘/var/folders/hs/xv0d3xt94pn8ks3hxqgrm17m0000gn/T//Rtmp0MoljX/file3ead7897dd31/Pmetrics_2.1.1.tar.gz’ had non-zero exit status

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

3 participants