I am trying to install a custom piece of software for my job. I downloaded the source, went inside the folder and typed $ cmake ..
. After reading AskUbuntu answers, I deduced the problem comes from my m4 installation. I freshly installed m4, but nothing changes. When I run CMake, I have this:
$ cmake ..
-- Conan: Automatic detection of conan settings from cmake
-- Conan: Settings= -pr;default
-- Conan executing: conan install /home/user/app/conanfile.txt -pr default -g=cmake --build=outdated --no-imports
-- Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9.4
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
asio/1.16.0: Package is up to date
[...]
CC freadahead.o
CC fseek.o
CC fseeko.o
CC mbrtowc.o
CC obstack.o
freadahead.c: In function 'freadahead':
freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
92 | #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
| ^~~~~
make[3]: *** [Makefile:1910: freadahead.o] Error 1
make[3]: *** Waiting for unfinished jobs....
fseeko.c: In function 'rpl_fseeko':
fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
110 | #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
| ^~~~~
make[3]: *** [Makefile:1910: fseeko.o] Error 1
make[3]: Leaving directory '/home/user/.conan/data/m4_installer/1.4.18/bincrafters/stable/build/44fcf6b9a7fb86b2586303e3db40189d3b511830/source_subfolder/lib'
make[2]: *** [Makefile:1674: all] Error 2
make[2]: Leaving directory '/home/user/.conan/data/m4_installer/1.4.18/bincrafters/stable/build/44fcf6b9a7fb86b2586303e3db40189d3b511830/source_subfolder/lib'
make[1]: *** [Makefile:1572: all-recursive] Error 1
make[1]: Leaving directory '/home/user/.conan/data/m4_installer/1.4.18/bincrafters/stable/build/44fcf6b9a7fb86b2586303e3db40189d3b511830/source_subfolder'
make: *** [Makefile:1528: all] Error 2
m4_installer/1.4.18@bincrafters/stable:
jsonformoderncpp/3.7.0: WARN: Recipe 'jsonformoderncpp/3.7.0' is deprecated in favor of 'nlohmann_json'. Please, consider changing your requirements.
m4_installer/1.4.18@bincrafters/stable: WARN: Package binary is corrupted, removing: 44fcf6b9a7fb86b2586303e3db40189d3b511830
m4_installer/1.4.18@bincrafters/stable: WARN: Build folder is dirty, removing it: /home/user/.conan/data/m4_installer/1.4.18/bincrafters/stable/build/44fcf6b9a7fb86b2586303e3db40189d3b511830
m4_installer/1.4.18@bincrafters/stable: ERROR: Package '44fcf6b9a7fb86b2586303e3db40189d3b511830' build failed
m4_installer/1.4.18@bincrafters/stable: WARN: Build folder /home/user/.conan/data/m4_installer/1.4.18/bincrafters/stable/build/44fcf6b9a7fb86b2586303e3db40189d3b511830
ERROR: m4_installer/1.4.18@bincrafters/stable: Error in build() method, line 41
env_build.make()
ConanException: Error 2 while executing make -j8
CMake Error at cmake/modules/conan.cmake:371 (message):
Conan install failed='1'
Call Stack (most recent call first):
cmake/modules/conan.cmake:451 (conan_cmake_install)
CMakeLists.txt:26 (conan_cmake_run)
-- Configuring incomplete, errors occurred!
See also "/home/user/app/build/CMakeFiles/CMakeOutput.log".
This is driving me crazy. I spent hours looking around, reinstalling m4 etc, but I still can't build this software.
The CMakeOutput.log file is very long, I put it here.
If anyone has a solution or pointers, I'll take it! Thanks in advance. I should add that I'm using WSL2 on Windows 11 with Ubuntu 20.