Note that there are some explanatory texts on larger screens.

plurals
  1. POC program compiling error
    primarykey
    data
    text
    <p>I am trying to compile and install a program created in 1997. I am using gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50) and CentOS release 5.5 (Final). While trying to do a 'make' command while in the SOURCE directory of the program, I get the following error:</p> <pre><code>gcc -g -w -I/home/shahw/opinionfinder/software/scol1k/objs -I. -DDEBUG -DUNIX dump.c -L/home/shahw/opinionfinder/software/scol1k/objs -lscol -lm -o dump gcc -g -w -I/home/shahw/opinionfinder/software/scol1k/objs -I. -DDEBUG -DUNIX ngram.c -L/home/shahw/opinionfinder/software/scol1k/objs -lscol -lm -o ngram gcc -g -w -I/home/shahw/opinionfinder/software/scol1k/objs -I. -DDEBUG -DUNIX reg.c -L/home/shahw/opinionfinder/software/scol1k/objs -lscol -lm -o reg gcc -g -w -I/home/shahw/opinionfinder/software/scol1k/objs -I. -DDEBUG -DUNIX select.c -L/home/shahw/opinionfinder/software/scol1k/objs -lscol -lm -o select select.c: In function ‘select_lines’: select.c:84: error: invalid lvalue in increment make[1]: *** [select] Error 1 make[1]: Leaving directory `/home/shahw/opinionfinder/software/scol1k/tools' make: *** [modules] Error 2 </code></pre> <p>After initially considering this a c-code error, I tried to compile this on a Mac OSX 10.6.7 with i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664). This time I got an error a step after the original error implying that there is definitely an incompatibility with the gcc version in play. This time the error was:</p> <pre><code>gcc -g -w -I/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -I. -DDEBUG -DUNIX dump.c -L/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -lscol -lm -o dump gcc -g -w -I/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -I. -DDEBUG -DUNIX ngram.c -L/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -lscol -lm -o ngram gcc -g -w -I/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -I. -DDEBUG -DUNIX reg.c -L/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -lscol -lm -o reg gcc -g -w -I/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -I. -DDEBUG -DUNIX select.c -L/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -lscol -lm -o select gcc -g -w -I/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -I. -DDEBUG -DUNIX sents.c -L/Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs -lscol -lm -o sents ld: duplicate symbol _Bos in /Users/shahjahanwarraich/Desktop/opinionfinderv1.5/software/scol1k/objs/libscol.a(cass.o) and /var/folders/F5/F5WuhlFlHcetJlreJ+GlMk+++TI/-Tmp-//ccjhIM0Y.o collect2: ld returned 1 exit status make[1]: *** [sents] Error 1 make: *** [modules] Error 2 </code></pre> <p>C programming and makefiles are completely alien to me so I really have no clue where to start. I can also provide any other information that will help in debugging this issue. </p> <p>select_lines method defined in select.c is as follows:</p> <pre><code>select_lines (int type, void *lines, int n, FILE *infile, FILE *outfile) { char line[1024]; int i, current = 0, target; struct entry *e; LinesA = make_aarray(SelectAlloc, sizeof(struct entry)); /** Scan in the lines **/ switch (type) { case LINESFILE: while (scan_int(target, lines) != EOF) { new_line(target); } break; case LINESLIST: for (; n &gt; 0; n--) { target = *((int *)lines)++; new_line(target); } break; case LINESRANGE: for (target = ((int *)lines)[0]; target &lt;= ((int *)lines)[1]; target++) { new_line(target); } break; default: error("select_lines: Bad type"); } Lines = (struct entry *) LinesA-&gt;contents; /** Sort by txt sequence **/ qsort(Lines, NLines, sizeof(struct entry), txtcmp); /** Extract lines **/ current = -1; for (i = 0; i &lt; NLines; i++) { target = Lines[i].txt; if (target &lt; current) error("sort failed"); if (current &lt; target) { /* careful: it's possible to select the same line twice */ while (++current &lt; target) { skip_line(infile); } if (scan_line(line, 1024, infile) == EOF) { fprintf(stderr, "Premature end of text file"); exit(1); } } Lines[i].line = copy_string(line); } /** Resort by smp sequence **/ qsort(Lines, NLines, sizeof(struct entry), smpcmp); /** Output **/ for (i = 0; i &lt; NLines; i++) { fprintf(outfile, "%s\n", Lines[i].line); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload