COIN-OR::LEMON - Graph Library

Opened 14 years ago

Closed 14 years ago

#337 closed defect (fixed)

LEMON doen't compile with glpk-4.42

Reported by: Alpar Juttner Owned by: Balazs Dezso
Priority: critical Milestone: LEMON 1.2 release
Component: core Version: hg main
Keywords: Cc:
Revision id: f903263902f6

Description

The title says everything.

Here is the related part of the build output.

	g++ -DHAVE_CONFIG_H   -I. -I.  -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas -ggdb -Werror -MT tools/dimacs-solver.o -MD -MP -MF $depbase.Tpo -c -o tools/dimacs-solver.o tools/dimacs-solver.cc &&\
	mv -f $depbase.Tpo $depbase.Po
In file included from lemon/glpk.cc:23:
/home/alpar/projects/LEMON/local/include/glpk.h:40: error: conflicting declaration ‘typedef struct glp_prob glp_prob’
./lemon/glpk.h:32: error: ‘glp_prob’ has a previous declaration as ‘typedef struct glp_prob glp_prob’
make[2]: *** [lemon/lemon_libemon_la-glpk.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/alpar/projects/LEMON/hg/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alpar/projects/LEMON/hg/main'
make: *** [all] Error 2

Attachments (2)

5ac08ebddf94.patch (851 bytes) - added by Balazs Dezso 14 years ago.
fix-337.bundle (5.1 KB) - added by Balazs Dezso 14 years ago.
Other solution

Download all attachments as: .zip

Change History (7)

comment:1 Changed 14 years ago by Alpar Juttner

Here you can find a mercurial repo containing all version of glpk from 4.7 upward:

http://lime.cs.elte.hu/~alpar/hg/hgwebdir.cgi/glpk/

It might be helpful to identify from which version of glpk is incompatible with the current trunk of lemon.

Changed 14 years ago by Balazs Dezso

Attachment: 5ac08ebddf94.patch added

comment:2 Changed 14 years ago by Balazs Dezso

The patch [5ac08ebddf94] resolves the issue.

comment:3 in reply to:  2 Changed 14 years ago by Alpar Juttner

Replying to deba:

The patch [5ac08ebddf94] resolves the issue.

I've tested it with glpk-4.42, but alas it still doesn't work.

Changed 14 years ago by Balazs Dezso

Attachment: fix-337.bundle added

Other solution

comment:4 Changed 14 years ago by Balazs Dezso

Status: newassigned

I have uploaded the fix-337.bundle. Unfortunately, it is impossible to use normal forward declaration in glpk.h, because GLPK uses unnamed struct for glp_prob.

Currently, I use "void* like" object to store the glp_prob in glpk.h. It is type unsafe (it emulates the C behaviour of void* pointers), therefore it can be used anywhere as a replacement of the old pointer.

comment:5 in reply to:  4 Changed 14 years ago by Alpar Juttner

Resolution: fixed
Status: assignedclosed

Replying to deba:

I have uploaded the fix-337.bundle. Unfortunately, it is impossible to use normal forward declaration in glpk.h, because GLPK uses unnamed struct for glp_prob.

Thanks, it has been merged to both branches, see [5100072d83ca].

Note: See TracTickets for help on using tickets.