jsh58 / Genrich

Detecting sites of genomic enrichment
MIT License
185 stars 27 forks source link

Can not make #70

Closed GildasLepennetier closed 3 years ago

GildasLepennetier commented 3 years ago

Hi, I am not able to make the executable and I have no idea why. I am on a supercluster then I can load module for the requirements:

module load gcc/5
module load zlib/1.2.8

I then just "make" and obtain some error that aboard the compilation (see following code,any error stop the make-ing)

Any idea where this is coming from? Do I miss some dependencies?

gcc -g -Wall -std=gnu99 -O2 -o Genrich Genrich.c -lz -lm
Genrich.c: In function ‘saveQval’:
Genrich.c:212:16: error: ‘FLT_MAX’ undeclared (first use in this function)
   qVal[pLen] = FLT_MAX;
                ^
Genrich.c:212:16: note: each undeclared identifier is reported only once for each function it appears in
Genrich.c: In function ‘bd0’:
Genrich.c:405:19: error: ‘DBL_MIN’ undeclared (first use in this function)
     if (fabs(s) < DBL_MIN)
                   ^
Genrich.c: In function ‘pd_upper_series’:
Genrich.c:477:25: error: ‘DBL_EPSILON’ undeclared (first use in this function)
   } while (term > sum * DBL_EPSILON);
                         ^
Genrich.c: In function ‘pd_lower_series’:
Genrich.c:486:33: error: ‘DBL_EPSILON’ undeclared (first use in this function)
   while (y >= 1 && term > sum * DBL_EPSILON) {
                                 ^
Genrich.c: In function ‘pgamma_smallx’:
Genrich.c:507:25: error: ‘DBL_EPSILON’ undeclared (first use in this function)
   } while (fabs(term) > DBL_EPSILON * fabs(sum));
                         ^
Genrich.c: In function ‘multPval’:
Genrich.c:570:14: error: ‘FLT_MAX’ undeclared (first use in this function)
   return p > FLT_MAX ? FLT_MAX : (float) p;
              ^
Genrich.c: In function ‘pnorm’:
Genrich.c:1546:13: error: ‘DBL_EPSILON’ undeclared (first use in this function)
     if (y > DBL_EPSILON * 0.5) {
             ^
Genrich.c: In function ‘plnorm’:
Genrich.c:1600:32: error: ‘FLT_MAX’ undeclared (first use in this function)
     return x < meanlog ? 0.0 : FLT_MAX;
                                ^
Genrich.c: In function ‘calcPval’:
Genrich.c:1613:37: error: ‘FLT_MAX’ undeclared (first use in this function)
     return exptVal == 0.0f ? 0.0f : FLT_MAX;
                                     ^
In file included from Genrich.c:20:0:
Genrich.c: In function ‘copyAlns’:
Genrich.h:43:22: error: ‘FLT_MAX’ undeclared (first use in this function)
 #define NOSCORE     -FLT_MAX  // for alignments with no alignment score(s)
                      ^
Genrich.c:2798:16: note: in expansion of macro ‘NOSCORE’
   if (score != NOSCORE)
                ^
Genrich.c: In function ‘saveAlnsPair’:
Genrich.h:43:22: error: ‘FLT_MAX’ undeclared (first use in this function)
 #define NOSCORE     -FLT_MAX  // for alignments with no alignment score(s)
                      ^
Genrich.c:2879:16: note: in expansion of macro ‘NOSCORE’
   if (score != NOSCORE)
                ^
Genrich.c: In function ‘processSingle’:
Genrich.h:43:22: error: ‘FLT_MAX’ undeclared (first use in this function)
 #define NOSCORE     -FLT_MAX  // for alignments with no alignment score(s)
                      ^
Genrich.c:3008:16: note: in expansion of macro ‘NOSCORE’
   if (score != NOSCORE)
                ^
Genrich.c: In function ‘processPair’:
Genrich.h:43:22: error: ‘FLT_MAX’ undeclared (first use in this function)
 #define NOSCORE     -FLT_MAX  // for alignments with no alignment score(s)
                      ^
Genrich.c:3108:16: note: in expansion of macro ‘NOSCORE’
   if (score != NOSCORE)
                ^
Genrich.c: In function ‘processAlns’:
Genrich.h:43:22: error: ‘FLT_MAX’ undeclared (first use in this function)
 #define NOSCORE     -FLT_MAX  // for alignments with no alignment score(s)
                      ^
Genrich.c:3182:19: note: in expansion of macro ‘NOSCORE’
   float scorePr = NOSCORE, scoreR1 = NOSCORE,
                   ^
Genrich.c: In function ‘updatePairedAln’:
Genrich.h:43:22: error: ‘FLT_MAX’ undeclared (first use in this function)
 #define NOSCORE     -FLT_MAX  // for alignments with no alignment score(s)
                      ^
Genrich.c:4034:16: note: in expansion of macro ‘NOSCORE’
   if (score == NOSCORE)
                ^
Genrich.c: In function ‘getScore’:
Genrich.h:43:22: error: ‘FLT_MAX’ undeclared (first use in this function)
 #define NOSCORE     -FLT_MAX  // for alignments with no alignment score(s)
                      ^
Genrich.c:4362:12: note: in expansion of macro ‘NOSCORE’
     return NOSCORE;
            ^
Genrich.c: In function ‘getBAMscore’:
Genrich.h:43:22: error: ‘FLT_MAX’ undeclared (first use in this function)
 #define NOSCORE     -FLT_MAX  // for alignments with no alignment score(s)
                      ^
Genrich.c:4730:12: note: in expansion of macro ‘NOSCORE’
     return NOSCORE;
            ^
Genrich.c: In function ‘multPval’:
Genrich.c:571:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Genrich.c: In function ‘calcPval’:
Genrich.c:1634:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Genrich.c: In function ‘getScore’:
Genrich.c:4379:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Genrich.c: In function ‘getBAMscore’:
Genrich.c:4798:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [Makefile:2: Genrich] Error 1
jsh58 commented 3 years ago

Thanks for the question. FLT_MAX and the others are macro constants defined in <float.h>. Whoever manages your cluster can help you with compilation.

GildasLepennetier commented 3 years ago

Thanks you for your answer! I had to remove some default modules from the environment, some intel modules created a conflict and for some reasons the float.h was not available..