buzz-lang / Buzz

A programming language designed for robot swarms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMake fail on compilation

brownem opened this issue · comments

Installing Buzz, cmake ../src fails with:

-- checking for module 'argos3_simulator'
--   package 'argos3_simulator' not found
CMake Error at utility/CMakeLists.txt:40 (install):
  Syntax error in cmake code at

    /home/<usr>/buzz/src/utility/CMakeLists.txt:40

  when parsing string

    execute_process( \
      COMMAND ${CMAKE_COMMAND} -E create_symlink \
      ${CMAKE_INSTALL_PREFIX}/share/buzz/cmake/FindBuzz.cmake \
      ${CMAKE_ROOT}/Modules/FindBuzz.cmake   \
      )

  syntax error, unexpected cal_SYMBOL, expecting $end (32)

I'm guessing that it is the obvious, and that I am missing the argos3_simulator, but I have it installed on my system under /home/<usr>/argos3. Reading through the relevant CMakeOutput.log doesn't reveal much to me, it is long but I can post it if it would help. Reading the installation directions, it sounds like ARGoS is optional, so I am not sure why the Buzz compiler not finding ARGoS would result in a critical failure during compilation.

Any thoughts as to a work around/solution?

System

  • Ubuntu 14.04
  • CMake 2.8.12.2
  • gcc 6.3.0

It's not an issue related to ARGoS - the error output complains about a syntax error in the CMakeLists.txt file. It looks like that string is not parsed correctly in CMake 2.8.12.2, probably due to a parser bug in that version. I'll probably be forced to require a more recent version of CMake.

Try removing the \ characters, maybe this solves the issue. If so, please let me know.

If this fails again, just run these commands:

cd buzz # this is the base directory of buzz
rm -rf build # delete build directory
mkdir build
cd build
cmake -DBUZZ_SYMLINK_CMAKE_SCRIPTS=OFF -DCMAKE_BUILD_TYPE=Release ../src
make
sudo make install

Deleting all \ characters from lines 39 through 48 allows CMake to complete, as well as the rest of the build process. CMake file now looks like:

#
# Install CMake modules and scripts
#
install(FILES FindBuzz.cmake UseBuzz.cmake DESTINATION share/buzz/cmake)
if(BUZZ_SYMLINK_CMAKE_SCRIPTS)
  install(CODE "execute_process( 
    COMMAND ${CMAKE_COMMAND} -E create_symlink 
    ${CMAKE_INSTALL_PREFIX}/share/buzz/cmake/FindBuzz.cmake 
    ${CMAKE_ROOT}/Modules/FindBuzz.cmake   
    )")
  install(CODE "execute_process( 
    COMMAND ${CMAKE_COMMAND} -E create_symlink 
    ${CMAKE_INSTALL_PREFIX}/share/buzz/cmake/UseBuzz.cmake 
    ${CMAKE_ROOT}/Modules/UseBuzz.cmake   
    )")
endif(BUZZ_SYMLINK_CMAKE_SCRIPTS)

sudo make install also completes successfully. However sudo ldconfig seems to fail with output:

/sbin/ldconfig.real: /usr/lib/nvidia-384/libEGL.so.1 is not a symbolic link

/sbin/ldconfig.real: /usr/lib32/nvidia-384/libEGL.so.1 is not a symbolic link

Perhaps I misunderstood the final step? It is supposed to be completed inside of the ~/buzz/build directly, correct?

Why do you say that sudo ldconfig failed? That does not look like an error message. It does not matter where you run ldconfig, because its purpose is to update the system library path database.

I interpreted the "not symbolic link" part of the message as an indication of an unexpected result, but if you say it is normal, then it completed as expected.

Thanks for the help.