make: *** [Makefile:108: install] Error 1

I have been getting this error for a while and a lot of discussions where they had this error, they got a directory in the brackets .
I got this error after trying “sudo make install”
this is the full log except for warnings:

  Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
  EXTERNAL/cmake_install.cmake:42 (include)
  cmake_install.cmake:80 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at EXTERNAL/freeglut/cmake_install.cmake:41 (if):
  if given arguments:

    "EXISTS" "/home/moajouz/AUB/HSLAM/Thirdparty/CompiledLibs/lib/libg2o_ext_freeglut_minimal" ".so" "AND" "NOT" "IS_SYMLINK" "/home/moajouz/AUB/HSLAM/Thirdparty/CompiledLibs/lib/libg2o_ext_freeglut_minimal" ".so"

  Unknown arguments specified
Call Stack (most recent call first):
  EXTERNAL/cmake_install.cmake:42 (include)
  cmake_install.cmake:80 (include)


make: *** [Makefile:108: install] Error 1

I just want to know where I should look to find the error and try fixing it

The keywords used inside the if condition are:

  • EXISTS
  • AND NOT IS_SYMLINK

Both expect 1 path or filename. But as you can see, there were given two arguments, a base name and an extension.
So you probably have a superfluous space somewhere in your filename definition, which effectively makes a list.

First sorry for the late reply I had a busy 24hrs.

The line below is the line at

EXTERNAL/freeglut/cmake_install.cmake

  if(EXISTS "$ENV{DESTDIR}/home/moajouz/AUB/HSLAM/Thirdparty/CompiledLibs/lib/libg2o_ext_freeglut_minimal"".so" AND
     NOT IS_SYMLINK "$ENV{DESTDIR}/home/moajouz/AUB/HSLAM/Thirdparty/CompiledLibs/lib/libg2o_ext_freeglut_minimal"".so")

so what I did was check

/home/moajouz/AUB/HSLAM/Thirdparty/CompiledLibs/lib/

and I found the file named *libg2o_ext_freeglut_minimal.so

what I did try was remove the “” between minimal and .so but it did not work, so I tried removing $ENV{DESTDIR} before /home and it also gave me the same error.

I am new to this so I did not understand what you meant by superfluous space except for the quotations that I removed but put again.

The "" in the middle of the path makes two arguments. CMake doesn’t do Bash’s embedded quote syntax; the code generating this needs to be checked. Can you find the install() command in the CMake project code that corresponds to this?

if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "/home/moajouz/AUB/HSLAM/Thirdparty/CompiledLibs/include/g2o/freeglut/freeglut_minimal.h")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
file(INSTALL DESTINATION "/home/moajouz/AUB/HSLAM/Thirdparty/CompiledLibs/include/g2o/freeglut" TYPE FILE FILES "/home/moajouz/AUB/HSLAM/Thirdparty/g2o/EXTERNAL/freeglut/freeglut_minimal.h")
endif()

at the last line there’s the INSTALL DESTiNATION and all around the file there’s Cmake_Install_COMPONENT

Where is the command that tries to install libg2o_ext_freeglut_minimal.so?

it must be in another one, this system is kind of deep. But as I said on top that the file do exist in the specified directory

The complaint is about the destination not existing.

that’s exactly my problem, the destination and the file both exist but I am getting this error.
someone else installed the same thing as me and it worked for him, so I am kind of baffeled on the problem

Wait, sorry, I got this confused with another thread I read today. The problem is the "" in the middle of the argument. CMake is parsing it as EXISTS "$ENV{DESTDIR}/home/blah/blah" ".so" which is not valid syntax for the EXISTS predicate of a conditional expression.

Problem fixed, what I did was ignore the modification on these 2 lines in ccmake. :

- CMAKE_RELWITHDEBINFO_POSTFIX : ""
- CMAKE_MINSIZEREL_POSTFIX : ""

so instead of “” I left it empty