pysrilm icon indicating copy to clipboard operation
pysrilm copied to clipboard

-fopenmp, zopen error

Open lucasrodes opened this issue 9 years ago • 3 comments
trafficstars

Hi, I am using Mac OSX El Capitan and when executing python setup.py install I get the following error:

/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Volumes/Macintosh/Users/lucasrodes/Documents/Exercise_2/srilm/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c srilm.cpp -o build/temp.macosx-10.6-intel-2.7/srilm.o -fopenmp clang: error: unsupported option '-fopenmp' clang: error: unsupported option '-fopenmp' error: command '/usr/bin/clang' failed with exit status 1

I read the other issues and I replaced in the setup.py file ['-fopenmp'] for [] but another error appeared:

/Volumes/Macintosh/Users/lucasrodes/Documents/Exercise_2/srilm/include/zio.h:105:8: error: conflicting types for 'zopen' FILE * zopen (const char *name, const char *mode); ^ /usr/include/stdio.h:463:7: note: previous declaration is here FILE *zopen(const char *, const char *, int); ^ 1 error generated. error: command '/usr/bin/clang' failed with exit status 1

Any ideas?

lucasrodes avatar Apr 18 '16 22:04 lucasrodes

That's a conflict between SRILM code (srilm/include/zio.h) and OS X system code (/usr/include/stdio.h) -- not much that pysrilm can do about it as far as I can see :-(. pysrilm doesn't even include either of those files itself. I guess you could try filing a bug upstream with the SRILM maintainers?

I just went googling and the first thing was you running into the same bug with a different srilm wrapper... https://github.com/desilinguist/swig-srilm/issues/6 which makes sense, since it's not a bug in the wrapper but rather a bug in SRILM itself. Good luck?

njsmith avatar Apr 18 '16 23:04 njsmith

Thanks for the quick response! I'll take a look. I am currently trying to make to work lots of bindings but none seem to work...

lucasrodes avatar Apr 18 '16 23:04 lucasrodes

I am currently trying to make to work lots of bindings but none seem to work...

Yes, because the problem is on SRILM, not in the bindings :-). You need to contact [email protected] as described at the bottom of the SRILM home page: http://www.speech.sri.com/projects/srilm/

njsmith avatar Apr 19 '16 01:04 njsmith