0

我正在尝试构建一个包含 UCL 的项目,据我所知,这里的错误可以通过设置std=gnu90UCL 项目来解决。

但是,为 C 版本添加标志会导致错误,指出找不到文件。需要修复什么?

configure:2091: gcc "-std=gnu90"   conftest.c  >&5
gcc: error: "-std=gnu90": No such file or directory
checking whether your compiler passes the ACC conformance test... FAILED
configure: 
configure: Your compiler failed the ACC conformance test - for details see 
configure: `config.log'. Please check that log file and consider sending
configure: a patch or bug-report to <markus@oberhumer.com>.
configure: Thanks for your support.
configure: 
configure: error: ACC conformance test failed. Stop.

我试图添加set(UCL_CFLAGS "-std=GNU90")到处理这个项目的块中,但是在 config.log 中我看到 UCL_CFLAGS 变量仍然是空的。

set(UCL_VERSION 1.03)
set(UCL_URL "${THIRD_PARTY_DIRECTORY}/ucl-${UCL_VERSION}.tar.gz" CACHE STRING "URL to the UCL")
set(UCL_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/UCL)
set(UCL_PREFIX_DIR  ${UCL_INSTALL_DIR})

ExternalProject_Add(ucl
  URL               ${UCL_URL}
  PREFIX            ${UCL_PREFIX_DIR}
  CONFIGURE_COMMAND CFLAGS="-std=gnu90" ${UCL_PREFIX_DIR}/src/ucl/configure --prefix=${UCL_INSTALL_DIR} --with-pic  BUILD_IN_SOURCE   1
  BUILD_IN_SOURCE   1
  UPDATE_COMMAND    ""
  BUILD_ALWAYS      0
)
include_directories("${UCL_INSTALL_DIR}/include")

我以此作为参考: https ://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/ucl

Cmakelist 和项目位于此处:https ://github.com/quarkslab/legu_unpacker_2019/blob/master/pylegu/CMakeLists.txt

4

0 回答 0