TALP-UPC / FreeLing

FreeLing project source code
Other
252 stars 96 forks source link

failed to install macOS branch master #78

Closed arademaker closed 5 years ago

arademaker commented 6 years ago

Hi Padro,

Following the instructions for MacOS in https://talp-upc.gitbooks.io/freeling-4-1-user-manual/content/installation/installation-mac.html. the compilation failled:


[ 24%] Linking CXX shared library libdynet.dylib
Undefined symbols for architecture x86_64:
  "boost::iostreams::zlib_error::check(int)", referenced from:
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, unsigned int) in io.cc.o
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::read<boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, char*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, unsigned int) in io.cc.o
  "boost::iostreams::zlib::stream_end", referenced from:
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, unsigned int) in io.cc.o
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::read<boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, char*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, unsigned int) in io.cc.o
  "boost::iostreams::zlib::sync_flush", referenced from:
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, unsigned int) in io.cc.o
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::read<boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, char*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, unsigned int) in io.cc.o
  "boost::iostreams::zlib::default_strategy", referenced from:
      boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::make_params(int) in io.cc.o
  "boost::iostreams::zlib::default_compression", referenced from:
      boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::make_params(int) in io.cc.o
  "boost::iostreams::zlib::okay", referenced from:
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char*, long) in io.cc.o
      void boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, unsigned int) in io.cc.o
  "boost::iostreams::zlib::deflated", referenced from:
      boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::make_params(int) in io.cc.o
  "boost::iostreams::detail::gzip_footer::reset()", referenced from:
      boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::basic_gzip_decompressor(int, long) in io.cc.o
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char*, long) in io.cc.o
  "boost::iostreams::detail::gzip_footer::process(char)", referenced from:
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char*, long) in io.cc.o
  "boost::iostreams::detail::gzip_header::reset()", referenced from:
      boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::basic_gzip_decompressor(int, long) in io.cc.o
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char*, long) in io.cc.o
  "boost::iostreams::detail::gzip_header::process(char)", referenced from:
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char*, long) in io.cc.o
  "boost::iostreams::detail::zlib_base::after(char const*&, char*&, bool)", referenced from:
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, unsigned int) in io.cc.o
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::read<boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, char*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, unsigned int) in io.cc.o
  "boost::iostreams::detail::zlib_base::reset(bool, bool)", referenced from:
      boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl::impl<boost::iostreams::zlib_params>(long, boost::iostreams::zlib_params const&) in io.cc.o
      boost::detail::shared_count::shared_count<boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl>(boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl*) in io.cc.o
      boost::detail::sp_counted_impl_p<boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl>::dispose() in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, unsigned int) in io.cc.o
      long boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::read<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, unsigned int) in io.cc.o
  "boost::iostreams::detail::zlib_base::before(char const*&, char const*, char*&, char*)", referenced from:
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, unsigned int) in io.cc.o
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::read<boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, char*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, unsigned int) in io.cc.o
  "boost::iostreams::detail::zlib_base::do_init(boost::iostreams::zlib_params const&, bool, void* (*)(void*, unsigned int, unsigned int), void (*)(void*, void*), void*)", referenced from:
      boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl::impl<boost::iostreams::zlib_params>(long, boost::iostreams::zlib_params const&) in io.cc.o
  "boost::iostreams::detail::zlib_base::xinflate(int)", referenced from:
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::write<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, char const*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >(boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> >&, unsigned int) in io.cc.o
      long boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::read<boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::basic_gzip_decompressor<std::__1::allocator<char> >::peekable_source<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, char*, long) in io.cc.o
      void boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::close<boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > > >(boost::iostreams::non_blocking_adapter<boost::iostreams::detail::linked_streambuf<char, std::__1::char_traits<char> > >&, unsigned int) in io.cc.o
  "boost::iostreams::detail::zlib_base::zlib_base()", referenced from:
      boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl::impl<boost::iostreams::zlib_params>(long, boost::iostreams::zlib_params const&) in io.cc.o
  "boost::iostreams::detail::zlib_base::~zlib_base()", referenced from:
      boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl::impl<boost::iostreams::zlib_params>(long, boost::iostreams::zlib_params const&) in io.cc.o
      boost::detail::shared_count::shared_count<boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl>(boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl*) in io.cc.o
      boost::detail::sp_counted_impl_p<boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl>::dispose() in io.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/libdynet/dynet/libdynet.dylib] Error 1
