Closed madiazp closed 7 years ago
So far I tried with:
git clone https://github.com/ChileanVirtualObservatory/acalib.git
pip install -e acalib
But, when I try to import acalib its fail with this output:
ImportError: No module named 'acalib.core._morph.morph'
I searched the module and is not compiled, tryed to compile it but it has this output:
morph.c:47:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for(int i = 1; i < n-1; i++) ^ morph.c: In function âdifferenceImplâ: morph.c:7:5: error: âforâ loop initial declarations are only allowed in C99 or C11 mode for(int i = 1; i < n; i++) ^ morph.c:7:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code morph.c: In function âsegmentationImplâ: morph.c:15:5: error: âforâ loop initial declarations are only allowed in C99 or C11 mode for(int i = 1; i < n-1; i++) ^ morph.c: In function âerosionImplâ: morph.c:31:5: error: âforâ loop initial declarations are only allowed in C99 or C11 mode for(int i = 0; i < n; i++) ^ morph.c:35:13: error: redefinition of âiâ for(int i = 1; i < n-1; i++) ^ morph.c:31:13: note: previous definition of âiâ was here for(int i = 0; i < n; i++) ^ morph.c:35:5: error: âforâ loop initial declarations are only allowed in C99 or C11 mode for(int i = 1; i < n-1; i++) ^ morph.c:47:13: error: redefinition of âiâ for(int i = 1; i < n-1; i++) ^ morph.c:35:13: note: previous definition of âiâ was here for(int i = 1; i < n-1; i++) ^ morph.c:47:5: error: âforâ loop initial declarations are only allowed in C99 or C11 mode for(int i = 1; i < n-1; i++)
With those random portuguesse-like characters.
I fixed it by adding in the setup.py a flag for gcc "-std=c11" and then compile all again (morph and acalib), I will do a pull request.
Need the commands and procedures to install acalib devel in a conda enviroment. The idea is that a script can do everything so it must be clear and automatic.