error installation patser-v3e.2
1
0
Entering edit mode
11.1 years ago
dago ★ 2.8k

I'm trying to install patse-v3e.2

I downloaded the file as .tar.gz, extracted and tryied to install it using make

the following error:

gcc -O2          -DOPTIONS    -c -o options.o options.c
gcc -O2          -DOPTIONS    -c -o main.o main.c
In file included from options.h:24:0,
                 from main.c:14:
definitions.h:31:0: warning: "INFINITY" redefined [enabled by default]
/usr/include/x86_64-linux-gnu/bits/inf.h:27:0: note: this is the location of the previous definition
gcc -O2          -DOPTIONS    -c -o command-line.o command-line.c
In file included from options.h:24:0,
                 from command-line.c:10:
definitions.h:31:0: warning: "INFINITY" redefined [enabled by default]
/usr/include/x86_64-linux-gnu/bits/inf.h:27:0: note: this is the location of the previous definition
gcc -O2          -DOPTIONS    -c -o parse-line.o parse-line.c
In file included from options.h:24:0,
                 from parse-line.c:15:
definitions.h:31:0: warning: "INFINITY" redefined [enabled by default]
/usr/include/x86_64-linux-gnu/bits/inf.h:27:0: note: this is the location of the previous definition
gcc -O2          -DOPTIONS    -c -o parse-line-help.o parse-line-help.c
In file included from options.h:24:0,
                 from parse-line-help.c:14:
definitions.h:31:0: warning: "INFINITY" redefined [enabled by default]
/usr/include/x86_64-linux-gnu/bits/inf.h:27:0: note: this is the location of the previous definition
parse-line-help.c: In function 'pl_Help':
parse-line-help.c:27:15: error: invalid storage class for function 'print_directions'
parse-line-help.c: At top level:
parse-line-help.c:43:13: warning: conflicting types for 'print_directions' [enabled by default]
parse-line-help.c:43:13: error: static declaration of 'print_directions' follows non-static declaration
parse-line-help.c:37:7: note: previous implicit declaration of 'print_directions' was here
make: *** [parse-line-help.o] Error 1

Looking this previous post :

How Do I Get Patser To Compile On Linux/Osx?

I changed the indicated line in the file parse-line-help.c

However, when I retype make I get again a similar error:

gcc -O2          -DOPTIONS    -c -o parse-line-help.o parse-line-help.c
In file included from options.h:24:0,
                 from parse-line-help.c:14:
definitions.h:31:0: warning: "INFINITY" redefined [enabled by default]
/usr/include/x86_64-linux-gnu/bits/inf.h:27:0: note: this is the location of the previous definition
parse-line-help.c: In function 'pl_Help':
parse-line-help.c:29:15: error: invalid storage class for function 'print_directions'
make: *** [parse-line-help.o] Error 1

Do you have any idea how to fix that?

Thank you very much for your help.

software-error patser motif • 2.6k views
ADD COMMENT
0
Entering edit mode
10.8 years ago

Here is a patch

diff -C 5 -r ./definitions.h ../definitions.h
*** ./definitions.h 2014-09-12 13:19:51.446652447 +0200
--- ../definitions.h 2001-07-10 00:17:37.000000000 +0200
***************
*** 26,38 ****
#define BIG_CHUNK_SIZE 512 /* The maximum size for file names. */
#define CHUNK_SIZE 512 /* The size unit for allocating dynamic memory. */
#define NAME_LENGTH 20 /* Presumed maximum length of a sequence name. */
#define BASE 2.71828182846 /* The base for taking logarithms. */
- #ifdef INFINITY
- #undef INFINITY
- #endif
#define INFINITY 1.0e100 /* A large double. */
#define INT_INF 2147483647 /* The largest 4 byte positive integer. */
#define ERROR 1.0e-6 /* Leeway factor when determining whether
* two scores or two column sums are the same. */
#define PI 3.14159265359
--- 26,35 ----
diff -C 5 -r ./parse-line-help.c ../parse-line-help.c
*** ./parse-line-help.c 2014-09-12 13:20:52.350954467 +0200
--- ../parse-line-help.c 2003-07-05 22:34:19.000000000 +0200
***************
*** 13,33 ****
#else
#include "options.h"
#endif
#include "parse-line.h"
- void print_directions(void);
-
/* Call the function "print_directions". */
int pl_Help(
void *variable, /* Address of the variable to be updated. */
int argc, /* Number of variables on the command line. */
char *argv[], /* The table of command line strings. */
int i, /* The index to the current command line string. */
int k) /* Index to current position of the current string. */
{
if (k != 0)
{
fprintf(stderr, "\"%s\" (item %d on the command line) ", argv[i], i);
fprintf(stderr, "does not match any of the legal options.\n\n");
--- 13,32 ----
#else
#include "options.h"
#endif
#include "parse-line.h"
/* Call the function "print_directions". */
int pl_Help(
void *variable, /* Address of the variable to be updated. */
int argc, /* Number of variables on the command line. */
char *argv[], /* The table of command line strings. */
int i, /* The index to the current command line string. */
int k) /* Index to current position of the current string. */
{
+ static void print_directions(void);
if (k != 0)
{
fprintf(stderr, "\"%s\" (item %d on the command line) ", argv[i], i);
fprintf(stderr, "does not match any of the legal options.\n\n");
***************
*** 39,49 ****
exit(0);
}
}
/* Page the directions. */
! void print_directions(void)
{
FILE *fp; /* Pointer to the paging format. */
char *pager; /* Value of the environment variable PAGER. */
void text_directions(FILE *fp); /* The text of the directions. */
--- 38,48 ----
exit(0);
}
}
/* Page the directions. */
! static void print_directions(void)
{
FILE *fp; /* Pointer to the paging format. */
char *pager; /* Value of the environment variable PAGER. */
void text_directions(FILE *fp); /* The text of the directions. */
view raw patser.patch hosted with ❤ by GitHub

$ make
gcc -O2          -DOPTIONS    -c -o options.o options.c
gcc -O2          -DOPTIONS    -c -o main.o main.c
gcc -O2          -DOPTIONS    -c -o command-line.o command-line.c
gcc -O2          -DOPTIONS    -c -o parse-line.o parse-line.c
gcc -O2          -DOPTIONS    -c -o parse-line-help.o parse-line-help.c
gcc -O2          -DOPTIONS    -c -o text-directions.o text-directions.c
gcc -O2          -DOPTIONS    -c -o alpha.o alpha.c
gcc -O2          -DOPTIONS    -c -o process-matrix.o process-matrix.c
gcc -O2          -DOPTIONS    -c -o read-matrix.o read-matrix.c
gcc -O2          -DOPTIONS    -c -o det-marginal-prob.o det-marginal-prob.c
gcc -O2          -DOPTIONS    -c -o read-sequence.o read-sequence.c
gcc -O2          -DOPTIONS    -c -o process-sequence.o process-sequence.c
gcc -O2          -DOPTIONS    -c -o heap.o heap.c
gcc -O2          -DOPTIONS    -c -o alloc-error.o alloc-error.c
gcc -O2          -o patser-v3e options.o main.o command-line.o parse-line.o parse-line-help.o text-directions.o alpha.o process-matrix.o read-matrix.o det-marginal-prob.o read-sequence.o process-sequence.o heap.o alloc-error.o -lm
ADD COMMENT

Login before adding your answer.

Traffic: 2235 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6