Poco compilation error cannot find - starlet.h - compilation

I am trying to compile Poco 1.6.1-all and having an issue as starlet.sh is not found (referenced from Foundation/src/OpcomChannel.cpp:19:10), when running cmake --build . from cmake-build folder.
How I am procced:
clone project
cd to poco folder
mkdir cmake-build
cd cmake-build
cmake ..
cmake --build .

Related

"DllRegisterServer entry-point" error when registering mongoc-1.0.dll and bson-1.0.dll

I had downloaded the files for MongoDB's C drivers and appear to have successfully compiled and installed them according to the publisher's instructions, using Visual Studio 2019 Community. However, after several attempts, the resulting mongoc-1.0.dll continues to fail to register with regsvr32.exe.
I've run the command as administrator, from the system32 folder, as well as the syswow64 folder, with and without the full path to the library, but it keeps throwing either the module failed to load error, or the module was loaded but the entry-point DllRegisterServer was not found.
Here are the three attempts, all of which competed without errors:
attempt 1:
cmake -G "Visual Studio 16 2019" \ "-DCMAKE_INSTALL_PREFIX=E:\mongo\mongo-cxx-driver" \ "-DCMAKE_PREFIX_PATH=E:\mongo\mongo-cxx-driver" \ ..
cmake --build . --config RelWithDebInfo
cmake --build . --config RelWithDebInfo --target install
attempt 2:
cmake -G "Visual Studio 16 2019" \ "-DCMAKE_INSTALL_PREFIX=E:\mongo\mongo-cxx-driver" \ "-DCMAKE_PREFIX_PATH=E:\mongo\mongo-cxx-driver" \ ..
cmake --build . --config Release
cmake --build . --config Release--target install
attempt 3:
cmake -DCMAKE_BUILD_TYPE=Release \ -DLIBBSON_DIR=E:\mongo\mongo-c-driver-1.17.4\src\libbson \ -DLIBMONGOC_DIR=E:\mongo\mongo-c-driver-1.17.4\src\mongoc \ -DCMAKE_INSTALL_PREFIX=E:\mongo\mongo-cxx-driver ..
msbuild.exe ALL_BUILD.vcxproj
msbuild.exe INSTALL.vcxproj
What could I be doing wrong? TIA.
UPDATE: Dependency Walker showed these errors:
At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
At least one delay-load dependency module was not found.
I have no clue how to proceed. Any assistance is appreciated.

Why Clang and LLVM is giving math.h error in Mac OS/Xcode

I am trying to build clang and LLVM 9.X on MacOS using source files. I am doing following steps on terminal:
git checkout origin/release/9.x
cd llvm-project
mkdir build
cd build
cmake -DLLVM_ENABLE_PROJECTS=clang -G "Xcode" ../llvm
cmake --build .
sudo cmake --build . --target install
However, when I am enabling CC flag in Xcode, and giving path to clang binary inside build folder, and building code, it is giving me following error:
cmath.h not found
could not build simd.h
Please help, i think I am missing some steps.
enter image description here

Building clang from source code on Ubuntu and Windows

Its been a While that I tried to build clang from source code.
I tried with 2 platforms
a> Ubuntu
b> Windows
I am following the link http://clang.llvm.org/docs/LibASTMatchersTutorial.html
Ubuntu
$ mkdir build
$ cd build
$ cmake -GNinja -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ /path/to/source/llvm
After this in build directory ninja.build files generated along with some more folder
$ ninja after this command inside build directory bin folder can be seen and it contains all the clang executables clang,clang++,clang-check and many more.
Windows
I tried every option that is available to build clang from source
I am trying on developer command prompt and also I am having VS Express edition
> mkdir build
> cd build
> cmake -GNinja -DCMAKE_BUILD_TYPE=release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ path-to-llvm
It throws error
Host compiler appears to require libatomic,but cannot find it.
So I tried in the another way by making DCMAKE_CXX_COMPILER and DCMAKE_C_COMPILER as clang-cl.exe
> cmake -GNinja -DCMAKE_BUILD_TYPE=release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe path-to-llvm
It didnt show any error at first but later while building
atlbase.h file not found
Why it is that much difficult to build clang from source on windows.?
Is this the correct procedure that I am doing?
Kindly help with any solution.

cmake building external library from github submodule

I am trying to build a sample c++ project with cmake which depends on the external Pisatche library hosted in github. Installation guide list the following steps:
git clone https://github.com/oktal/pistache.git
git submodule update --init
cd pistache
mkdir -p {build,prefix}
cd build
cmake -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DPISTACHE_BUILD_EXAMPLES=true \
-DPISTACHE_BUILD_TESTS=true \
-DPISTACHE_BUILD_DOCS=false \
-DPISTACHE_USE_SSL=true \
-DCMAKE_INSTALL_PREFIX=$PWD/../prefix \
../
make -j
make install
I would like to install this library from inside cmake and then link it to my executable. Any ideas how to do it?

Visual Studio from CMake - Debug/Release not found

A gitlab-runner configuration script .gitlab-ci.yml, for execution in the Powershell:
windows:
tags:
- windows
stage: build
script:
- New-Item -ItemType "directory" -Confirm:$false -Force:$true -Name "build"
- cd build
- cmd.exe "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- cmake -G "Visual Studio 15 2017" -A x64 -T host=x64 -B. ..
- cmake -j8 --build . --config Debug
- ctest -j4
results in
$ cmd.exe "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
[...]
-- Configuring done
-- Generating done
-- Build files have been written to: C:/gitlab-runner/builds/xxxxxxxx/build
$ cmake -j8 --build . --config Debug
CMake Error: The source directory "C:/gitlab-runner/builds/xxxxxxxx/build/Debug" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
ERROR: Job failed: exit status 1
How to resolve this conflict between the configure step (cmake) and
the build step (cmake --build)?
The latter won't work without the option --config Debug;
but if that option is given, then it looks for a nonexistent directory.
Same problem with --config Release.
Disclosure: cross-posting from the CMake mailing list.
The ordering of command line arguments to cmake matters in this case. For build mode, the --build option must be the first one listed, but the -j8 option has been put before it. Change the build command to the following and it should work:
cmake --build . --config Debug -j8
The ordering requirement is documented for the --build option in the Build A Project section of the cmake manual.

Resources