-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wordseg-ag: compilation fatal error: 'ext/stdio_filebuf.h' file not found #15
Comments
Finally I decided to remove pstream.h from AG. It was called from main.cc only to support the options -U -V -X -Y. They handle stream output to custom shell commands and are useless in the wordseg framework. This change do not impact the AG processing in any case. See commit 0f01c69. |
Hi everyone, I just came across this because someone asked me if they could run adaptor grammars on OS-X. I tried to compile the py-cfg code on a Mac, and discovered exactly this problem. @mmmaat is right that the adaptor grammar sampler itself will work just fine without the options that let you pipe the output into other commands. But being able to pipe intermediate results into an evaluation command lets you monitor things like convergence during the run of a sampler. For my own purposes, I've solved my problem by installing gcc on the Mac. But I can look at making this work on the Mac clang compiler if anyone cares. It seems that pstreams would be an easy way to get this working across many platforms. Best, Mark Johnson |
Hi Mark, as But the actual version of AG in wordseg still doesn't compile on MacOS (I can't remember why) and the documentation suggests users to run it within docker on Mac and Windows. But if you want to make the code portable across platforms, you are very welcome to do it, either by implementing a Thanks anyway, |
Yes, you're right -- CLANG differs from g++ in many ways. I'm stuck on a problem where g++ and CLANG IO consume different numbers of characters from the input on a failed read (ugh). I think I'll give up for now unless I can think of an easy fix.
It seems to compile fine under g++ on my linux box, and I used to compile it on my mac with g++ installed with homebrew ... that still should work.
Mark
On 10/3/19 01:45, Mathieu Bernard wrote:
Hi Mark, as wordseg uses it's own logging system, I removed dependencies to pstream.h and simply used std::cout / std::cerr. The stream is then forwarded to the Python wrapper of AG (see here<https://protect-au.mimecast.com/s/yFUuCP7L1Nf5J9OXcj_G-M?domain=github.com>).
But the actual version of AG in wordseg still doesn't compile on MacOS (I can't remember why) and the documentation suggests users to run it within docker<https://protect-au.mimecast.com/s/WSqxCNLJxkiMwJA3I4HVA2?domain=wordseg.readthedocs.io> on Mac and Windows.
But if you want to make the code portable across platforms, you are very welcome to do it, either by implementing a pstreams solution or documenting the instalaltion of a compatible version of GCC under MacOS.
Thanks anyway,
Mathieu
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://protect-au.mimecast.com/s/LtNZCOMK7Yc2ElJxhk6M6t?domain=github.com>, or mute the thread<https://protect-au.mimecast.com/s/TLCDCQnM1WfNJg8PUrmOXW?domain=github.com>.
|
This issue is related to Adaptor Grammar compilation error on MacOS using the Apple Clang compiler.
A dirty solution for now is to use the GCC compiler instead. Indeed the
ext/stdio_filebuf.h
is a non-standard C header bundled with GCC, but not with Clang. On Mac it can be installed (gcc-7.1) from http://hpc.sourceforge.net.Once done, in the cmake output you should have
instead of
I'm working on a portable solution based on
boost::iostreams
instead.The text was updated successfully, but these errors were encountered: