compilation fail: duplicate listing of header files in src/Makefile.am & missing backslash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
igraph |
Fix Released
|
High
|
Gábor Csárdi |
Bug Description
Affecting revision: 2309
Checkout trunk of igraph 0.6 and run the following commands:
$ autoreconf --install
$ ./configure --prefix=
$ make && make install
Create a C source file named demo.c with the following content:
<quote>
#include <igraph.h>
int main(void) {
return 0;
}
</quote>
Now compile the above program as follows:
$ gcc demo.c -I/tmp/
In file included from demo.c:1:
/tmp/igraphusr/
compilation terminated.
The problem can be traced to the file src/Makefile.am, specifically the following section:
HEADERS_PUBLIC =../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
../include/
Notice that there should be a backslash after "../include/
$ autoreconf --install
$ ./configure --prefix=
$ make && make install
will result in an installation error such as
/usr/bin/install: will not overwrite just-created `/home/
make[3]: *** [install-
make[3]: Leaving directory `/home/
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/
make: *** [install-recursive] Error 1
This is because some header files are listed more than once in the above "HEADERS_PUBLIC" section, in particular the following files are listed twice:
* igraph_adjlist.h
* igraph_progress.h
* igraph_statusbar.h
See the attached patch for a solution.
Thanks! Fixed in revision #2311 (0.6-main).