Alexandre Racine wrote:

> ...
lrwxrwxrwx 1 root root 36 Jan 25 10:10 /usr/lib/liblapack.so.3 -> /usr/lib/lapack/atlas/liblapack.so.0.0.0

Starting the program again, I get this:

$ ./smartpca
./smartpca: error while loading shared libraries: liblapack.so.3: cannot open shared object file: No such file or directory

  Are you sure it does exactly that?
I cannot reproduce it. Whether I link /usr/lib/liblapack.so.3 to /usr/lib/liblapack.so.0 or directly to /usr/lib/lapack/atlas/liblapack.so.0.0.0 as you did, I get libblas.so.3, not liblapack.so.3 not found. After linking /usr/lib/libblas.so.3 to /usr/lib/libblas.so.0 I start smartpca without problem:

> ./smartpca
./smartpca: error while loading shared libraries: liblapack.so.3: cannot open shared object file: No such file or directory
> sudo ln -s /usr/lib/liblapack.so.0 /usr/lib/liblapack.so.3
> ./smartpca
./smartpca: error while loading shared libraries: libblas.so.3: cannot open shared object file: No such file or directory
> sudo ln -s /usr/lib/libblas.so.0 /usr/lib/libblas.so.3
> ./smartpca
no parameters
## smartpca version: 7521

You can avoid such ugly symbolic links, if you compile the sources. With the help of `pkg-config --libs lapack` I adapted Makefile.alt to the attached Makefile.gcc4 and compiled the sources:

> make -f Makefile.gcc4 all

For now I don't feel like to pay those extra ten to sixty minutes to write something like a first version of an ebuild, but I thing that it might be quite straitforward.
  With best regards
                                Honza Macháček
HOMEL=$(PWD)
DEBUG_OPTIONS= -g -pg
BIN=$(HOMEL)/bin
# "make smartpca" to make smartpca program (ditto for other programs)
# "mv smartpca ../bin" or "make install" to place in ../bin directory
# "make clean" to clean up extra files in this directory
# "make clobber" to clobber all files and subdirectories except source files
#    so as to enable recompiling from scratch.

NLIB=$(HOMEL)/smartlib/nicklib.a
IDIR=$(HOMEL)/smartinclude
VPATH=.:nicksrc
BLAS = blas
# may need to change to BLAS = blas-3 (depends on blas/lapack installation)

CC=/usr/bin/gcc 
FF=/usr/bin/gfortran
CFLAGS= -c -O -I$(IDIR) -Wimplicit
LAPACK_LIBS=-llapack -lblas -lcblas -latlas

eigx.o:         eigx.f
        $(FF)  -c -o eigx.o  eigx.f

statsubs.o:     nicksrc/statsubs.c
        $(CC)  $(CFLAGS) -DTWTAB=$(TWTAB) -o statsubs.o nicksrc/statsubs.c

OBJ=strsubs.o sortit.o vsubs.o statsubs.o linsubs.o getpars.o xsearch.o gauss.o 
gds.o
TWTAB=\"$(HOMEL)/smarttables/twtable\"

M1=smartpca
M1O=smartpca.o  twsubs.o mcio.o admutils.o egsubs.o eigsubs.o  eigx.o 

M2=convertf
M2O=convertf.o  mcio.o admutils.o

M3=twstats
M3O=twstats.o  

M4=eigenstrat
M4O=eigenstrat.o

M5=eigenstratQTL
M5O=eigenstratQTL.o

M6=pca
M6O=pca.o eigsubs.o eigx.o

M7=pcatoy
M7O=pcatoy.o eigsubs.o eigx.o

PROGS= smartpca convertf twstats eigenstrat eigenstratQTL pca
all: nicklib $(PROGS)          

install:        all
        cp $(PROGS) $(HOMEL)/bin

uninstall:   
        rm -f $(BIN)/smartpca
        rm -f $(BIN)/convertf
        rm -f $(BIN)/twstats
        rm -f $(BIN)/eigenstrat
        rm -f $(BIN)/eigenstratQTL
        rm -f $(BIN)/pca
        rm -f $(NLIB)/libnick.a
 
$(M1): nicklib $(M1O)
        gcc -O -I$(IDIR) $(DEBUG_OPTIONS) -L/usr/lib -lm $(LAPACK_LIBS) -o 
$(M1) $(M1O) $(NLIB) -Wimplicit

$(M2): nicklib $(M2O)
        gcc -O -I$(IDIR) $(DEBUG_OPTIONS) -lm  -o $(M2) $(M2O) $(NLIB) 
-Wimplicit

$(M3): nicklib $(M3O)
        gcc -O -I$(IDIR) $(DEBUG_OPTIONS) -lm  -o $(M3) $(M3O) $(NLIB) 
-Wimplicit

$(M4): nicklib $(M4O)
        gcc -O -I$(IDIR) $(DEBUG_OPTIONS) -lm  -o $(M4) $(M4O) $(NLIB) 
-Wimplicit

$(M5): nicklib $(M5O)
        gcc -O -I$(IDIR) $(DEBUG_OPTIONS) -lm  -o $(M5) $(M5O) $(NLIB) 
-Wimplicit

$(M6): nicklib $(M6O)
        gcc -O -I$(IDIR) $(DEBUG_OPTIONS) -L/usr/lib -lm $(LAPACK_LIBS) -o 
$(M6) $(M6O) $(NLIB) -Wimplicit

$(M7): nicklib $(M7O)
        gcc -O -I$(IDIR) $(DEBUG_OPTIONS) -L/usr/lib -lm $(LAPACK_LIBS) -o 
$(M7) $(M7O) $(NLIB) -Wimplicit

libnick.a:      dirs  $(OBJ)
        ar -r libnick.a $(OBJ)

nicklib:        dirs   libnick.a 
        cp libnick.a  $(NLIB)

dirs:   
        mkdir -p  $(HOMEL)/smartlib
        mkdir -p  $(HOMEL)/smarttables
        mkdir -p  $(HOMEL)/smartinclude
        mkdir -p  $(BIN)
        cp twtable  $(HOMEL)/smarttables
        cp  nicksrc/*.h  $(IDIR)

clean: 
        rm -f *.o 
        rm -f core
        rm -f libnick.a
        rm -f $(PROGS)

clobber: clean rmdirs uninstall

rmdirs: 
        rm -rf $(HOMEL)/smartlib 
        rm -rf $(HOMEL)/smarttables 
        rm -rf $(HOMEL)/smartinclude 

Reply via email to