Найти - Пользователи
Полная версия: Помогите собрать dll
Начало » Python для новичков » Помогите собрать dll
1
Tavork
Помогите мне собрать dll симулятора NanoEngineer в Windows.
Исходный код по ссылке http://file.qip.ru/file/CFDnnAsH/sim.html
В описании для сборки написано:
"Build notes for NanoDynamics-1, the molecular dynamics simulator for NanoEngineer-1.
Python module Pyrex.Distutils is required by makehelp.py .
On the Mac, make sure the os.environ = line in Pyrex-0.9.6.4/Pyrex/Mac/DarwinSystem.py is set to match your Mac OS level. Panther = “10.3”, Tiger = “10.4”, and Leopard =“10.5”. See the Apple Menu, “About This Mac” if you aren't sure.
cd Pyrex-0.9.6.4
python setup.py build
sudo python setup.py install
Build the simulator:
cd sim/src
make
Then, on Linux or the Mac,
make install-linux
Or on Windows, just
make install"
Pyrex установил, но при запуске получаю ошибки:
C:\Program Files\Nanorex\program\NanoEngineer-1 v1.1.1.14\source\sim\src>make install
MAKE Version 5.4 Copyright (c) 1987, 2009 CodeGear
Error makefile 17: Command syntax error
Error makefile 36: Command syntax error
Error makefile 45: Command syntax error
Error makefile 51: Command syntax error
Error makefile 58: Command syntax error
Error makefile 67: Command syntax error
Error makefile 95: Command syntax error
Error makefile 97: Command syntax error
Error makefile 108: Command syntax error
Error makefile 111: Command syntax error
Error makefile 113: Command syntax error
Error makefile 115: Command syntax error
Error makefile 144: Command syntax error
Error makefile 155: Command syntax error
Error makefile 162: Too many rules for target 'sim.c'
Error makefile 165: Command syntax error
*** 16 errors during make ***
Помогите понять в чем ошибка?
Tavork
Может кто направление поиска подскажет?
nerijus
Tavork
Может кто направление поиска подскажет?
Установи mingw для начала.
Tavork
Mingw установил и еще кучу программ, требуемых для сборки самого nanoengineer: http://nanoengineer-1.net/mediawiki/index.php?title=Building_NanoEngineer-1_on_Windows

Сама программа из исходников запускается, все работает, симулятор тоже, но мне нужно чуть чуть поправить сам симулятор, т.е. dll из поста выше
nerijus
Но ты видишь что компилируешь не с mingw а с дерьмом от codegear (посмотри следующую строку после make install)?
Tavork
nerijus
Но ты видишь что компилируешь не с mingw а с дерьмом от codegear (посмотри следующую строку после make install)?
Спасибо, не знал. Надо как-то так mingw32-make install? Опять ошибки, но уже что-то. Почему то не может создать процесс..

C:\Program Files\Nanorex\program\NanoEngineer-1 v1.1.1.14\source\sim\src>mingw32
-make install
process_begin: CreateProcess((null), uname, ...) failed.
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o allocate.o allocate.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o amber_patterns.o amber_patterns.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o dynamics.o dynamics.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o globals.o globals.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o hashtable.o hashtable.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o interpolate.o interpolate.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o jigs.o jigs.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o lin-alg.o lin-alg.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o minimize.o minimize.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o minstructure.o minstructure.c
python stretch.py stretch.parms > bonds.gen
python bend.py bending.parms > bends.gen
"C:/MinGW/bin/gcc.exe" -o newtables.o -c -g newtables.c
newtables.c: In function `parseBendName':
newtables.c:133: warning: assignment makes pointer from integer without a cast
newtables.c:141: warning: assignment makes pointer from integer without a cast
newtables.c:153: warning: assignment makes pointer from integer without a cast
newtables.c:159: warning: assignment makes pointer from integer without a cast
newtables.c:167: warning: assignment makes pointer from integer without a cast
newtables.c:182: warning: assignment makes pointer from integer without a cast
newtables.c:194: warning: assignment makes pointer from integer without a cast
newtables.c:205: warning: assignment makes pointer from integer without a cast
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o part.o part.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o pam5_patterns.o pam5_patterns.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o pattern.o pattern.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o potential.o potential.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o printers.o printers.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o printGromacsTopology.o printGromacsTop
ology.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o read_amber_itp.o read_amber_itp.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o readmmp.o readmmp.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o readxyz.o readxyz.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o rigid.o rigid.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o rigid-ode.o rigid-ode.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include"
-I"C:/Python24/include" -Disnan=_isnan -o structcompare.o structcompare.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o writemovie.o writemovie.c
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o strtok_r.o strtok_r.c
python makehelp.py "-g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -I"C:/P
ython24/include" -Disnan=_isnan " "-L"C:/MinGW/lib" -L"C:/ode-win32-0.7/lib/rele
asedll" " " Microsoft Windows [Version 6.1.7600]" \
| grep -v "^running " > version.h
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o simulator.o simulator.c
In file included from simulator.c:4:
version.h:1: error: syntax error before "STDIN"
mingw32-make: *** [simulator.o] Error 1
nerijus
Короче делай так: качай и устанавливай еще msys, и тогда уже собирай из под msys (возможно кое какие пути будет нужно поправить, но шансов что нормально скомпилируешь побольше).
Tavork
Поставил и запустил msys, скопировал исходники в папку home и запустил make. Ошибок еще меньше, только что-то ему не нравится version.h.
Может еще что надо поставить?
$ cd /home/sim/src
House@CENTER /home/sim/src
$ make
"C:/MinGW/bin/gcc.exe" -c -g -I"C:/MinGW/include" -I"C:/ode-win32-0.7/include" -
I"C:/Python24/include" -Disnan=_isnan -o simulator.o simulator.c
In file included from simulator.c:4:
version.h:1: error: syntax error before "STDIN"
make: *** [simulator.o] Error 1
nerijus
Посмотрел поглубже, во первых ты говорил что тебе нужна библиотека. Это значит что нужно делать:

make clean
make pyx

(читай readme) и никакой ошибки с version.h не получишь. Во вторых, там используется очень старая версия numpy (numeric) которой у меня нет, и которую искать (или переделывать под новую) лень. Я в этом месте получил ошибку. Здесь уже копай сам, если будет вообще туго, спрашивай, когда будет побольше времени, возможно посмотрю.
Tavork
Ура! Спасибо огромное за помощь, все сработало. Теперь можно править, а numpy у меня нужный стоит из их списка http://nanoengineer-1.net/mediawiki/index.php?title=Building_NanoEngineer-1_on_Windows
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB