Calling on Nim <=> C++ experts.
I am trying to get nimfastText working on Travis as part of the nimgen test suite and have run into an issue.
This is due to line 12 in the test:
ss = constructStdIStringStream(constructStdString("അമ്മ"))
These procs are defined in fasttext.nim, wrapping standard C++ constructors:
proc constructStdString*(s: cstring): std_string {.importcpp: "std::string(@)", constructor, header: "<string>".}
proc constructStdIStringStream*(s: std_string): istringstream {.importcpp: "std::istringstream(@)", constructor, header: "<sstream>".}
This further translates to the following C++ code:
ss_Pl4bHlPuqUxT8XFxMDXCKQ = std::istringstream(std::string("\340\264\205\340\264\256\340\265\215\340\264\256"));
This works fine on gcc 5.x onwards (AppVeyor Linux - gcc 5.x and Ubuntu Bionic - gcc 7.3.x) but fails on Travis since it has gcc 4.8.4 and I run into:
https://stackoverflow.com/questions/50926506/deleted-function-std-basic-stringstream-in-linux-with-g
Per the accepted answer, gcc 4.8 hadn't added the move operator so there's no way to get this working as is. I'm curious if there's a way to enable support for gcc 4.8 by changing the usage of the constructors in some way.
Thanks in advance.
Generally, fastText builds on modern Mac OS and Linux distributions. Since it uses some C++11 features, it requires a compiler with good C++11 support. These include :
(g++-4.7.2 or newer) or (clang-3.3 or newer) Compilation is carried out using a Makefile, so you will need to have a working make. If you want to use cmake you need at least version 2.8.9.
One of the oldest distributions we successfully built and tested the CLI under is Debian wheezy.