Error: Compiling Boost with MPI Support in Windows - c++

I am trying to compile a 64 bit version of Boost 1.57 (www.boost.org) from source with MPI support using Microsoft Visual Studio 2015, but I am having errors. I am following the directions on the following website (https://gist.github.com/UnaNancyOwen/d879a41710e9c05025f8#file-boost1-56-0-md). I have followed the instructions to the letter, but I am (instead) running the following command to build:
C:\boost_1_57_0>b2.exe toolset = msvc-14.0 address-model = 64 --build-dir = build \ x64 install --prefix = "C: \ Program Files \ Boost" -j4
With the following error:
C:/boost_1_57_0/tools/build/src/tools\mpi.jam:251: syntax error at argument $(cluster_pack_path_native)
C:/boost_1_57_0/tools/build/src/tools\mpi.jam:252: syntax error at keyword {
libs\graph_parallel\build\Jamfile.v2:17: in modules.load
ERROR: rule "mpi.configured" unknown in module "Jamfile<C:\boost_1_57_0\libs\graph_parallel\build>".
C:/boost_1_57_0/tools/build/src/build\project.jam:311: in load-jamfile
C:/boost_1_57_0/tools/build/src/build\project.jam:64: in load
C:/boost_1_57_0/tools/build/src/build\project.jam:89: in load-used-projects
C:/boost_1_57_0/tools/build/src/build\project.jam:75: in load
C:/boost_1_57_0/tools/build/src/build\project.jam:145: in project.find
C:/boost_1_57_0/tools/build/src\build-system.jam:535: in load
C:\boost_1_57_0\tools\build\src/kernel\modules.jam:289: in import
C:\boost_1_57_0\tools\build\src/kernel/bootstrap.jam:139: in boost-build
C:\boost_1_57_0\boost-build.jam:17: in module scope
Any thoughts? The goal is to get the C++ Point Cloud Library (PCL) to work for VS 2015. I have Windows 8. Let me know if you need any more details...

Related

protobuf error: This file was generated by an older version of protoc

I'm attempting to develop a program to demonstrate the use of protobuf.
Package Manager : vcpkg
C++ Standard : C++20
Microsoft Visual C++ 2022
Install Log
vcpkg.exe install protobuf
Computing installation plan...
The following packages are already installed:
protobuf[core]:x64-windows -> 3.21.4
protobuf:x64-windows is already installed
Restored 0 package(s) from C:\Users\DarkSorrow\AppData\Local\vcpkg\archives in 409.1 us. Use --debug to see more details.
Total elapsed time: 130.8 ms
protobuf provides CMake targets:
# this is heuristically generated, and may not be correct
find_package(protobuf CONFIG REQUIRED)
target_link_libraries(main PRIVATE protobuf::libprotoc protobuf::libprotobuf protobuf::libprotobuf-lite)
I am getting the bellow mentioned error.
Error :
fatal error C1189: #error: This file was generated by an older version of protoc which is
I have not written any code but only included the generated file in the project.
Code Generation :
protoc test.proto --cpp_out=.
Code (test.proto) :
syntax = "proto3";
message Person {
optional string name = 1;
optional int32 id = 2;
optional string email = 3;
}
Protocol Buffer Generator Version
protoc --version
libprotoc 3.16.0
You must execute:
Protoc.exe command:
protoc --proto_path=[full path where exist file[ProtobufTypes.proto] --cpp_out=[full path where exist file[ProtobufTypes.proto] [full path where exist file[ProtobufTypes.proto]/ProtobufTypes.proto

No suitable Visual Studio instances were found

i like to download a library for c++ with vcpkg. ihave this error
This is shoul be a error because is red color in terminal:
No suitable Visual Studio instances were found
here the entire terminal code if you need it:
`Microsoft Windows [Versione 10.0.19042.1110]
(c) Microsoft Corporation. Tutti i diritti sono riservati.
C:\Users\laaou>.\vcpkg install ncurses
".\vcpkg" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
C:\Users\laaou>cd vcpkg
C:\Users\laaou\vcpkg>.\vcpkg install ncurses
Computing installation plan...
The following packages will be built and installed:
ncurses[core]:x86-windows -> 6.2#1
No suitable Visual Studio instances were found
C:\Users\laaou\vcpkg>`
what is mean? how to solve it.
now thank to #ChrisMM i can solve it, because i downloaded VS community edition!
but now i have this new error in red color:
Error: Building package ncurses:x86-windows failed with: BUILD_FAILED
the entirely code if you nedd it:
`C:\Users\laaou\vcpkg>.\vcpkg install ncurses
Computing installation plan...
The following packages will be built and installed:
ncurses[core]:x86-windows -> 6.2#1
Detecting compiler hash for triplet x86-windows...
Could not locate cached archive: C:\Users\laaou\AppData\Local\vcpkg\archives\b1\b1b913bc50ef64f802436d916589a69cf7c714cfce6f1d784a583d5c2ab8928f.zip
Starting package 1/1: ncurses:x86-windows
Building package ncurses[core]:x86-windows...
CMake Error at scripts/cmake/vcpkg_fail_port_install.cmake:96 (message):
Target 'Windows' not supported by ncurses!
Call Stack (most recent call first):
ports/ncurses/portfile.cmake:1 (vcpkg_fail_port_install)
scripts/ports.cmake:141 (include)
Error: Building package ncurses:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: ncurses:x86-windows
Vcpkg version: 2021-08-12-85ab112d5ee102bc6eac8cdbbfdd173a71374e04
Additionally, attach any relevant sections from the log files above.
C:\Users\laaou\vcpkg>`

make*** error 126 when trying to compile rstan with Rtools 3.5/Rv3.5.1

I am using R v.3.5.1, R studio v 1.3.1093 with Rtools 3.5 on windows 10.
I know that R tools have been successfully installed and the toolchain has been found, having followed https://github.com/stan-dev/rstan/wiki/Configuring-C---Toolchain-for-Windows and successfully installing:
install.packages("jsonlite",type="source").
However, when I try and install rstan from source using
pkgbuild::with_build_tools(install.packages("rstan", type = "source"))
I get the following error message:
sh: C:/Rtools/mingw_32/bin/: Is a directory
make: *** [C:/PROGRA~1/R/R-35~1.1/etc/i386/Makeconf:215: sparse_extractors.o] Error 126
ERROR: compilation failed for package 'rstan'
* removing 'C:/R/library/rstan'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘rstan’ had non-zero exit status
Currently, my makevars.win file contains the following:
CXX14 = C:/Rtools/mingw_$(WIN)/bin/ g++ -std=c++1y
CXX14FLAGS = -O3 -Wno-unused-variable -Wno-unused-function
Although I have tried various different lines in the makevars file and all still bring up the error 126 message as above.
I can successfully install the binary versions of rstan/rstanarm/brms etc. But when I try and compile a model it fails. When I tried this and realised the binary versions were not working, I uninstalled rstan/rstanarm and brms before trying to install the source versions.
Any help fixing this error and successfully installing rstan would be greatly appreciated!
There is a space before g++ which causes the Makefile to execute the directory (which fails as it is not an executable).
Remove the space.

mxnet build with intel mkl always throw error "Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll."

os : windows 10 64bits
compiler : vc2015 64bits update 3
mxnet : 1.3.1
Building mxnet 1.3.1(mxnet1.4.0 has bugs, can't build it under windows,please check14203 for more details).
I can build the mxnet with cpp-package, but when I call the forward function o the Executor, it keep throwing
Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.
Following are my steps to build the mxnet
git clone --recursive https://github.com/apache/incubator-mxnet mxnet
cd mxnet
Download intel mkl(w_mkl_2019.2.190.exe)
install it
open cmake3.11.0
I disable cpp_package,opencv,cuda,USE_MKLML_MKL(else mshadow will use openBLAS).
I disable USE_TENSORRT and USE_VTUNE too
press configure,disable BUILD_TESTING
press configure again, all green
press generate,all green
open ALL_BUILD.vcxproj
Select Release build
All build
All green, except install project fail
>file cannot create directory: C:/Program Files/mxnet/lib. Maybe need
1> administrative privileges.
Already open vc as admin, still the same error
Add Anaconda3 into PATH
Add libmxnet.dll and C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.2.190\windows\redist\intel64_win\mkl\mkl_rt.dll into a folder which could be found by the os
select build with cpp_package from cmake gui
configure->generate
reopen ALL_BUILD.vcxproj
Select ALL_BUILD->build
Because install do not work,I copy the files lib to build_cpu/install
Because lrs and wds of op.h do not declare type,I need to add mx_float for them
write a simple program, can compile
When I call forward of the Executor,the program throw Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.
Add C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.2.190\windows\redist\intel64_win\mkl的mkl_intel_thread.dll into the folder could be found by the os
26.Run again,still the same error Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.
My Anaconda3 install mxnet,it got mkl_intel_thread.dll and mkl_rt.dll too,I wonder there are confliction,problem is I did not add the bin path of Anaconda3 into the PATH.
I tried to copy different mkl_intel_thread.dll and mkl_rt.dll into the folder where the exe at, but every combination of them give me same error.
Those dll come from following path
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.2.190\windows\redist\intel64_win\mkl
C:\Users\yyyy\Anaconda3\envs\gluon\Library\bin
C:\Users\yyyy\Anaconda3\Library\bin
C:\Users\yyyy\Anaconda3\pkgs\mkl-2019.1-144\Library\bin
Do anyone know how to solve this issue?Thanks
This problem should be caused by static MKL linkage, here's some advice may helpful to you.
Have you ever tried to set environmental variable for pre-load libs,
Here is Linux
export LD_PRELOAD=/opt/intel/mkl/lib/intel64/libmkl_def.so:/opt/intel/mkl/lib/intel64/libmkl_avx2.so:/opt/intel/mkl/lib/intel64/libmkl_core.so:/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so:/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so:/opt/intel/lib/intel64_lin/libiomp5.so
In windows, setting env by mkl/bin/mklvars.bat intel64, then run your python in same environment
or in python to add the library manually sys.path.append(" your path to the library") or Pyinstaller numpy "Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll"...
If above suggestions did not help, please try to modify the 'CMakeList.txt' file, change line 44 ~ 47 to single-dynamic linkage and re-cmake to install:
if(MSVC)
set(LIBS ${LIBS} mkl_rt ${MKL_COMPILER_LIB_FILE} PARENT_SCOPE)
else()
set(LIBS ${LIBS} mkl_rt ${MKL_COMPILER_LIB_FILE} PARENT_SCOPE)

Can't build Boost 1.59 error: feature "deduced-address-model" : "32" "64" : "propagated" "optional" "composite" "hidden"

I unsuccessfully trying to build boost under osx
What I tried
git checkout boost-1.59.0
./bootstrap.sh
Building Boost.Build engine with toolset darwin... tools/build/src/engine/bin.macosxx86_64/b2
Detecting Python version... 2.7
Detecting Python root... /System/Library/Frameworks/Python.framework/Versions/2.7
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam...
Bootstrapping is done. To build, run:
./b2
To adjust configuration, edit 'project-config.jam'.
Further information:
- Command line help:
./b2 --help
- Getting started guide:
http://www.boost.org/more/getting_started/unix-variants.html
- Boost.Build documentation:
http://www.boost.org/build/doc/html/index.html
./b2
/Volumes/Data/Developers/Library/boost/tools/build/src/build/feature.jam:139: in feature.feature from module feature
error: unknown attributes: hidden
error: in feature declaration:
error: feature "deduced-address-model" : "32" "64" : "propagated" "optional" "composite" "hidden"
/Volumes/Data/Developers/Library/boost/boostcpp.jam:611: in load from module boostcpp
/Volumes/Data/Developers/Library/boost/tools/build/src/kernel/modules.jam:289: in modules.import from module modules
/Volumes/Data/Developers/Library/boost/tools/build/src/build/project.jam:1024: in import from module Jamfile</Volumes/Data/Developers/Library/boost>
Jamroot:124: in modules.load from module Jamfile</Volumes/Data/Developers/Library/boost>
/Volumes/Data/Developers/Library/boost/tools/build/src/build/project.jam:311: in load-jamfile from module project
/Volumes/Data/Developers/Library/boost/tools/build/src/build/project.jam:64: in load from module project
/Volumes/Data/Developers/Library/boost/tools/build/src/build/project.jam:145: in project.find from module project
/Volumes/Data/Developers/Library/boost/tools/build/src/build-system.jam:535: in load from module build-system
/Volumes/Data/Developers/Library/boost/tools/build/src/kernel/modules.jam:289: in import from module modules
/Volumes/Data/Developers/Library/boost/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
/Volumes/Data/Developers/Library/boost/boost-build.jam:17: in module scope from module
So can someone explain what this error means? How to fix it?
* Solution *
I forgot to update submodules, my fault
No that is really strange!
What commands are you passing to build? (or is that literally the default?)
I recommend trying out one of my build scripts here:
https://github.com/danoli3/ofxOSXBoost
If that doesn't work either it may be a system conflict.
Do you have Homebrew or Macports installed? See if they have a Boost version installed.