cmake in cygwin: cyglto_plugin.dll not found - cygwin

I am trying to get a Fortran 90 program to compile under Windows. I have already successfully done so under Linux.
I am using the 'Babun' windows shell, which is basically a wrapper for cygwin: https://github.com/babun/babun
When I try and run cmake, I get the following:
-- The Fortran compiler identification is GNU
-- Check for working Fortran compiler: /usr/bin/gfortran.exe
-- Check for working Fortran compiler: /usr/bin/gfortran.exe -- broken
CMake Error at /usr/share/cmake-2.8.9/Modules/CMakeTestFortranCompiler.cmake:40 (MESSAGE):
The Fortran compiler "/usr/bin/gfortran.exe" is not able to compile a
simple test program.
It fails with the following output:
Change Dir: /cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make.exe "cmTryCompileExec674739544/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec674739544.dir/build.make
CMakeFiles/cmTryCompileExec674739544.dir/build
make[1]: Entering directory
'/cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake.exe -E cmake_progress_report
/cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp/CMakeFiles
1
Building Fortran object
CMakeFiles/cmTryCompileExec674739544.dir/testFortranCompiler.f.o
/usr/bin/gfortran.exe -c
/cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp/testFortranCompiler.f
-o CMakeFiles/cmTryCompileExec674739544.dir/testFortranCompiler.f.o
Linking Fortran executable cmTryCompileExec674739544.exe
/usr/bin/cmake.exe -E cmake_link_script
CMakeFiles/cmTryCompileExec674739544.dir/link.txt --verbose=1
/usr/bin/gfortran.exe -Wl,--enable-auto-import
CMakeFiles/cmTryCompileExec674739544.dir/testFortranCompiler.f.o -o
cmTryCompileExec674739544.exe
-Wl,--out-implib,libcmTryCompileExec674739544.dll.a
-Wl,--major-image-version,0,--minor-image-version,0
gfortran: fatal error: -fuse-linker-plugin, but cyglto_plugin.dll not found
compilation terminated.
CMakeFiles/cmTryCompileExec674739544.dir/build.make:83: recipe for target
'cmTryCompileExec674739544.exe' failed
make[1]: *** [cmTryCompileExec674739544.exe] Error 1
make[1]: Leaving directory
'/cygdrive/d/Users/bob/code/vasa/build/CMakeFiles/CMakeTmp'
Makefile:117: recipe for target 'cmTryCompileExec674739544/fast' failed
make: *** [cmTryCompileExec674739544/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (enable_language)
What package does this cyglto_plugin.dll belong to? What dependencies am I missing?
Thanks!

Related

ERRO Linux Mint "Check for working C compiler: /usr/bin/cc "

i want to use virtual camera on linux with obs studio. i see this package https://github.com/CatxFish/obs-v4l2sink
i ran
sudo apt install qtbase5-dev
sudo apt install libobs-dev
git clone --recursive https://github.com/obsproject/obs-studio.git
git clone https://github.com/CatxFish/obs-v4l2sink.git cd obs-v4l2sink mkdir build && cd build cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
when i ran cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
i got error
`-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/arp/obs-v4l2sink/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_a18d3/fast && /usr/bin/make -f CMakeFiles/cmTC_a18d3.dir/build.make CMakeFiles/cmTC_a18d3.dir/build
make[1]: Entering directory '/home/arp/obs-v4l2sink/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a18d3.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_a18d3.dir/testCCompiler.c.o -c /home/arp/obs-v4l2sink/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_a18d3
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a18d3.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_a18d3.dir/testCCompiler.c.o -o cmTC_a18d3
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_a18d3.dir/build.make:87: cmTC_a18d3] Error 1
make[1]: Leaving directory '/home/arp/obs-v4l2sink/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a18d3/fast] Error 2
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)
CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred! See also "/home/arp/obs-v4l2sink/build/CMakeFiles/CMakeOutput.log". See also "/home/arp/obs-v4l2sink/build/CMakeFiles/CMakeError.log".
i have seen some articles. but nothing changes.
anyone can help me?

CMake 3.15.5 bootstrap fail with g++ 9.3.0

I'm trying to build CMake 3.15.5 on a 20.04 xubuntu machine (but I also tried 18.04 and 20.10 with the same results).
The error is as follows:
loading initial cache file /home/max/Lavori/nova/src/repos/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/Bootstrap.cmk/InitialCacheFlags.cmake
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking if compiler supports C11 _Thread_local
-- Checking if compiler supports C11 _Thread_local - yes
-- Checking if compiler supports needed C++17 constructs
-- Checking if compiler supports needed C++17 constructs - yes
-- Checking if compiler supports C++ make_unique
-- Checking if compiler supports C++ make_unique - no
-- Checking if compiler supports C++ unique_ptr
-- Checking if compiler supports C++ unique_ptr - no
CMake Error at CMakeLists.txt:92 (message):
The C++ compiler does not support C++11 (e.g. std::unique_ptr).
-- Configuring incomplete, errors occurred!
See also "/home/max/Lavori/nova/src/repos/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeOutput.log".
See also "/home/max/Lavori/nova/src/repos/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
I am absolutely sure that g++ 9.3.0 supports C++11, so where could the problem be?
(EDIT: added CMakeError.log)
Here is the CMakeError.log file:
Determining if compiler supports C++ make_unique failed with the following output:
Change Dir: /home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_f5a77/fast && make[2]: Entering directory '/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp'
make[2]: Warning: File 'Makefile' has modification time 0,27 s in the future
make -f CMakeFiles/cmTC_f5a77.dir/build.make CMakeFiles/cmTC_f5a77.dir/build
make[3]: Entering directory '/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp'
make[3]: Warning: File 'CMakeFiles/cmTC_f5a77.dir/flags.make' has modification time 0,26 s in the future
Building CXX object CMakeFiles/cmTC_f5a77.dir/cm_cxx_make_unique.cxx.o
/usr/bin/g++ -O2 -std=gnu++17 -o CMakeFiles/cmTC_f5a77.dir/cm_cxx_make_unique.cxx.o -c /home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/Source/Checks/cm_cxx_make_unique.cxx
Linking CXX executable cmTC_f5a77
/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/cmTC_f5a77.dir/link.txt --verbose=1
/usr/bin/g++ -O2 -L/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/host/lib -Wl,-rpath,/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/host/lib CMakeFiles/cmTC_f5a77.dir/cm_cxx_make_unique.cxx.o -o cmTC_f5a77
make[3]: warning: Clock skew detected. Your build may be incomplete.
make[3]: Leaving directory '/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp'
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Leaving directory '/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp'
Determining if compiler supports C++ unique_ptr failed with the following output:
Change Dir: /home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_02c6e/fast && make[2]: Entering directory '/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp'
make[2]: Warning: File 'Makefile' has modification time 0,27 s in the future
make -f CMakeFiles/cmTC_02c6e.dir/build.make CMakeFiles/cmTC_02c6e.dir/build
make[3]: Entering directory '/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp'
make[3]: Warning: File 'CMakeFiles/cmTC_02c6e.dir/flags.make' has modification time 0,26 s in the future
Building CXX object CMakeFiles/cmTC_02c6e.dir/cm_cxx_unique_ptr.cxx.o
/usr/bin/g++ -O2 -std=gnu++17 -o CMakeFiles/cmTC_02c6e.dir/cm_cxx_unique_ptr.cxx.o -c /home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/Source/Checks/cm_cxx_unique_ptr.cxx
Linking CXX executable cmTC_02c6e
/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/cmTC_02c6e.dir/link.txt --verbose=1
/usr/bin/g++ -O2 -L/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/host/lib -Wl,-rpath,/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/host/lib CMakeFiles/cmTC_02c6e.dir/cm_cxx_unique_ptr.cxx.o -o cmTC_02c6e
make[3]: warning: Clock skew detected. Your build may be incomplete.
make[3]: Leaving directory '/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp'
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Leaving directory '/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/CMakeFiles/CMakeTmp'
I cannot figure out wath is wrong.
I thought it could be a clock skew problem but I tried also outside a virtual machine with identical results.
I also tried to compile and link by hand without any errors or warnings.
/usr/bin/g++ -O2 -std=gnu++17 -o cm_cxx_make_unique.cxx.o -c /home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/build/host-cmake-3.15.5/Source/Checks/cm_cxx_make_unique.cxx
/usr/bin/g++ -O2 -L/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/host/lib -Wl,-rpath,/home/max/Lavori/nova/srcs/repo/dep-startup/buildroot-output/buildroot-2020.02.1/output/host/lib cm_cxx_make_unique.cxx.o -o cmTC_f5a77
I also tried to run the binary without errors.
So even more 'I can not figure out what is wrong
Has same error when use Linux virtual machine (VMware) and when sources placed in shared folder. When move sources to user folder all configured successfully.

GCC 5.3 failing in the make phase

Currently I have GCC 5.4.0-6 installed on my Ubuntu 16.04.4 machine. However nvcc wants me to use 5.3, so I am trying to install that version as well. I did this by:
1. downloading gcc-5.3.0.tar.gz
2. extracting it to ~/Documents/libraryDownloads/GCC-5/gcc-5.3.0
3. creating the folder ~/Documents/libraryDownloads/GCC-5/gcc-build
4. In ~/Documents/libraryDownloads/GCC-5/gcc-5.3.0 I used the command ./contrib/download_prerequisites.
5. In ~/Documents/libraryDownloads/GCC-5/gcc-build I used the command ./../gcc-5.3.0/configure --enable-multilib
6. and finally in ~/Documents/libraryDownloads/GCC-5/gcc-build I used the command make
The make-process rand for a short while and then ended with the following error:
checking whether the gcc -m32 linker (ld -m elf_x86_64 -m elf_i386) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
Makefile:10699: recipe for target 'configure-stage1-zlib' failed
make[2]: *** [configure-stage1-zlib] Error 1
make[2]: Leaving directory '/home/myUser/Documents/libraryDownloads/GCC-5/gcc-build'
Makefile:22461: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/home/myUser/Documents/libraryDownloads/GCC-5/gcc-build'
Makefile:902: recipe for target 'all' failed
make: *** [all] Error 2
As far as I know, I have all prerequisites installed and I am doing all this in a separate build folder as recommended. I tried searching for error: Link tests are not allowed after GCC_NO_EXECUTABLES., but I couldn't find anyone with similar problems. Does anyone know what could be the cause of this error?

How to solve "cstring: No such file or directory" when compiling gcc from source?

I am trying to compile a gcc from source since I cannot use yum, apt-get and so forth. My steps are simple:
-I download the source GCC (I tried gcc-4.8.4 and gcc-5.3.0) in my pc and I used:
./contrib/download_prerequisites
-After this, I send this my gcc source file to my system using powerPC y Linux.
mkdir objdir
cd objdir
../gcc-4.6.2/configure --prefix=/usr --enable-languages=c,c++,fortran,go
make
I have got the next error:
In file included from ../../gcc-4.9.2/gcc/genmddeps.c:19:0:
../../gcc-4.9.2/gcc/system.h:205:20: fatal error: cstring: No such file or directory
# include <cstring>
^
compilation terminated.
make[3]: *** [build/genmddeps.o] Error 1
make[3]: Leaving directory `/home/root/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/root/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/root/build'
make: *** [all] Error 2
Any idea about what it is going wrong?
Best regards
Some advice: first, compile (notably for learning purposes) something simpler than GCC, e.g. GNU make if you never compiled GNU stuff from source code.
Then compile a recent GCC (so 5.3 in january 2016) - building issues would be the same with 4.8, and GCC 5 is better! You need the gcc & libc-dev & g++ & libstdc++-dev for your host machine (the one running your future cross-compiler). I am not sure your --prefix=/usr is a good idea. Consider perhaps a --program-suffix=-mine option (otherwise, your system's /usr/bin/gcc could be overwritten, which you don't want to happen)
You could leave the default --prefix=/usr/local and later add appropriately /usr/local/bin/ into your PATH

Building icu4c fails due to missing findBasename

I try to cross-compiler icu4c 51.1 with Emscripten (clang) via
emconfigure source/configure --host=i386-pc-linux-gnu --prefix=${myprefix} --enable-static --disable-shared --disable-dyload --disable-renaming CXXFLAGS='-DU_USING_ICU_NAMESPACE=0' CPPFLAGS='-DU_DISABLE_RENAMING=1'
emmake make
emmake make install
It compiles most of the sources fine, but fails with
Unpacking ../source/data/in/icudt51l.dat and generating out/tmp/icudata.lst (list of data files)
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg -d ./out/build/icudt51l --list -x \* ../source/data/in/icudt51l.dat -o out/tmp/icudata.lst
run-detectors: warning: unable to exec /usr/bin/lli-2.8: No such file or directory
run-detectors: warning: unable to exec /usr/bin/lli-2.9: No such file or directory
LLVM ERROR: Program used external function 'findBasename' which could not be resolved!
make[1]: *** [out/tmp/icudata.lst] Error 1
make[1]: Leaving directory `/home/andreas/.emscripten-libs/sources/icu4c/51.1/data'
make: *** [all-recursive] Error 2
So I am wondering, where it tries to find findBasename and what this data compiling is all about.
EDIT:
The error messages come from icupkg being built with clang, which does not make sense in this case. How can I specifc that the libraries are built with clang, but the tools with another compiler?
Sounds like it wasn't able to find, I'm guessing, ICU tool utilities lib in ../lib - might try running ldd or equivalent on icupkg

Resources