首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CMake:“错误:包[.]构建失败”,m4 build()方法中的错误

CMake:“错误:包[.]构建失败”,m4 build()方法中的错误
EN

Ask Ubuntu用户
提问于 2022-11-16 15:52:11
回答 1查看 394关注 0票数 0

我正试图为我的工作安装一个定制的软件。我下载了源代码,在文件夹中输入了$ cmake ..。在阅读了AskUbuntu答案之后,我推断出问题来自于我的m4安装。我刚刚安装了m4,但是没有什么改变。当我运行CMake时,我拥有以下内容:

代码语言:javascript
复制
$ 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".

快把我逼疯了。我花了几个小时环顾四周,重新安装m4等,但我仍然无法构建这个软件。

CMakeOutput.log文件很长,我说是这里

如果有人有解决办法或指示,我就接受!提前谢谢。I应该添加WSL2在Windows 11上使用Ubuntu 20

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2022-11-24 13:25:17

在经历了很多麻烦之后,我开始工作了。我联系了开发我想要安装的应用程序的人。他们告诉我更新CMakeLists.txt中的需求:

代码语言:javascript
复制
set(CMAKE_CXX_STANDARD 17)

conanfile.txt

代码语言:javascript
复制
[requires] fmt/7.1.0 
nlohmann_json/3.9.1 
libpcap/1.10.1 
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1441070

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档