Skip to content
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

Build on OSX Sierra fails #26

Open
Horsmann opened this issue Mar 16, 2017 · 3 comments
Open

Build on OSX Sierra fails #26

Horsmann opened this issue Mar 16, 2017 · 3 comments

Comments

@Horsmann
Copy link

Hi,
I tried to build the hunpos binaries for OSX using the provided build script.
I get this error:

Finished, 1 target (0 cached) in 00:00:00.
/usr/local/lib/ocaml/libasmrun.a
mkdir hunpos
ocamldep.opt -pp 'sed -e '\''s/^\(.*[[:space:]]\)\?Bytes\([^[:alpha:]].*\)\?$/\1String\2/g'\''' -modules hunpos/trainer.ml > hunpos/trainer.ml.depends
mkdir hunpos/lib
ocamldep.opt -pp 'sed -e '\''s/^\(.*[[:space:]]\)\?Bytes\([^[:alpha:]].*\)\?$/\1String\2/g'\''' -modules hunpos/lib/getopt.mli > hunpos/lib/getopt.mli.depends
ocamldep.opt -pp 'sed -e '\''s/^\(.*[[:space:]]\)\?Bytes\([^[:alpha:]].*\)\?$/\1String\2/g'\''' -modules hunpos/hmm_tagger.ml > hunpos/hmm_tagger.ml.depends
ocamldep.opt -pp 'sed -e '\''s/^\(.*[[:space:]]\)\?Bytes\([^[:alpha:]].*\)\?$/\1String\2/g'\''' -modules hunpos/io.ml > hunpos/io.ml.depends
sed: RE error: illegal byte sequence
File "hunpos/io.ml", line 1:
Error: Error while running external preprocessor
Command line: sed -e 's/^\(.*[[:space:]]\)\?Bytes\([^[:alpha:]].*\)\?$/\1String\2/g' 'hunpos/io.ml' > /var/folders/27/58qs5tsd719b45h_pddbdpvr0000gn/T/ocamlpp784e22

Exit code 2 while executing this command:
  ocamldep.opt -pp 'sed -e '\''s/^\(.*[[:space:]]\)\?Bytes\([^[:alpha:]].*\)\?$/\1String\2/g'\''' -modules hunpos/io.ml > hunpos/io.ml.depends

Any idea how to fix this?

@ljos
Copy link
Contributor

ljos commented Mar 16, 2017

Try using gnu sed instead of the bsd sed that follows with os x. It can be installed with
brew install gnu-sed and added to the path by setting PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH.

@Horsmann
Copy link
Author

Thanks. Works with gnu-sed.

@giuliopaci
Copy link
Contributor

Another option is to upgrade ocaml to 4.02 version.
I think it would be nice to fix the sed command line so that it works with both gnu sed and bsd sed.

@giuliopaci giuliopaci reopened this Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants