yoyoberenguer / BloomEffect

How to create a bloom Effect with python
MIT License
9 stars 2 forks source link

Getting this: #6

Open atv2016 opened 8 months ago

atv2016 commented 8 months ago
  creating build/temp.macosx-10.9-universal2-cpython-312/BloomEffect
  clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -I/private/var/folders/xx/nbkhlmsj1b7cb3dmw6dtmlsh0000gn/T/pip-build-env-v9vovq6o/overlay/lib/python3.12/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c BloomEffect/bloom.c -o build/temp.macosx-10.9-universal2-cpython-312/BloomEffect/bloom.o /openmp /Qpar /fp:fast /O2 /Oy /Ot
  clang: error: no such file or directory: '/openmp'
  clang: error: no such file or directory: '/Qpar'
  clang: error: no such file or directory: '/fp:fast'
  clang: error: no such file or directory: '/O2'
  clang: error: no such file or directory: '/Oy'
  clang: error: no such file or directory: '/Ot'
  error: command '/usr/bin/clang' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for BloomEffect Failed to build BloomEffect ERROR: Could not build wheels for BloomEffect, which is required to install pyproject.toml-based projects

when doing a pip3 install BloomEffect, I have wheel, setup tools, cython and numpy installed.

yoyoberenguer commented 7 months ago

This library has been tested for windows, I have not tested it under Linux or Unix However I believe that changing the compilation attributes will do the job

Replace the lines (Windows compilation attributes)

ext_modules=cythonize([
        Extension("BloomEffect.bloom", ["BloomEffect/bloom.pyx"],
                  extra_compile_args=["/openmp", "/Qpar", "/fp:fast", "/O2", "/Oy", "/Ot"], language="c")]),

with (linux/unix) equivalent for i686

ext_modules=cythonize([
        Extension("BloomEffect.bloom", ["BloomEffect/bloom.pyx"],
                  extra_compile_args= ["-DPLATFORM=linux", "-march=i686",  "-m32", "-O3", 
                                                   "-ffast-math", "--param=max-vartrack-size=1500000",
                                                   "-Wall", "-fopenmp", "-static"] ,language="c")]),

or (unix/linux) equivalent for x86-64



ext_modules=cythonize([
        Extension("BloomEffect.bloom", ["BloomEffect/bloom.pyx"],
                  extra_compile_args=["-DPLATFORM=linux", "-march=x86-64", "-m64", "-O3", "-ffast-math", "-Wall", "-static",
         "--param=max-vartrack-size=1500000"] ,language="c")]),