blitzpp / blitz

Blitz++ Multi-Dimensional Array Library for C++
https://github.com/blitzpp/blitz/wiki
Other
405 stars 84 forks source link

Convert build code to Python3 #144

Closed mehrdad19 closed 5 years ago

mehrdad19 commented 5 years ago

Hello,

I tried installing Blitz on Ubuntu 18.04 using spack. The problem is that it crashes. I think it uses Python 2 and I have Anaconda and by default, my system uses Python 3. How shall I proceed?

Error:

==> Installing blitz ==> Searching for binary cache of blitz ==> Warning: No Spack mirrors are currently configured ==> No binary for blitz found: installing from source ==> Using cached archive: /home/mehrdad/spack/var/spack/cache/blitz/blitz-1.0.1.tar.gz ==> Staging archive: /home/mehrdad/spack/var/spack/stage/blitz-1.0.1-ygzugsujglfbuugxrmyhewbuv6ythbbz/1.0.1.tar.gz ==> Created stage in /home/mehrdad/spack/var/spack/stage/blitz-1.0.1-ygzugsujglfbuugxrmyhewbuv6ythbbz ==> No patches needed for blitz ==> Building blitz [AutotoolsPackage] ==> Executing phase: 'autoreconf' ==> Executing phase: 'configure' ==> Executing phase: 'build' ==> Error: ProcessError: Command exited with status 2: 'make' '-j8' 'lib'

5 errors found in build log: 334 python genstencils.py /home/mehrdad/spack/var/spack/stage/blitz-1.0 .1-ygzugsujglfbuugxrmyhewbuv6ythbbz/spack-src/blitz/array/stencil-c lasses.cc 335 File "genstencils.py", line 9 336 print "Generating file %s"%sys.argv[1] 337 ^ 338 SyntaxError: Missing parentheses in call to 'print'. Did you mean p rint("Generating file %s"%sys.argv[1])? 339 Makefile:622: recipe for target '/home/mehrdad/spack/var/spack/stag e/blitz-1.0.1-ygzugsujglfbuugxrmyhewbuv6ythbbz/spack-src/blitz/arra y/stencil-classes.cc' failed

340 make[4]: [/home/mehrdad/spack/var/spack/stage/blitz-1.0.1-ygzug sujglfbuugxrmyhewbuv6ythbbz/spack-src/blitz/array/stencil-classes.c c] Error 1 341 make[4]: Leaving directory '/tmp/mehrdad/spack-stage/spack-stage-64 ixcldr/spack-src/blitz/generate' 342 Makefile:627: recipe for target 'all-local' failed 343 make[3]: [all-local] Error 2 344 make[3]: Leaving directory '/tmp/mehrdad/spack-stage/spack-stage-64 ixcldr/spack-src/blitz/generate' 345 Makefile:582: recipe for target 'all-recursive' failed 346 make[2]: [all-recursive] Error 1 347 make[2]: Leaving directory '/tmp/mehrdad/spack-stage/spack-stage-64 ixcldr/spack-src/blitz' 348 Makefile:476: recipe for target 'all' failed 349 make[1]: [all] Error 2 350 make[1]: Leaving directory '/tmp/mehrdad/spack-stage/spack-stage-64 ixcldr/spack-src/blitz' 351 Makefile:982: recipe for target 'blitz-library' failed 352 make: *** [blitz-library] Error 1

citibeth commented 5 years ago

Someone needs to convert the build code in Blitz++ to Python3. Until then, you need to have Python2 available to build. The Spack recipe could be upgraded to more explicitly require that; but I think it will be easiest to just fix Blitz++.

slayoo commented 5 years ago

Addressed in #145

slayoo commented 5 years ago

The PR was merged, seems to work now with both Python 3 and Python 2 (tested through Travis). Please report back if there are still any problems.