Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling under windows 32/64 with mingw64-static ? #4

Closed
stonebig opened this issue Jan 11, 2015 · 17 comments
Closed

compiling under windows 32/64 with mingw64-static ? #4

stonebig opened this issue Jan 11, 2015 · 17 comments

Comments

@stonebig
Copy link

Hi,

I would like to install (compile) gr with the mingw64 static compiler from Carl Kleffner (carlkl)
(https://bitbucket.org/carlkl/mingw-w64-for-python/downloads)

Do you think it is possible ? (I'm not expert at all in compiling outside of %cython, so I have no clue)

@stonebig stonebig changed the title compiling under windows 34/64 with mingw64-static ? compiling under windows 32/64 with mingw64-static ? Jan 11, 2015
@jheinen
Copy link
Collaborator

jheinen commented Jan 12, 2015

This should be no problem. I'm currently out of office and will check that next week.

@jheinen
Copy link
Collaborator

jheinen commented Jan 21, 2015

FYI: I started creating makefiles for the MinGW compiler - GKS already working fine.I ask for patience ...

@stonebig
Copy link
Author

no problem.

@stonebig
Copy link
Author

stonebig commented Mar 9, 2015

I drop the request (with a success), as gr is now available via Christoph Gohlke.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#gr

@stonebig stonebig closed this as completed Mar 9, 2015
@stonebig
Copy link
Author

stonebig commented Mar 9, 2015

on my PC (i3-350), I have the following speed-up for http://gr-framework.org/examples/anim.html

fps (mpl): 12
fps (GR): 122
speedup: 10.2

@stonebig
Copy link
Author

stonebig commented Mar 9, 2015

next try is not promising:
http://gr-framework.org/examples/double_pendulum3.html

Traceback (most recent call last):
  File "D:\WinPython\basedir34\buildFlavorRfull\winpython-3.4.3.amd64\settings\.spyder2-py3\temp.py", line 87, in <module>
    double_pendulum([t1, t2], [l1, l2], [m1, m2])
  File "D:\WinPython\basedir34\buildFlavorRfull\winpython-3.4.3.amd64\settings\.spyder2-py3\temp.py", line 57, in double_pendulum
    gr3.drawimage(0, 1, 0, 1, 500, 500, gr3.GR3_Drawable.GR3_DRAWABLE_GKS)
  File "D:\WinPython\basedir34\buildFlavorRfull\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\gr3\__init__.py", line 195, in drawimage
    c_int(pixel_width), c_int(pixel_height), c_int(window))
OSError: exception: access violation writing 0x0000000000000000

@stonebig
Copy link
Author

stonebig commented Mar 9, 2015

example is not valid python 3 syntax
http://gr-framework.org/examples/figanim.html

@stonebig
Copy link
Author

stonebig commented Mar 9, 2015

@jheinen
Copy link
Collaborator

jheinen commented Mar 9, 2015

Q: next try is not promising: http://gr-framework.org/examples/double_pendulum3.html
A: I will check this.

Q: example is not valid python 3 syntax: http://gr-framework.org/examples/figanim.html
A: Has just been fixed in the master branch.

Q: http://gr-framework.org/examples/pyqt4_ex.html gives error ...
A: The GR bdist was not built with Qt. Possible reason: missing Qt SDK or QTDIR specification.

@jheinen jheinen reopened this Mar 10, 2015
@jheinen
Copy link
Collaborator

jheinen commented Mar 10, 2015

For the impatient user - here you can download a portable Windows GR application (including Python 2.7, Qt 4.8.5, wxWidgets 2.9.4, GhostScript 9.06):

http://pgi-jcns.fz-juelich.de/pub/Downloads/gr-0.10.0-win32.zip

You simply have to change the path in gr/gr.bat, e.g.

set GRDIR=C:\gr

@stonebig
Copy link
Author

apparently qtplugin.dll is not shipped with Gohlke's http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4
I don't guess how it should comes down to my installation

@stonebig
Copy link
Author

figanim ok now on Python3.4 windows... printing dots

.................................................fps (mpl):    4
.................................................fps  (GR):  826
  speedup:  206.5

@stonebig
Copy link
Author

http://gr-framework.org/examples/pendulum.html

is creating the image but also this output on spyder internal console (not sure if it is to expect, suspect a python3+windows compatibility issue):

    self.shell.write_error(self.get_stderr())
  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\spyderlib\widgets\shell.py", line 557, in write_error
    self.flush()
  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\spyderlib\widgets\shell.py", line 581, in flush
    text = "".join(self.__buffer)
TypeError: sequence item 0: expected str instance, bytes found
Traceback (most recent call last):
  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\spyderlib\widgets\externalshell\pythonshell.py", line 551, in finished
    ExternalShellBase.finished(self, exit_code, exit_status)
  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\spyderlib\widgets\externalshell\baseshell.py", line 254, in finished
    self.shell.flush()
  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\spyderlib\widgets\shell.py", line 581, in flush
    text = "".join(self.__buffer)
TypeError: sequence item 0: expected str instance, bytes found

@stonebig
Copy link
Author

my system doesn't understand the exec input line in http://gr-framework.org/examples/qtgrdemo.html

    @QtCore.pyqtSlot()
    def _shellEx(self):
        input = str(self._shell.text())
        exec input
        self._shell.clear()
        self._gr.update()
`  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\settings\.spyder2-py3\temp.py", line 224
    exec input
             ^
SyntaxError: Missing parentheses in call to 'exec'

@stonebig
Copy link
Author

this example fails http://gr-framework.org/examples/textonaxes.html
(suspect a python 3.4 enforced rule issue)

Traceback (most recent call last):
  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\settings\.spyder2-py3\temp.py", line 26, in <module>
    axes = PlotAxes(plt.viewport).addCurves(curve)
  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\gr\pygr\__init__.py", line 1206, in __init__
    self.majorx, self.majory = majorx, majory
  File "D:\WinPython\basedir34\build\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\gr\pygr\__init__.py", line 1262, in majorx
    self._majorx = minorCount if minorCount > 0 or minorCount is None else 1
TypeError: unorderable types: NoneType() > int()

@stonebig
Copy link
Author

there are wheels for "gr" from Christoph Gohlke, so the original issue is droped.
I'll open separate issues for the other remarks, after redoing tests.

@stonebig
Copy link
Author

textonaxes now works for python3.4

jheinen pushed a commit that referenced this issue Dec 11, 2017
`uintptr_t` is only defined in `stdint.h` which is a extension of the
C99 standard. Instead a `ptrdiff_t` can be used. Fixes #4.
jheinen pushed a commit that referenced this issue Dec 11, 2017
Replaced `uintptr_t` with `ptrdiff_t` to stay C89 compatible

Closes #4

See merge request Scientific-IT-Systems/gr!13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants