MIT-LCP / physionet

A collection of tools for working with the PhysioNet repository.
http://physionet.org/
MIT License
69 stars 17 forks source link

HRV Make Install error #128

Open skylerpaulus opened 3 years ago

skylerpaulus commented 3 years ago

Hello,

I am trying to install HRV on an HPC cluster using centos7.

make install error:

$  make install
cc -O -o rrlist rrlist.c -lwfdb
rrlist.c:25:23: fatal error: wfdb/wfdb.h: No such file or directory
 #include <wfdb/wfdb.h>
                       ^
compilation terminated.
make: *** [rrlist] Error 1

The path I have it installing to is: /opt/ohpc/pub/apps/HRV/test

After editing this path in the Makefile I run make install. Makefile:

#                                       Last revised:   Aug 4 2009 (by GBM)
# 'make' description file for the HRV Toolkit

# The WFDB library must be installed before the HRV Toolkit can be compiled.
# Get the WFDB software from http://physionet.org/physiotools/wfdb.shtml .

# The HRV Toolkit will be installed in BINDIR (by default, /usr/bin). If you
# change it, make sure that your PATH includes BINDIR.
BINDIR=/opt/ohpc/pub/apps/HRV/test

# These scripts need a POSIX shell (e.g., sh or bash) in order to run.
SCRIPTS = get_hrv plt_rrs

# These binaries are compiled by 'make all'.
ALL = filt filtnn hours pwr rrlist seconds statnn

# 'make install' copies the HRV toolkit's scripts and binaries to BINDIR.
install:        all
        cp -p $(SCRIPTS) $(ALL) $(BINDIR)

all:            $(ALL)

# 'make bin-tarball' creates a tarball of binaries.
bin-tarball:    all
        mkdir HRV
        cp -p $(SCRIPTS) $(ALL) Usages HRV
        tar cfvz HRV-`arch`-`uname`.tar.gz HRV
        rm -rf HRV

# 'make clean' removes old copies of the executables.
clean:
        rm -f $(ALL)

filt :          filt.c
        $(CC) -O -o $@ filt.c

filtnn :        filtnn.c
        $(CC) -O -o $@ filtnn.c

hours :         hours.c
        $(CC) -O -o $@ hours.c

pwr :           pwr.c
        $(CC) -O -o $@ pwr.c

rrlist :        rrlist.c
        $(CC) -O -o $@ rrlist.c -lwfdb

seconds :       seconds.c
        $(CC) -O -o $@ seconds.c

statnn :        statnn.c
        $(CC) -O -o $@ statnn.c -lm

Loaded modules

Currently Loaded Modules:
  1) autotools   2) prun/1.3   3) gnu8/8.3.0   4) openmpi3/3.1.4   5) ohpc   6) plt/2.5a   7) expat-2.2.9-gcc-10.2.0-jnq5tcr   8) wfdb/10.6.2

Paths:

echo $PATH
/opt/ohpc/pub/apps/wfdb/10.6.2/bin:/opt/ohpc/pub/apps/wfdb/10.6.2/lib:/opt/ohpc/pub/apps/wfdb/10.6.2:/opt/ohpc/pub/spack/opt/spack/linux-centos7-sandybridge/gcc-10.2.0/expat-2.2.9-jnq5tcra4f2nxcegt6l4hhcqffnlah6l/bin:/opt/ohpc/pub/apps/plt/2.5a/bin:/opt/ohpc/pub/apps/plt/2.5a:/opt/ohpc/pub/spack/bin:/opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin:/opt/ohpc/pub/compiler/gcc/8.3.0/bin:/opt/ohpc/pub/utils/prun/1.3:/opt/ohpc/pub/utils/autotools/bin:/opt/ohpc/pub/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/user/.local/bin:/home/user/bin
$ echo $LD_LIBRARY_PATH
/opt/ohpc/pub/apps/wfdb/10.6.2/lib/
$ echo $INCLUDE
/opt/ohpc/pub/apps/wfdb/10.6.2/include/

Module file for wfdb

cat 10.6.2 
#%Module1.0#######################################################################
## cmgui modulefile
##
proc ModulesHelp { } {

        puts stderr "\tAdds WFDB to Koko"
}

module-whatis   "Adds WFDB to Koko."

set              application       wfdb/10.6.2
set              root              /opt/ohpc/pub/apps/$application

setenv     LD_LIBRARY_PATH   /opt/ohpc/pub/apps/wfdb/10.6.2/lib/
#setenv     LD_LIBRARY_PATH   $root/lib/libwfdb.so.10
#setenv     LIBRARY_PATH   $root/lib/libwfdb.so.10
setenv     INCLUDE   /opt/ohpc/pub/apps/wfdb/10.6.2/include/

#prepend-path      INCLUDE           /opt/ohpc/pub/apps/wfdb/10.6.2/include/wfdb/
prepend-path      PATH              $root
prepend-path      PATH              $root/lib
prepend-path      PATH              $root/bin
#prepend-path      PATH              /opt/ohpc/pub/apps/wfdb/10.6.2/include/

wfdb.h is here:

ls /opt/ohpc/pub/apps/wfdb/10.6.2/include/wfdb/
ecgcodes.h  ecgmap.h  wfdbf.c  wfdb.h  wfdblib.h

Please help, thanks!

skylerpaulus commented 3 years ago

Added C_INCLUDE_PATH and this resolved the previous error. Now I receive:

cc -O -o rrlist rrlist.c -lwfdb
/bin/ld: cannot find -lwfdb
collect2: error: ld returned 1 exit status
make: *** [rrlist] Error 1