Giter VIP home page Giter VIP logo

Comments (12)

akhst7 avatar akhst7 commented on August 25, 2024 2

@JenniferWUSTL , This is more complicated than I initially thought. The following worked for me.

Step 1

Download a ZIP Conos source package by clicking the green down load button and unzip

Step 2

In the Conos source folder, search and get into the src folder, and locate Makevars file. Double click on it and see if Textedit will kicking to open Makvars. Look for a line starting with PKG_LIBS and add CXX_STD = CXX11 like a following;

PKG_LIBS=-L/usr/lib/ -L"." -lpthread -lstdc++ -ln2 -lleidenalg -lm $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) $(SHLIB_OPENMP_CXXFLAGS) $(PKGB_PATH)/igraph$(DYLIB_EXT) **CXX_STD = CXX11** MkInclude = $(R_HOME)/etc${R_ARCH}/Makeconf
After this close the file and get back into R.

Step 3

Create your Makevars in ~/.R directory by your favorite text editor (I use nano) and cut and paste following;

LLVM_LOC = /usr/local/opt/llvm
C = $(LLVM_LOC)/bin/clang -fopenmp
CXX = $(LLVM_LOC)/bin/clang++ -fopenmp
CXX1X = $(LLVM_LOC)/bin/clang++ -fopenmp
CXX11 = $(LLVM_LOC)/bin/clang++ -fopenmp

CFLAGS = -O3 -Wall -mtune=native -march=native -Ofast -pedantic  -mtune=native -pipe
CXXFLAGS = -O3 -Wall -mtune=native -march=native -Ofast -pedantic  -mtune=native -pipe
CXX1XFLAGS = -O3 -Wall -mtune=native -march=native  -Ofast -pedantic  -mtune=native -pipe
CXX11FLAGS = -O3 -Wall -mtune=native -march=native  -Ofast -pedantic  -mtune=native -pipe
#LDFLAGS = CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include

Make sure location of llvm is right in LLVM_LOC = /usr/local/opt/llvm (this is where my llvm is located,).

Step3

Back in R studio or whatever R interface you are using, fire a following;

install.packages("/Users/akihikohohji/Downloads/conos-master", repos = NULL, type = "source")

That should do it. But at the end the compiler will mostly likely complain that it can't find igraph.dyllib. If this is the case, then you just follow this link, #11 (comment)

I hope this helps. If this does not work, I would suggest a nuclear option, clean install Catalina, which I did and everything started working just fine.

from conos.

haircell avatar haircell commented on August 25, 2024 1

Thank you @evanbiederstedt ! That worked! :)

from conos.

VPetukhov avatar VPetukhov commented on August 25, 2024

Possibly, you have two compilers in your system: one with openmp support and one without. Can you please check that path for the new compiler corresponds to the path, which is shown in the compilation logs?

from conos.

Jennifer-Foltz avatar Jennifer-Foltz commented on August 25, 2024

How do I obtain the compilation log?

from conos.

VPetukhov avatar VPetukhov commented on August 25, 2024

When you install the package, it shows installation progress, and compilation log is a part of it. The same place where you saw the error message you posted above. Indeed "clang: error: unsupported option '-fopenmp'" is just the end of the compilation log.

from conos.

akhst7 avatar akhst7 commented on August 25, 2024

You must have Makevars in ~/.R in which CF or CXX FLAGS has "-fopenmp". You can rename Makevars to Makevars.old and reinstall.

from conos.

Jennifer-Foltz avatar Jennifer-Foltz commented on August 25, 2024

@akhst7 We have tried to update the Makevars and clang+++ to the newest version and added the CF and CXX flags but unfortunately continue to get the same warning.

from conos.

evanbiederstedt avatar evanbiederstedt commented on August 25, 2024

Related: #64

from conos.

evanbiederstedt avatar evanbiederstedt commented on August 25, 2024

I've added a wiki page here: https://github.com/kharchenkolab/conos/wiki/Installing-Conos-for-Mac-OS

from conos.

haircell avatar haircell commented on August 25, 2024

Hi all,

I've been struggling with this as well. Recently installed R 4.0 on a new computer with Catalina. Ultimately, I was able to install PAGODA2, but still running into issues with conos.

I followed the instructions in the wiki page posted above ("Installing Conos for Mac OS"), but still no go.

When I try installing using R by running
devtools::install_github('kharchenkolab/conos')

I get the following error:

clang: error: unsupported option '-fopenmp'
make[1]: *** [base.o] Error 1
make: *** [sublibraries] Error 1
ERROR: compilation failed for package ‘conos’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/conos’
Error: Failed to install 'conos' from GitHub:
  (converted from warning) installation of package ‘/var/folders/g0/v1bzrcmn6kx6zpnx83d6_yv80000gp/T//RtmposCVMf/file48c325b0013c/conos_1.3.0.tar.gz’ had non-zero exit status

When I clone the repo and try installing this method:
R CMD install conos*.tar.gz

I get the following error:

Attaching package: ‘igraph’

The following objects are masked from ‘package:stats’:

    decompose, spectrum

The following object is masked from ‘package:base’:

    union

clang-10: error: no such file or directory: '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/igraph/libs/igraph.dylib'
make: *** [conos.so] Error 1
ERROR: compilation failed for package ‘conos’

Any help would be much appreciated!

from conos.

evanbiederstedt avatar evanbiederstedt commented on August 25, 2024

Hi @haircell

The master branch of conos still hasn't been updated in some time; we're working on a release soon. I believe that's why you are running into this error:

clang-10: error: no such file or directory: '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/igraph/libs/igraph.dylib'
make: *** [conos.so] Error 1
ERROR: compilation failed for package ‘conos’

In principle, this was fixed with the following PR: #64

When cloning the repo, please switch to the dev branch for the time being, i.e.

git clone https://github.com/kharchenkolab/conos.git
cd conos
git checkout dev
R CMD build .
R CMD install conos*.tar.gz

Hope that helps. Update: I've also explicitly updated the master branch to include these changes.

from conos.

evanbiederstedt avatar evanbiederstedt commented on August 25, 2024

Conos is now on CRAN. https://cran.r-project.org/web/packages/conos/index.html

Please install with install.packages('conos') to access the binaries.

The Mac OS binaries are there. I've updated the wiki accordingly: https://github.com/kharchenkolab/conos/wiki/Installing-conos-for-Mac-OS

from conos.

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.