make[1]: *** [src/libdynet/dynet/CMakeFiles/dynet.dir/all] Error 2
make: *** [all] Error 2
leme:build ar$```
stemd commented 6 years ago

arademaker, you followed instructions on page: https://talp-upc.gitbooks.io/freeling-4-1-user-manual/content/installation/requirements-mac.html ? brew install boost --with-icu4c

lluisp commented 6 years ago

Non-linux platforms and with non-C++ APIs are only supported in stable releases.
So, it is very likely that master only works in linux and in C++. To use FreeLing in mac, please stay in 4.1 until next stable is released.

In any case, the error you get seems related to boost::iostreams missing in your system, so, installing it might solve some things

arademaker commented 6 years ago

@stemd yes, I did follow the instructions and I had the boost with icu4c installed. But I still get error

      boost::detail::sp_counted_impl_p<boost::iostreams::symmetric_filter<boost::iostreams::detail::zlib_decompressor_impl<std::__1::allocator<char> >, std::__1::allocator<char> >::impl>::dispose() in io.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/libdynet/dynet/libdynet.dylib] Error 1
make[1]: *** [src/libdynet/dynet/CMakeFiles/dynet.dir/all] Error 2
make: *** [all] Error 2
leme:build ar$

Anyway, I was able to install using brew with brew install freeling. It works for now, but I was looking for a better workflow for changing the data/pt/* files and easily contribute to FL source.

arademaker commented 6 years ago

Just for the records:

$ brew info boost
boost: stable 1.67.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.67.0_1 (13,506 files, 459.8MB) *
  Built from source on 2018-09-03 at 09:48:01 with: --with-icu4c
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
==> Dependencies
Optional: icu4c ✔
==> Options
--with-icu4c
    Build regexp engine with icu support
--without-single
    Disable building single-threading variant
--without-static
    Disable building static library variant
--HEAD
    Install HEAD version
arademaker commented 6 years ago

hi @lluisp , following your advice in https://github.com/TALP-UPC/FreeLing/issues/78#issuecomment-418421207, I tried to compile the 4.1 release making the checkout of the commit v4.1. It failed too.

$ git co -b upstream/v4.1
$ cmake ..
$ make
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/libfreeling/libfreeling.dylib] Error 1
make[1]: *** [src/libfreeling/CMakeFiles/freeling.dir/all] Error 2
make: *** [all] Error 2

I can't use the brew package because during FL uses, I want to contribute with changes in the data files. But changes must be made in the source structure right? The dicc file is building during the installation. I am looking for an interactive process for

  1. changes in the FLSOURCE/data/pt/* files
  2. make install
  3. run/check and back to [1].

Docker could be an alternative, the master/HEAD compiled in the docker, but it gives encoding errors when I use Python 3 API. For some reason, I could not figure out how to make the script read and write UTF-8.

thank you in advance for any tips and idea.

lluisp commented 6 years ago

yes, that should be the right workflow.

I can not tell which is the problem because you only posted part of the error.
The "symbol not found" error usually relates to some library (probably boost or icu) that is missing in your system (or located somewhere where the linker can not find it).

Please post the output of 'cmake', as well as the complete error you get from 'make'.

Notice that if you want to build python API, you need to add -DPYTHON3_API=ON to cmake command

python3 is native in utf8, so you should have no problems. To use UTF8 from python2, check the example in src/APIs/python2/sample.py