install on windows using MinGW

143 views
Skip to first unread message

Jeff

unread,
Mar 7, 2008, 3:54:58 PM3/7/08
to pygraphviz-discuss
Has anyone been able to do this?

The compile is going ok, but the linking is not. I'm getting lots of
warnings and undefined references. Here's an elided sample of the
output:

...
building 'pygraphviz._graphviz' extension
writing build\temp.win32-2.5\Release\pygraphviz\_graphviz.def
C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build
\temp.win32-2.5\Release\pygraph
viz\graphviz_wrap.o build\temp.win32-2.5\Release\pygraphviz
\_graphviz.def -LC:\G
raphviz2.16\lib -LC:\python25\libs -LC:\python25\PCBuild -RC:
\Graphviz2.16\lib -
lagraph -lcdt -lpython25 -lmsvcr71 -o build\lib.win32-2.5\pygraphviz
\_graphviz.p
yd
gcc: unrecognized option `-RC:\Graphviz2.16\lib'
Warning: .drectve `/manifestdependency:"type='win32'
name='Microsoft.VC80.CRT' v
ersion='8.0.50608.0' processorArchitecture='x86'
publicKeyToken='1fc8b3b9a1e18e3
b'" /DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
...
C:\Graphviz2.16\lib/libagraph.a(graph.o):(.text+0x187): undefined
reference to `
_imp__Dttree'
...

I feel like I'm close, but I don't understand the warning and I don't
know where to find the undefined references. I hope someone can help.

wcyee

unread,
Mar 16, 2008, 12:56:41 AM3/16/08
to pygraphviz-discuss
Hi - I'm not sure I can figure out what's wrong with your build. I did
manage to get the build process to succeed. I made the following
changes to setup.py:

library_path='C:\\apps\\GraphViz\\bin'
include_path='C:\\apps\\GraphViz\\include\\graphviz'

and in line 148:

runtime_library_dirs=None,

Perhaps try setting your library path to <graphviz>/bin instead of
<graphviz>/lib? I think mingw can figure out how to link with the DLLs
and doesn't need the *.lib files. I'm pasting the entire output from
my build in case it helps in any way:

$ python setup.py build -c mingw32
library_path=C:\apps\GraphViz\bin
include_path=C:\apps\GraphViz\include\graphviz
running build
running build_py
creating build
creating build\lib.win32-2.5
creating build\lib.win32-2.5\pygraphviz
copying pygraphviz\agraph.py -> build\lib.win32-2.5\pygraphviz
copying pygraphviz\graphviz.py -> build\lib.win32-2.5\pygraphviz
copying pygraphviz\release.py -> build\lib.win32-2.5\pygraphviz
copying pygraphviz\__init__.py -> build\lib.win32-2.5\pygraphviz
creating build\lib.win32-2.5\pygraphviz\tests
copying pygraphviz\tests\test.py -> build\lib.win32-2.5\pygraphviz
\tests
copying pygraphviz\tests\__init__.py -> build\lib.win32-2.5\pygraphviz
\tests
copying pygraphviz\tests\attributes.txt -> build
\lib.win32-2.5\pygraphviz\tests
copying pygraphviz\tests\graph.txt -> build\lib.win32-2.5\pygraphviz
\tests
copying pygraphviz\tests\layout_draw.txt -> build
\lib.win32-2.5\pygraphviz\tests
running build_ext
building 'pygraphviz._graphviz' extension
creating build\temp.win32-2.5
creating build\temp.win32-2.5\Release
creating build\temp.win32-2.5\Release\pygraphviz
c:\devtools\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\apps
\GraphViz\include\graphviz -Ic:\devtools\Python25\include -Ic:\devtools
\Python25\PC -c pygraphviz/graphviz_wrap.c -o build
\temp.win32-2.5\Release\pygraphviz\graphviz_wrap.o
writing build\temp.win32-2.5\Release\pygraphviz\_graphviz.def
c:\devtools\MinGW\bin\gcc.exe -mno-cygwin -shared -s build
\temp.win32-2.5\Release\pygraphviz\graphviz_wrap.o build
\temp.win32-2.5\Release\pygraphviz\_graphviz.def -LC:\apps\GraphViz
\bin -Lc:\devtools\Python25\libs -Lc:\devtools\Python25\PCbuild -
lagraph-4 -lcdt-4 -lpython25 -lmsvcr71 -o build
\lib.win32-2.5\pygraphviz\_graphviz.pyd
Info: resolving _Agdirected by linking to __imp__Agdirected (auto-
import)
Info: resolving _Agstrictdirected by linking to
__imp__Agstrictdirected (auto-import)
Info: resolving _Agundirected by linking to __imp__Agundirected (auto-
import)
Info: resolving _Agstrictundirected by linking to
__imp__Agstrictundirected (auto-import)



Reply all
Reply to author
Forward
0 new messages