Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Cannot install (cmake errors)  (Read 20448 times)

0 Members and 1 Guest are viewing this topic.

Shiro Ulv

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 1
  • everyone's favorite wuffwuff
    • HowlNET IRC
Cannot install (cmake errors)
« on: September 17, 2012, 08:06:19 PM »

I am not able to install Anope, I receive cmake errors and configuration is incomplete.

Quote
Saving configuration results in config.cache... done.
cmake  -DINSTDIR:STRING=/home/irc/services  -DDEFUMASK:STRING=077 -DCMAKE_BUILD_                              TYPE:STRING=DEBUG -DUSE_RUN_CC_PL:BOOLEAN=OFF -DUSE_PCH:BOOLEAN=OFF  ..
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   P                              lease set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Performing Test HAVE_PIPE_FLAG
CMake Error at /home/irc/anope-1.9.7-source/cmake-bin/cmake-2.8.5-Linux-i386/sha                              re/cmake-2.8/Modules/CMakeCXXInformation.cmake:37 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Performing Test HAVE_PIPE_FLAG - Failed
-- Looking for socket in socket
-- Looking for socket in socket - not found
-- Looking for inet_addr in nsl
-- Looking for inet_addr in nsl - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for cstdint
-- Looking for cstdint - not found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for setgrent
-- Looking for setgrent - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for stricmp
-- Looking for stricmp - not found
-- Looking for umask
-- Looking for umask - found
-- Looking for epoll_wait
-- Looking for epoll_wait - found
-- Looking for poll
-- Looking for poll - found
-- Looking for kqueue
-- Looking for kqueue - not found
CMake Error at /home/irc/anope-1.9.7-source/cmake-bin/cmake-2.8.5-Linux-i386/sha                              re/cmake-2.8/Modules/CMakeCXXInformation.cmake:37 (GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
extra/m_ldap.cpp needs header file ldap.h but we were unable to locate that head                              er file! Check that the header file is within the search path of your OS.
extra/m_ldap.cpp needs library ldap but we were unable to locate that library! C                              heck that the library is within the search path of your OS.
extra/m_ldap.cpp needs library lber but we were unable to locate that library! C                              heck that the library is within the search path of your OS.
  This is not a fatal error - extra/m_ldap.cpp will not be built.
extra/m_regex_pcre.cpp needs header file pcre.h but we were unable to locate tha                              t header file! Check that the header file is within the search path of your OS.
extra/m_regex_pcre.cpp needs library pcre but we were unable to locate that libr                              ary! Check that the library is within the search path of your OS.
  This is not a fatal error - extra/m_regex_pcre.cpp will not be built.
extra/m_regex_tre.cpp needs header file tre/regex.h but we were unable to locate                               that header file! Check that the header file is within the search path of your                               OS.
extra/m_regex_tre.cpp needs library tre but we were unable to locate that librar                              y! Check that the library is within the search path of your OS.
  This is not a fatal error - extra/m_regex_tre.cpp will not be built.
extra/m_sqlite.cpp needs header file sqlite3.h but we were unable to locate that                               header file! Check that the header file is within the search path of your OS.
extra/m_sqlite.cpp needs library sqlite3 but we were unable to locate that libra                              ry! Check that the library is within the search path of your OS.
  This is not a fatal error - extra/m_sqlite.cpp will not be built.
extra/webcpanel/static_fileserver.cpp needs header file fstream but we were unab                              le to locate that header file! Check that the header file is within the search p                              ath of your OS.
  This is not a fatal error - extra/webcpanel will not be built.
-- Configuring incomplete, errors occurred!

Now cd build, then run make to build Anope.
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: Cannot install (cmake errors)
« Reply #1 on: September 17, 2012, 08:07:24 PM »

Do you have a C++ compiler installed? Such as g++, clang, etc?
Logged

Artea ElFo

  • Anope User
  • Offline Offline
  • Posts: 1
Re: Cannot install (cmake errors)
« Reply #2 on: August 26, 2014, 03:32:28 PM »

Hello, I was compiling Anope 2.0.1 on CentOS 7 and got the same error. On my search found the solution and worked.

on "./modules/webadmin/static_fileserver.cpp" add the line " using namespace std; " (without quotes)

CMake Error at cmake/Anope.cmake:411 (message):
  static_fileserver.cpp needs header file fstream.h but we were unable to
  locate that header file! Check that the header file is within the search
  path of your OS.
(I replaced <fstream> to <fstream.h> just in case of, the error happened with original file)

-- Configuring done
-- Generating done
-- Build files have been written to: ~/anope-2.0.1-source/build
« Last Edit: August 26, 2014, 03:54:59 PM by Artea ElFo »
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: Cannot install (cmake errors)
« Reply #3 on: August 26, 2014, 10:51:06 PM »

This works for me fine on CentOS 7 without modifications.

yum install -y make gcc gcc-c++ cmake
Logged

Lang Tu Buon

  • Anope User
  • Offline Offline
  • Posts: 4
Re: Cannot install (cmake errors)
« Reply #4 on: September 05, 2014, 06:44:50 PM »

I was compiling Anope 2.0.1 (Upgrade from Anope 1.8.7) on UbuntuServ 10.04.4 and got the same error

Code: [Select]
CMake Error at cmake/Anope.cmake:411 (message):
  static_fileserver.cpp needs header file fstream but we were unable to
  locate that header file! Check that the header file is within the search
  path of your OS.
Call Stack (most recent call first):
  modules/CMakeLists.txt:99 (calculate_depends)
  modules/webcpanel/CMakeLists.txt:1 (build_subdir)


-- Configuring incomplete, errors occurred!
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: Cannot install (cmake errors)
« Reply #5 on: September 05, 2014, 06:50:13 PM »

I was compiling Anope 2.0.1 (Upgrade from Anope 1.8.7) on UbuntuServ 10.04.4 and got the same error

Code: [Select]
CMake Error at cmake/Anope.cmake:411 (message):
  static_fileserver.cpp needs header file fstream but we were unable to
  locate that header file! Check that the header file is within the search
  path of your OS.
Call Stack (most recent call first):
  modules/CMakeLists.txt:99 (calculate_depends)
  modules/webcpanel/CMakeLists.txt:1 (build_subdir)


-- Configuring incomplete, errors occurred!

What is the output of g++ --version and cmake --version?
Logged

Lang Tu Buon

  • Anope User
  • Offline Offline
  • Posts: 4
Re: Cannot install (cmake errors)
« Reply #6 on: September 05, 2014, 07:23:18 PM »

What is the output of g++ --version and cmake --version?
Code: [Select]
:~# g++ version
g++: version: No such file or directory
g++: no input files
:~# cmake --version
cmake version 2.8.0
:~# gcc --version
gcc (GCC) 4.1.3 20080704 (prerelease) (Ubuntu 4.1.2-27ubuntu1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: Cannot install (cmake errors)
« Reply #7 on: September 05, 2014, 07:25:32 PM »

That gcc version is really old, even if cmake was okay, Anope 2 doesn't work with gcc 4.1. You should see if your OS has a package for a newer version of gcc (like 4.6) that would work. You can instruct cmake to use it by running rm -rf build and CXX="g++4.6" ./Config
Logged

Lang Tu Buon

  • Anope User
  • Offline Offline
  • Posts: 4
Re: Cannot install (cmake errors)
« Reply #8 on: September 05, 2014, 08:01:42 PM »

That gcc version is really old, even if cmake was okay, Anope 2 doesn't work with gcc 4.1. You should see if your OS has a package for a newer version of gcc (like 4.6) that would work. You can instruct cmake to use it by running rm -rf build and CXX="g++4.6" ./Config
I installed gcc 4.6
Code: [Select]
sudo apt-add-repository ppa:ubuntu-toolchain-r/test/ubuntu
sudo apt-get update
sudo apt-get install gcc-4.6
sudo apt-get install g++-4.6
But... when I used this cmd: CXX="gcc-4.6" ./Config
Code: [Select]
cmake  -DINSTDIR:STRING=/home/ltb/services2  -DDEFUMASK:STRING=077 -DCMAKE_BUILD
_TYPE:STRING=RELEASE -DUSE_RUN_CC_PL:BOOLEAN=OFF -DUSE_PCH:BOOLEAN=OFF    ..
-- The CXX compiler identification is GNU
-- Check for working CXX compiler: /usr/bin/gcc-4.6
-- Check for working CXX compiler: /usr/bin/gcc-4.6 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Performing Test HAVE_PIPE_FLAG
-- Performing Test HAVE_PIPE_FLAG - Success
-- Looking for socket in socket
-- Looking for socket in socket - not found
-- Looking for inet_addr in nsl
-- Looking for inet_addr in nsl - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for cstdint
-- Looking for cstdint - not found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for stricmp
-- Looking for stricmp - not found
-- Looking for umask
-- Looking for umask - found
-- Looking for epoll_wait
-- Looking for epoll_wait - found
-- Looking for poll
-- Looking for poll - found
-- Looking for kqueue
-- Looking for kqueue - not found
CMake Error at cmake/Anope.cmake:411 (message):
  static_fileserver.cpp needs header file fstream but we were unable to
  locate that header file! Check that the header file is within the search
  path of your OS.
Call Stack (most recent call first):
  modules/CMakeLists.txt:99 (calculate_depends)
  modules/webcpanel/CMakeLists.txt:1 (build_subdir)


-- Configuring incomplete, errors occurred!
Same, when I used this cmd: CXX="g++-4.6" ./Config
Code: [Select]
cmake  -DINSTDIR:STRING=/home/ltb/services2  -DDEFUMASK:STRING=077 -DCMAKE_BUILD
_TYPE:STRING=RELEASE -DUSE_RUN_CC_PL:BOOLEAN=OFF -DUSE_PCH:BOOLEAN=OFF    ..
-- The CXX compiler identification is GNU
-- Check for working CXX compiler: /usr/bin/g++-4.6
-- Check for working CXX compiler: /usr/bin/g++-4.6 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Performing Test HAVE_PIPE_FLAG
-- Performing Test HAVE_PIPE_FLAG - Success
-- Looking for socket in socket
-- Looking for socket in socket - not found
-- Looking for inet_addr in nsl
-- Looking for inet_addr in nsl - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for cstdint
-- Looking for cstdint - not found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for stricmp
-- Looking for stricmp - not found
-- Looking for umask
-- Looking for umask - found
-- Looking for epoll_wait
-- Looking for epoll_wait - found
-- Looking for poll
-- Looking for poll - found
-- Looking for kqueue
-- Looking for kqueue - not found
CMake Error at cmake/Anope.cmake:411 (message):
  static_fileserver.cpp needs header file fstream but we were unable to
  locate that header file! Check that the header file is within the search
  path of your OS.
Call Stack (most recent call first):
  modules/CMakeLists.txt:99 (calculate_depends)
  modules/webcpanel/CMakeLists.txt:1 (build_subdir)


-- Configuring incomplete, errors occurred!
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: Cannot install (cmake errors)
« Reply #9 on: September 05, 2014, 08:07:29 PM »

Maybe try find /usr -name fstream and answer the last question of ./Config with -DCMAKE_INCLUDE_PATH=/path/to/file
Logged

Lang Tu Buon

  • Anope User
  • Offline Offline
  • Posts: 4
Re: Cannot install (cmake errors)
« Reply #10 on: September 05, 2014, 08:52:32 PM »

Maybe try find /usr -name fstream and answer the last question of ./Config with -DCMAKE_INCLUDE_PATH=/path/to/file
Thanks 4 support. The problem is fixed!
Logged

Kevin

  • Anope User
  • Offline Offline
  • Posts: 1
Re: Cannot install (cmake errors)
« Reply #11 on: December 29, 2016, 05:40:20 PM »

Hi,

Sorry for bumping this topic but I have the same issue.

I tried the last option, by doing this:
-DCMAKE_INCLUDE_PATH=/usr/include/c++/4.4.4/fstream

But it doesn't work. The error I get is:

Saving configuration results in config.cache... done.
cmake  -DINSTDIR:STRING=/home/ircd/services  -DDEFUMASK:STRING=077 -DCMAKE_BUILD_TYPE:STRING=RELEASE -DUSE_PCH:BOOLEAN=ON   -DCMAKE_INCLUDE_PATH=/usr/include/c++/4.4.4/fstream ..
CMake Error at cmake/Anope.cmake:411 (message):
  static_fileserver.cpp needs header file fstream but we were unable to
  locate that header file! Check that the header file is within the search
  path of your OS.
Call Stack (most recent call first):
  modules/CMakeLists.txt:103 (calculate_depends)
  modules/webcpanel/CMakeLists.txt:1 (build_subdir)


-- Configuring incomplete, errors occurred!
See also "/home/ircd/anope-2.0.4-source/build/CMakeFiles/CMakeOutput.log".
See also "/home/ircd/anope-2.0.4-source/build/CMakeFiles/CMakeError.log".

Now cd build, then run make to build Anope.



CentOS 6, new Anope version
cmake version 2.8.12.2
gcc (GCC) 4.4.7


Edit:
I just reinstalled to Ubuntu with the following versions:
ircd@irc:~/anope-2.0.4-source$ cmake --version
cmake version 2.8.12.2
ircd@irc:~/anope-2.0.4-source$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

But also the same error...
« Last Edit: December 29, 2016, 06:20:23 PM by Kevin »
Logged
Pages: [1]   Go Up