Compiling error on Mac OS X with macports

Bug #1132289 reported by Jiang Bian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
igraph
Fix Committed
Low
Gábor Csárdi

Bug Description

Trying to compile the source in trunk, but getting the errors.
Thought it's related to bison, but can't find out why... I do have bison 2.7 installed... The config.log is attached as well.
Basically, I did:

./bootstrap.sh

./configure --prefix=/opt/local

./boostrap.sh

make

I have no issue compiling the snapshot version from google code igraph-nightly-0.7-3121-20130217.tar.gz

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I/opt/local/include/libxml2 -I../include -I../include -Wall -I../optional/glpk -g -O2 -I/opt/local/include/libxml2 -MT libigraph_la-foreign-ncol-parser.lo -MD -MP -MF .deps/libigraph_la-foreign-ncol-parser.Tpo -c foreign-ncol-parser.c -fno-common -DPIC -o .libs/libigraph_la-foreign-ncol-parser.o
foreign-ncol-parser.c: In function 'igraph_ncol_yyparse':
foreign-ncol-parser.c:1648:9: warning: passing argument 3 of 'igraph_ncol_yyerror' discards 'const' qualifier from pointer target type [enabled by default]
         yyerror (&yylloc, context, yymsgp);
         ^
foreign-ncol-parser.y:63:5: note: expected 'char *' but argument is of type 'const char *'
 int igraph_ncol_yyerror(YYLTYPE* locp,
     ^
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I/opt/local/include/libxml2 -I../include -I../include -Wall -I../optional/glpk -g -O2 -I/opt/local/include/libxml2 -MT libigraph_la-foreign-ncol-parser.lo -MD -MP -MF .deps/libigraph_la-foreign-ncol-parser.Tpo -c foreign-ncol-parser.c -o libigraph_la-foreign-ncol-parser.o >/dev/null 2>&1
mv -f .deps/libigraph_la-foreign-ncol-parser.Tpo .deps/libigraph_la-foreign-ncol-parser.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I/opt/local/include/libxml2 -I../include -I../include -Wall -I../optional/glpk -g -O2 -I/opt/local/include/libxml2 -MT libigraph_la-foreign-ncol-lexer.lo -MD -MP -MF .deps/libigraph_la-foreign-ncol-lexer.Tpo -c -o libigraph_la-foreign-ncol-lexer.lo `test -f 'foreign-ncol-lexer.c' || echo './'`foreign-ncol-lexer.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I/opt/local/include/libxml2 -I../include -I../include -Wall -I../optional/glpk -g -O2 -I/opt/local/include/libxml2 -MT libigraph_la-foreign-ncol-lexer.lo -MD -MP -MF .deps/libigraph_la-foreign-ncol-lexer.Tpo -c foreign-ncol-lexer.c -fno-common -DPIC -o .libs/libigraph_la-foreign-ncol-lexer.o
In file included from foreign-ncol-lexer.l:49:0:
foreign-ncol-parser.h:99:26: error: unknown type name 'igraph_i_ncol_parsedata_t'
 int igraph_ncol_yyparse (igraph_i_ncol_parsedata_t* context);
                          ^
make[3]: *** [libigraph_la-foreign-ncol-lexer.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Related branches

Revision history for this message
Jiang Bian (jbian) wrote :
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

Hmmm, what is your bison version?

Revision history for this message
Tamás Nepusz (ntamas) wrote :

OP said it's bison 2.7. I have bison 2.3 on my Mac and it works with that.

Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

Right, sorry, I did not find it in config.log and missed it in the email. I have 2.3, too, btw.

Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

OK, I can reproduce this with bison 2.7, so I'll be able to fix it, probably. FYI.

Changed in igraph:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Gábor Csárdi (gabor.csardi)
milestone: none → 0.7
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

Fixed it in #3132 (0.7-main).

Changed in igraph:
status: Confirmed → Fix Committed
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote : Continue on github

The development of igraph has moved to github, so please do not comment on this bug here. You are of course welcome to comment on github, here:
https://github.com/igraph/igraph/issues/304

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.