Trouble installing TMV library - failed-installation

I am currently attempting to install the necessary software to run the GalSim, including the TMV libraries. I am currently in the process of following the instructions here to install the software on Windows 7: GalSim Installation
When I run scons SHARED=false install, it makes it a long way through the process before the following message appears and the installation fails:
scons: Building targets ...
rm -f share\tmv-link; echo -ltmv > share\tmv-link
rm: unknown option -- l
Try `rm --help' for more information.
scons: *** [share\tmv-link] Error 1
scons: building terminated because of errors.
I am rather inexperienced and have no idea how to proceed.

According to the installation instructions that you linked to: "System requirements: GalSim currently only supports Linux and Mac OSX."
I don't think any of the developers use Windows, but you could certainly open an issue requesting that Windows be added to the list of supported systems.

Related

Can't make TensorFlow 2.4.1 (CPP) compile on Windows

I am trying to build TensorFlow 2.4.1 C++ API on Windows 10 and I am having issues.
What I've done so far:
Download TensorFlow Source from the official repo
https://github.com/tensorflow/tensorflow
and switched to the official v2.4.1 tag
Download and install Python 3.6.8 x64
Created a virtual env with python 3.6.8
Created and installed requirements.txt based on the data here
Download and install CUDA 11.0 and cuDNN v8.0.4.30 (for CUDA 11)
Downloaded and installed msys2 and set it's location in PATH
Download and install bazel (3.1.0) as it is the most recent entry here
Then I run the configuration process with python configure.py
I configure for C++ build (tensorflow_cc) with GPU support
Here I had some problem that apparently during the config process windows-style backslashes are accepted as a valid input, but then when you actually run bazel compilation they cause problems, so I reran my configuration to provide linux-style backslashes. Thus CUDA and cuDNN were successfully detected and compilation started.
The full contents of my .tf_configure.bazelrc are below
build --action_env PYTHON_BIN_PATH="D:/code/sdk/tensorflow/venv/Scripts/python.exe"
build --action_env PYTHON_LIB_PATH="D:/code/sdk/tensorflow/venv/lib/site-packages"
build --python_path="D:/code/sdk/tensorflow/venv/Scripts/python.exe"
build --config=xla
build --action_env TF_CUDA_VERSION="11.0"
build --action_env TF_CUDNN_VERSION="8.0.4"
build --action_env TF_CUDA_PATHS="C:/Program Files/NVIDIA GPU Computing
Toolkit/CUDA/v11.0,D:/code/sdk/cudnn-11.0-windows-x64-v8.0.4.30/cuda"
build --action_env CUDA_TOOLKIT_PATH="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0"
build --action_env TF_CUDA_COMPUTE_CAPABILITIES="5.0"
build --config=cuda
build:opt --copt=/arch:AVX
build:opt --host_copt=/arch:AVX
build:opt --define with_default_optimizations=true
build --define=override_eigen_strong_inline=true
test --flaky_test_attempts=3
test --test_size_filters=small,medium
test:v1 --test_tag_filters=-benchmark-test,-no_oss,-no_windows,-no_windows_gpu,-no_gpu,-oss_serial
test:v1 --build_tag_filters=-benchmark-test,-no_oss,-no_windows,-no_windows_gpu,-no_gpu
test:v2 --test_tag_filters=-benchmark-test,-no_oss,-no_windows,-no_windows_gpu,-no_gpu,-oss_serial,-
v1only
test:v2 --build_tag_filters=-benchmark-test,-no_oss,-no_windows,-no_windows_gpu,-no_gpu,-v1only
build --action_env TF_CONFIGURE_IOS="0"
About 20 minutes into the compilation however it failed with the following error:
ERROR: D:/code/sdk/tensorflow/tensorflow/stream_executor/cuda/BUILD:366:1: C++ compilation of rule '//tensorflow/stream_executor/cuda:cudnn_stub' failed (Exit 2): python.exe failed: error executing command
And the reason the command fails to execute is
bazel-out/x64_windows-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cudnn_header\third_party/gpus/cudnn/cudnn.h(61): fatal error C1083: Cannot open include file: 'cudnn_ops_infer.h': No such file or directory
And here I am wondering what is going on? I already provided a path to cuDNN, but apparently bazel doesn't really know about it, even though it previously acknowledged that the path I have provided is correct. Am I missing some environment variable that I need to set to instruct where cuDNN is?
Has anyone built TF C++ v2.4.1 on Windows? There is so little information online, even the official page says nothing about Windows builds. It's only Linux and Mac...
As I was running out of ideas I decided to go take a look at the Bazel build scripts for CUDA
In <REPO>\tensorflow\third_party\gpus\cuda_configure.bzl I saw that cuDNN path is read from env variable CUDNN_INSTALL_PATH
and if not present it will default to /usr/local/include?
Anyway, tried set CUDNN_INSTALL_PATH=D:/code/sdk/cudnn-11.0-windows-x64-v8.0.4.30/cuda and WOOHOO It compiled!
(Pro Tip: Set the env var without any quotes and with linux-style slashes...)

Valgrind on bash for Windows 10 [duplicate]

When I installed WSL for my computer I was very excited to have a more natively supported Linux system rather than using VirtualBox. However I get this error when I try to run it. Is there a reason why?
I am happy to give more information as required.
--4364:0:aspacem -1: ANON 0038000000-00383d5fff 4022272 r-x-- SmFixed d=0x000 i=25365 o=0 (0) m=0 /usr/lib/valgrind/memcheck-amd64-linux
--4364:0:aspacem Valgrind: FATAL: aspacem assertion failed:
--4364:0:aspacem segment_is_sane
--4364:0:aspacem at m_aspacemgr/aspacemgr-linux.c:1502 (add_segment)
--4364:0:aspacem Exiting now.
It's definitely possible
I've encountered some problems installing it directly with apt, however it can be installed manually with some very simple steps:
Download the source file: wget http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2 (by the time you read this there could be a newer version)
Extract the archive: tar -xvjf valgrind-3.12.0.tar.bz2
Configure the installation process: cd into the exctracted folder valgrind-3.12.0 and then launch ./configure
Make: simply launch make while in the valgrind-3.12.0 folder
Check the dependencies: launch make check to see whether all the dependencies necessary for the installation are satisfied (e.g: you'll have to install g++, just launch sudo apt install g++)
Install valgrind: type sudo make install to install it
I had the same problem, the solution was to install Windows 10 creators update (version 1703), and reinstall Bash/WSL. Valgrind now works fine :)

Error while Configuring a Software

I get the following error while trying to configure a software :
checking for vector... yes
checking for malloc in -ljemalloc... no
configure: error: Need jemalloc
The solutions on the web haven't worked. I tried installing the jemalloc-devel package, jemalloc, libjemalloc package but they won't install.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libjemalloc
Installing libjemalloc1 didn't help. I still get the same error.
checking for vector... yes
checking for malloc in -ljemalloc... no
configure: error: Need jemalloc
Machine is Ubuntu 15.04, with gcc 4.9.2 . Thanks.
The package jemalloc is missing form your system.

Recipe for target failed error in Eclipse using cygwin

First of all, I know that this question already exists multiple times in Stackoverflow but the answers provided for all of them didn't solve my issue(See section "Solutions worked for others" at the end of this question).
I am using the Eclipse IDE(Juno) with CDT plugin and Cygwin installed in my Windows-7 64-bit platform.
I successfully compiled and run the Hello World 'C' program but the Hello World "C++ program" is having Launch failed. Binary not found error.
I am also having recipe for target project.exe failed error in my auto-generated makefile.
Error line in makefile: #echo 'Building target: $#'
Additionally:
In c/c++ build -> toolchain editor ->
Current toolchain : Cygwin GCC
Current Builder : Gnu Make Builder
Used Tools:
GCC Assembler,
GCC Archiver,
Cygwin C++ Compiler,
Cygwin C Compiler,
Cygwin C Linker,
Cygwin C++ Linker.
When I change Current Builder from "Gnu Make Builder" to "CDT Internal Builder" the recipe for target project.exe failed error disappears but the Launch failed. Binary not found error still exists.
And also I dont have MinGW installed.
Solutions worked for others :
Before running the project directly using the run command, first Build the project and then run.
I build the project every time before I run it.
Eclipse can't find or point to an .exe file but the exe file runs fine when run from windows explorer and the answer to it is add -arch i386 to miscellaneous under linker.
My build runs without error but not creating the exe file. So this doesnt apply to me
Project->Properties->C/C++ Build->Settings->Binary Parsers
set "Cygwin PE Parser" and/or " PE Window Parser" and alike.
Tried all of them with different combinations but did not work
I also did :
adding the cygwin install dir to the path variable
added all the includes folders needed for cygwin for both GNU C and GNU C++ in Paths-and-Symbols -> includes
Saved the project before building and then running
restarted eclipse again
checked if g++ is installed using which g++ in terminal
and so on.
What could be a fix to this problem? Or do I have to install MinGW (I tried already to install MinGW with the installer.exe they provided and it failed on downloading the files several times) and try again.
I couldn't find the solution. Please show me what am I missing here.
Thanks in advance.

Netbeans and MinGW-w64

I'm trying to configure my NetBeans on win7 64bit, to work with the MinGW-w64.
So I put in the %PATH% variable the following paths of the compiler:
C:\mingw-w64-bin_i686\mingw\bin
C:\minGw-MSYS\msys\bin
C:\mingw-w64-bin_i686\libexec\gcc\x86_64-w64-mingw32\4.7.0
Then I opened NetBeans and this was configured:
The configuration in NetBeans
I tried to compile a little test program but I received this error:
g++.exe: fatal error: -fuse-linker-plugin, but liblto_plugin-0.dll not
found compilation terminated. make[2]: *
[dist/Debug/MinGW-Windows/test.exe] Error 1 make1: [.build-conf]
Error 2 make: ** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
I do have this file in C:\mingw-w64-bin_i686\libexec\gcc\x86_64-w64-mingw32\4.7.0
what am I missing?
Right, after months of putting this off I've finally sat down and done it. I'll probably make a more detailed post on my blog with pretty pictures but here is a trimmed down SO version which will hopefully be enough for you (and everyone else) to get going with.
Prerequisites
Remove MinGW, MSYS and CMake if you have them and can afford to lose them (we will reinstall MinGW (obv.) and MSYS but not CMake as it doesn't appear to be needed.)
Netbeans or other suitable IDE
64bit Windows.
EnvMan (optional but handy for managing Windows Environment
variables.)
Installation
MinGW-W64 C compiler and MSYS
Download and install MinGW-W64
http://mingw-w64.sourceforge.net/ (link is on the left menu with a
hyperlink called 'WIN64 Downloads'.)
There are a lot of versions which can be a bit complicated. We are
going with mingw-w64-bin_i686-mingw_20111220 (although the numbers at
the end may be different) which basically says we want the version
with the windows binaries.
Once the download is complete (about 300mb so 10min or so) extract to
C:\MinGW-W64 or similar. Make sure there aren't any spaces in the
path!
Download MSYS for MinGW-W64
Took a bit of searching
http://sourceforge.net/apps/trac/mingw-w64/wiki/MSYS is the wiki for
it and
http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/
is where I found the download and the version I went with was
MSYS-20111123
Once the download is complete extract the files to C:\MSys or
similar. Make sure there aren't any spaces in the path!
Setup
Add 'C:\MinGW-W64\bin' to your Windows PATH variable.
Add 'C:\MSys\msys\bin' to your Windows PATH variable.
Start Netbeans and go to Tools -> Options -> C/C++.
Click 'Add' under 'Tool Collection' and select the base directory of
MinGW-W64 (C:\MinGW-W64\bin).
Select 'MinGW' from 'Tool Collection Family' if it isn't
auto-detected and click 'OK'.
Set the 'C Compiler to C:\MinGW-W64\bin\x86_64-w64-mingw32-gcc.exe.
Set the 'C++ Compiler to C:\MinGW-W64\bin\x86_64-w64-mingw32-g++.exe.
Set the 'Make Command' to C:\MSys\msys\bin\make.exe.
And that should be it!
I should note that I am using the system to compile a library file to be use via JNI so have some additional steps for that which I missed out as they weren't needed here. However I made a quick 'Hello World' program and it compiled and ran nicely.
Happy coding!
I have just downloaded the latest automated build, unzipped it, added the main bin directory to path, and run:
x86_64-w64-mingw32-gcc test.cpp -o test.exe
and
x86_64-w64-mingw32-gcc -fuse-linker-plugin test.cpp -o test.exe
and it works. The same for the i686 variant. Your IDE is doing something wrong. Or you shouldn't have messed with the files. Or you shouldn't have removed the prefixes. Seriously.
PS: You only have to add the main "bin" directory to PATH, all the rest is wrong.
With some searching via your favorite Internet search engine, I have come across a better approach to quickly add MinGW-x64 to a Windows 64-bit system. On the Sourceforge site is MSYS2.
While following the installation directions and obtaining the most up to date packages, there may be a time out at the primary mirror site on Sourceforge. If so, follow the mirror site update directions and update the three pacman text files in the respective MSYS2 directory (e.g. /etc/pacman.d). Then proceed to complete the package updates from the MSYS2 installation directions.
Within the MSYS2 packages are things like gcc, llvm, make, dmake, etc. Here is the command used from the MSYS2 command line shell (e.g. bash) to install the GNU make utility:
$ pacman -S msys/make
The executable location it will be placed is: /usr/bin inside the MSYS2 command shell. As far as configuring Netbeans for where make.exe is located, the Windows path is:
MSYS2 installation directory\usr\bin\make.exe
(e.g. C:\msys64\usr\bin\make.exe).
To successfully build C++ with Netbeans, I used the GNU make package (e.g. msys/make). Then in order to use the default make files that Netbeans manages, and to not interfere with other C++ compilers within your Windows installation (e.g. Visual Studio, Intel, CLang from Visual Studio, etc.), run Netbeans from the MinGW-x64 command shell provided by MSYS2. In this way, the environment variables and other things like:
ls rm mkdir
will indicate successful execution and compilation within the Netbeans internal terminal window. I opened the MinGW-w64 Win64 Shell by navigating to the installed shortcut from MSYS2's installation. Then pasted into the MinGW-x64 shell command line, the Target property value from the Netbeans Windows desktop shortcut:
$ "C:\Program Files (x86)\NetBeans 7.4\bin\netbeans.exe"
And then could finally create the respective debug and release object and executable files. I also modified the Netbeans project output to be within the MSYS2 directory structure. Then run the executable within the MSYS2 MinGW-x64 shell. Running from the Netbeans IDE produces this error message:
Unable to start pty process: The application failed with exit code
-1073741515 (0xc0000135).
If the MSYS2 path were in the computer system's PATH environment variable, then perhaps this error would not happen.