Is there a standard process that gensim uses to compile the cython bits? I've forked the project and edited the cython code, but it doesn't seem to recompile when I run python3 setup.py install --force.
I'm not getting any errors, it just doesn't seem to even attempt to compile the cython code. I have a fresh clone of the develop branch
How do I compile gensim "from source"?
OS: Ubuntu 16.04
gcc: 5.4.0
Related
OS: MacOS 11
Platform: Apple M1 architecture (Darwin ARM64)
According to
https://chromium.googlesource.com/external/github.com/grpc/grpc/+/HEAD/BUILDING.md
using make is outdated.
I downloaded and installed bazel Darwin x64 (MacOS Intel) binary latest version, bazel build :all completed without errors.
bazel test --config=dbg //test/... however prints out a lot of errors after a few minutes of compiling.
There's also the option to run cmake, which also completes.
So, my question is, am I correct if cmake or bazel (with build :all, of course) does not install the binaries, but rather make and (sudo) make install do?
If the use of make is "outdated", is bazel / cmake used to install the compiled binaries?
Let me explain the situation.
I compiled a c++ library using system g++ (under linux).
Then built a cython module which calls a function in the pre-compiled library. Building the cython module was done under an anaconada venv (but no g++ installed inside the venv. Hence cython must had used system gcc/g++).
Now under the same anaconda venv, importing the cython module results in an error as:
anaconda3/envs/hspy/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./libc_rd_halo.so).
It seems like the c library (libc_rd_halo.so) which was compiled by system g++ is now looking for an anaconda g++ library. And I don't have g++ installed in anaconda venv.
I can fix the problem by using anaconda g++ to compile the c library from the beginning. Build the cython module again, and then I can import the module.
But I'd like to let anaconda cython use system compiler and look for the system compiler library when the module is being imported.
My questions are:
why does anaconda cython look for a local anaconda g++ by default, but not the system compiler? any benefit doing so?
How can I make anaconda cython look for system compiler library?
why does anaconda cython look for a local anaconda g++ by default, but not the system compiler? any benefit doing so?
How can I make anaconda cython look for system compiler library?
Because libraries compiled with one version of GCC can only be linked with other libraries that were compiled with a compatible version of GCC, as you found out.
You don't. Per above, binaries build with the system compiler may or may not work with other anaconda binaries built using the anaconda compiler.
If you want your binary to use system libraries then you need to make a system package, not an anaconda package. The system package will then only work on that system (and version of).
How does one build GDB (the GNU Debugger) from source on Windows? I need to build it in order to make a build with Python support. I cannot use the one distributed with Cygwin because it has problems interpreting backslashes on Windows. What toolchains do I need for the build -- GnuWin32, MinGW, etc.? Can someone please provide step-by-step instructions on how to do this?
install (https://sourceforge.net/downloads/mingw) and configure MinGW with packages g++ gcc libc6-dev libtool pkg-config
get gdb sources (I use 7.latest from https://www.gnu.org/software/gdb/) and put it into MinGW/msys/1.0 folder
run ./configure in msys shell (MinGW\msys\1.0\msys.bat)
run make and fix the following:
hypot compile error with help of this '::hypot' has not been declared
undefined constants for GetLastError function by adding #include <winerror.h> into \gdb\gdbserver\win32-i386-low.c \gdb\gdbserver\win32-low.c gdb\ser-mingw.c
I have checked build process using 7.11.1 and 7.12.1 sources
7.12.1 x32 is broken under windows
https://github.com/Alexpux/MINGW-packages/issues/1909
https://sourceforge.net/p/mingw-w64/bugs/576/
I recently installed MSYS2 on Windows, along with the MinGW-w64 toolchain and CMake. Specifically, I used the following packages:
mingw-w64-i686-gcc
mingw-w64-i686-cmake
make
Trouble is, whenever I invoke CMake from within the MSYS2 shell with cmake -G"MSYS Makefiles", it fails with the following:
target_compile_features no known features for CXX compiler
"GNU"
version 4.9.2.
The line in CMakeLists.txt that generates the error is this: target_compile_features(myproject PUBLIC cxx_decltype).
If I run CMake from outside the MSYS2 shell (I also have it installed separately) with the "MinGW Makefiles" generator, the makefile generation succeeds.
Inside MSYS2, the CMake version is 3.2.3. The version outside is 3.3.0.
Is there any way to resolve this issue? Thanks in advance.
There was bug about interaction of compile features mechanism in CMake 3.3 with gcc 4.8+:
https://public.kitware.com/Bug/view.php?id=15443. It have been fixed several months ago. You need that fix being applied.
Run cmake from mingw64_shell.bat or mingw32_shell.bat. CMake will otherwise pickup msys2 GCC rather than a native one.
I'm trying to Install BLAS on my Mac, but every time I run make I get this error (shown below the link). I was trying to follow the instructions on this website:
gfortran -O3 -c isamax.f -o isamax.o
make: gfortran: No such file or directory
make: *** [isamax.o] Error 1
I have no idea what this means or how to fix it so any help would be appreciated. Also I'm trying to install CBLAS and LAPACK so any tips/instructions for that would be nice if you know of a good source...Everything I've found so far is pretty confusing. Also I tried to install ATLAS but it kept not working.
This error is caused because gfortran is apparently not installed, so you'll need to download an installer package for OS X Yosemite 10.10 and install it:
gfortran 5.1 or
gfortran 4.9.2 (info)
Once installed run the make command in the BLAS directory.
How to install Blas/Lapack: don't.
These libraries are the textbook example of enormous performance differences between simple and optimized code. And by optimizations I don't mean compiler: I mean algorithm transformations.
So you definitely do not want to download the "reference blas/lapack" from netlib or another location. If your system doesn't already come with an optimized version (Mac OS X does), see if you can get Intel's MKL library (free for students on Linux?), and otherwise get BLIS or OpenBlas or Atlas which are all open source optimized implementations.