Tuesday, February 23, 2016

Mac: ld: library not found for -lgcc_s.10.4

Checking for cc... ld: library not found for -lgcc_s.10.4

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Found the way to solve the problem

cd /usr/local/lib sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.4.dylib

Thanks to italoag
https://github.com/nodejs/node/issues/2933

Tuesday, June 23, 2015

Installing R in the cluster :)

I managed to install R packages inside the cluster in the local folder.


shell script to run the R install file :

packs=c("zoo","snow","caTools")

for(i in 1:length(packs)){
        install.packages(packs[i],lib="/mnt/home/sinha/Rpackages",dependencies=TRUE,repos='http://cran.us.r-project.org')

}



Then change the bashrc file by adding the following lines

if [ -n $R_LIBS ]; then
   export R_LIBS=/mnt/home/sinha/Rpackages:$R_LIBS
else
   export R_LIBS=/mnt/home/sinha/Rpackages
fi



Similar install perl packages using cpanm  and change the bashrc file by adding the following lines

eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)
eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`
export MANPATH=$HOME/perl5/man:$MANPATH
Installing Repeat Enrichment Estimator in Mac OSX Yosemite

First the there was the problem of installing the Bio::DB::Fasta files and in general BioPerl
Finally was able to install it using cpanm for some reason installing inside span gave errors.

Then trying install the bwa was a mess. It constantly gave the error

ld: warning: ignoring file bwt_gen/libbwtgen.a, file was built for archive which is not the architecture being linked (i386): bwt_gen/libbwtgen.a
Undefined symbols for architecture i386:
  "_bwt_2occ", referenced from:
      _bwt_match_exact in bwt.o
      _bwt_match_exact_alt in bwt.o
      _bwt_cal_width in bwtaln.o
  "_bwt_2occ4", referenced from:
      _bwt_match_gap in bwtgap.o
  "_bwt_bwtgen", referenced from:
      _bwa_index in bwtindex.o
  "_bwt_bwtgen_main", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bwa] Error 1


What really worked was the following:
Install Xcode, gcc(5.1) 

In the Makefile change the following flags

Originally commands
CC= gcc
CXX= g++
CFLAGS= -Wall -O3 -m64 

Modified
CC= gcc-5
CXX= g++-5
CFLAGS= -Wall -O3 -m64 -fgnu89-inline