help > I need help with building latest MRIcroGL with lazarus 2.0.10
Showing 1-8 of 8 posts
Nov 4, 2020 10:11 AM | sujan dasmahapatra
I need help with building latest MRIcroGL with lazarus 2.0.10
I need help to build latest MRIcroGL 1.2, I am building it with
lazarus IDE version 2.0.10, I followed all instructions as metal
demos installation and python4lazarus package etc, but it is
throwing errors below.
mainunit.pas(1583,28) Error: identifier idents no member "PyInt_FromLong"
The same kind of total 8 errors I am getting for PyString_FromString etc.
Please help me what I am missing here. Do I need to install python? I already have it installed version 3.5.0 and I am using 64 bits compiler.
Any help is highly appreciated.
mainunit.pas(1583,28) Error: identifier idents no member "PyInt_FromLong"
The same kind of total 8 errors I am getting for PyString_FromString etc.
Please help me what I am missing here. Do I need to install python? I already have it installed version 3.5.0 and I am using 64 bits compiler.
Any help is highly appreciated.
Nov 4, 2020 01:11 PM | Chris Rorden
RE: I need help with building latest MRIcroGL with lazarus 2.0.10
1. Are you trying to build on Windows, Linux or MacOS?
2. If you select to the Projects/ProjectOptions menu item and remove "-dMYPY" from the "Custom Options" does the project compile (albeit without Python).
3. Did you recompile Lazarus using the latest version of the Python-for-Lazarus package (Using the Package/OpenPackageFile menu item):
https://github.com/Alexey-T/Python-for-Lazarus
Do the examples from that repository compile and run correctly?
2. If you select to the Projects/ProjectOptions menu item and remove "-dMYPY" from the "Custom Options" does the project compile (albeit without Python).
3. Did you recompile Lazarus using the latest version of the Python-for-Lazarus package (Using the Package/OpenPackageFile menu item):
https://github.com/Alexey-T/Python-for-Lazarus
Do the examples from that repository compile and run correctly?
Nov 5, 2020 04:11 AM | sujan dasmahapatra
RE: I need help with building latest MRIcroGL with lazarus 2.0.10
Originally posted by Chris Rorden:
I am building for Windows Chris. With project option removing -dMYPY I am getting another set of new errors.
MRIcroGL.lpr(36,1) Error: Can't open object file: ..\static\x86_64-win64\sse\inffast.o
Like this a number of 9 errors like this.
I have built lazarus with Python-for-Lazarus package with this following option.
./lazbuild.exe --build-ide= --add-package lazopenglcontext ../Python-for-Lazarus/python4lazarus/python4lazarus_package.lpk
Please help me to resolve this.
1. Are you trying to build on Windows, Linux or
MacOS?
2. If you select to the Projects/ProjectOptions menu item and remove "-dMYPY" from the "Custom Options" does the project compile (albeit without Python).
3. Did you recompile Lazarus using the latest version of the Python-for-Lazarus package (Using the Package/OpenPackageFile menu item):
https://github.com/Alexey-T/Python-for-Lazarus
Do the examples from that repository compile and run correctly?
2. If you select to the Projects/ProjectOptions menu item and remove "-dMYPY" from the "Custom Options" does the project compile (albeit without Python).
3. Did you recompile Lazarus using the latest version of the Python-for-Lazarus package (Using the Package/OpenPackageFile menu item):
https://github.com/Alexey-T/Python-for-Lazarus
Do the examples from that repository compile and run correctly?
I am building for Windows Chris. With project option removing -dMYPY I am getting another set of new errors.
MRIcroGL.lpr(36,1) Error: Can't open object file: ..\static\x86_64-win64\sse\inffast.o
Like this a number of 9 errors like this.
I have built lazarus with Python-for-Lazarus package with this following option.
./lazbuild.exe --build-ide= --add-package lazopenglcontext ../Python-for-Lazarus/python4lazarus/python4lazarus_package.lpk
Please help me to resolve this.
Nov 5, 2020 09:11 AM | sujan dasmahapatra
RE: I need help with building latest MRIcroGL with lazarus 2.0.10
MRIcroGL.lpr(36,1) Error: Can't open object file:
..\static\x86_64-win64\sse\inffast.o
Like this 9 object errors are coming Chris. Please help me to fix this issues.
Like this 9 object errors are coming Chris. Please help me to fix this issues.
Nov 5, 2020 12:11 PM | Chris Rorden
RE: I need help with building latest MRIcroGL with lazarus 2.0.10
As noted on the comments where the code failed, when compiling for
Windows you have two options:
1. Edit the file "opts.inc" and remove the line:
{$DEFINE FASTGZ}
The executable will compile and be fully functional, but loading and saving of GZ compressed files will be a bit slower.
2. Download the files from https://github.com/synopse/mORMot and place the 'static' folder in the requested location. In other words, if you have c:\MRIcroGL12\MRIcroGL.lpr you will want a folder c:\static\x86_64-win64\sse\
The executable will compile and be fully functional, loading and saving of GZ compressed files will be accelerated. The included code uses the GPL, so your resulting executable can no longer be shared/sold under the more permissive BSD license.
1. Edit the file "opts.inc" and remove the line:
{$DEFINE FASTGZ}
The executable will compile and be fully functional, but loading and saving of GZ compressed files will be a bit slower.
2. Download the files from https://github.com/synopse/mORMot and place the 'static' folder in the requested location. In other words, if you have c:\MRIcroGL12\MRIcroGL.lpr you will want a folder c:\static\x86_64-win64\sse\
The executable will compile and be fully functional, loading and saving of GZ compressed files will be accelerated. The included code uses the GPL, so your resulting executable can no longer be shared/sold under the more permissive BSD license.
Nov 5, 2020 08:11 PM | sujan dasmahapatra
RE: I need help with building latest MRIcroGL with lazarus 2.0.10
Okies, Chris. Thanks a lot for the suggestion. I will notify
shortly about the result.
Nov 6, 2020 02:11 AM | sujan dasmahapatra
RE: I need help with building latest MRIcroGL with lazarus 2.0.10
It's building now Dear Chris and also running. But, No data file is
being loaded, I think it is because of disabling python or opengl,
no viewer is coming... which flavour of the version will work with
it? please let me know a link of your version, the one that you
built successfully..,It shows access violation due to disabling
python and static folder changes. What can be done please suggest.
Kindly see the image of the error I am getting while loading a data
file.
Nov 6, 2020 03:11 PM | Chris Rorden
RE: I need help with building latest MRIcroGL with lazarus 2.0.10
Hmm, I can not replicate your issue. I wonder if this is because
the latest SSE code uses new features of the compiler. What happens
if you delete line 18 of nifti.pas:
{$DEFINE SSE}
and recompile. This will provide full functionality, but will not use the faster rescaling.
Please confirm that your computer works fine with the compiled version here (v1.2.20201102):
https://github.com/rordenlab/MRIcroGL12/releases
If so, you may need to simply wait for the next stable Lazarus/FPC upgrade, or move your development to trunk. Working with Gareth Moreton, the latest code leverages advances CPU features and also compiles on the upcoming Apple ARM-based Macs. These cutting edge features may make it hard to compile with the current versions of the compiler and IDE. However, they do provide a profound benefit for the users, with many of these functions becoming memory rather than CPU bound.
{$DEFINE SSE}
and recompile. This will provide full functionality, but will not use the faster rescaling.
Please confirm that your computer works fine with the compiled version here (v1.2.20201102):
https://github.com/rordenlab/MRIcroGL12/releases
If so, you may need to simply wait for the next stable Lazarus/FPC upgrade, or move your development to trunk. Working with Gareth Moreton, the latest code leverages advances CPU features and also compiles on the upcoming Apple ARM-based Macs. These cutting edge features may make it hard to compile with the current versions of the compiler and IDE. However, they do provide a profound benefit for the users, with many of these functions becoming memory rather than CPU bound.