0

I am trying to build a project that includes UCL, and from what I have been able to figure out the error here can be resolved by setting std=gnu90 for the UCL project.

However, adding the flag for the C version causes an error stating that the file is not found. What needs to be fixed?

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.

I tried to add set(UCL_CFLAGS "-std=GNU90") to the block that deals with this project, but looking in the config.log I see that the UCL_CFLAGS varible is still empty.

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")

I used this as a reference : https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/ucl

The Cmakelist and the project is located here : https://github.com/quarkslab/legu_unpacker_2019/blob/master/pylegu/CMakeLists.txt

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
Bob R
  • 605
  • 1
  • 13
  • 25
  • Try `CONFIGURE_COMMAND CFLAGS="-std=gnu90" ${UCL_PREFIX_DIR}/src/ucl/configure --prefix=${UCL_INSTALL_DIR} --with-pic` – kaylum Jul 19 '20 at 22:50
  • @kaylum that didn't work, its giving me an error about```configure:2088: checking for C compiler default output file name configure:2091: gcc "-std=gnu90" conftest.c >&5 gcc: error: "-std=gnu90": No such file or directory``` – Bob R Jul 19 '20 at 23:51
  • Try with quotes removed. `CFLAGS=-std=gnu90` – kaylum Jul 19 '20 at 23:52
  • @kaylum Thank you! That was it. – Bob R Jul 19 '20 at 23:58
  • @Tsyvarev do you mind reopening my question, I changed it. – Bob R Jul 20 '20 at 00:01
  • Both your question and the duplicate one are about passing environment variable to the `CONFIGURE_COMMAND`. Why should I reopen the question? If you know another way for solve your problem, you could add an answer to the duplicate question - it also could be solved such way. – Tsyvarev Jul 20 '20 at 00:07

0 Answers0