Jump to content

Shrew


hello_world
 Share

Recommended Posts

Witam

Nie jestem mocny w c,c++ .

Czy ktos z Was kompilowal shrewa?

przy cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES

pokazuje mi:

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/home/hello/ike/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/home/hello/ike/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Wszystkie zaleznosci sa spelnione

yum install gcc flex bison cmake openssl openssl-devel qt3-devel

Link to comment
Share on other sites

Pobrałem tę paczkę → http://www.shrew.net/download/ike/ike-2.1.6-release.tgz

Po rozpakowaniu i przejściu do katalogu "ike"

cmake . # kropka, bo w bieżącym katalogu 'ike' jest plik CMakeLists.txt
make

Wszystko wygląda dobrze. "make install" już nie robiłem, bo nie chcę sobie śmiecić.

 

[EDIT]

Co daje opcja "-DNATT=YES"?

Z opcjami jakie podałeś też jest OK, tylko nie mogę zbudować GUI, bo mam biblioteki KDE z kde-testing (4.5) i mi pisze, że

uic: File generated with too old version of Qt Designer (3.3)
File '/home/download/ike/source/ikea/about.ui' is not valid
make[2]: *** [source/ikea/about.h] Błąd 1
make[1]: *** [source/ikea/CMakeFiles/ikea.dir/all] Błąd 2
make: *** [all] Błąd 2

Ale poza tym idzie tak jak widać poniżej, więc chyba po prostu skasuj katalog, rozpakuj paczkę raz jeszcze i zbuduj od nowa.

[waldo@F13 ike]$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=NO -DETCDIR=/etc -DNATT=YES
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/lib64/ccache/gcc
-- Check for working C compiler: /usr/lib64/ccache/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using install prefix /usr ...
-- Using etc path /etc ...
-- Using lib path /usr/lib ...
-- Using man path /usr/share/man ...
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for pthread_mutex_timedlock in -lpthread
-- Looking for pthread_mutex_timedlock in -lpthread - found
-- Using binary /usr/bin/flex ...
-- Using binary /usr/bin/bison ...
-- Performing Test NATT_FOUND
-- Performing Test NATT_FOUND - Success
-- Enabled NAT Traversal support ...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/download/ike
[waldo@F13 ike]$ make
Scanning dependencies of target ike
[  2%] Building CXX object source/libike/CMakeFiles/ike.dir/libike.o
Linking CXX shared library libike.so
[  2%] Built target ike
Scanning dependencies of target ip
[  4%] Building CXX object source/libip/CMakeFiles/ip.dir/libip.frag.o
[  6%] Building CXX object source/libip/CMakeFiles/ip.dir/libip.packet.o
[  8%] Building CXX object source/libip/CMakeFiles/ip.dir/libip.packet.dns.o
[ 10%] Building CXX object source/libip/CMakeFiles/ip.dir/libip.packet.ip.o
[ 12%] Building CXX object source/libip/CMakeFiles/ip.dir/libip.packet.udp.o
[ 14%] Building CXX object source/libip/CMakeFiles/ip.dir/libip.pcap.o
[ 16%] Building CXX object source/libip/CMakeFiles/ip.dir/libip.queue.o
[ 18%] Building CXX object source/libip/CMakeFiles/ip.dir/libip.route.o
Linking CXX static library libip.a
[ 18%] Built target ip
Scanning dependencies of target log
[ 20%] Building CXX object source/liblog/CMakeFiles/log.dir/liblog.o
Linking CXX static library liblog.a
[ 20%] Built target log
Scanning dependencies of target idb
[ 22%] Building CXX object source/libidb/CMakeFiles/idb.dir/libidb.o
[ 24%] Building CXX object source/libidb/CMakeFiles/idb.dir/base64.o
Linking CXX static library libidb.a
[ 24%] Built target idb
Scanning dependencies of target ith
[ 26%] Building CXX object source/libith/CMakeFiles/ith.dir/libith.o
Linking CXX static library libith.a
[ 26%] Built target ith
Scanning dependencies of target pfk
[ 28%] Building CXX object source/libpfk/CMakeFiles/pfk.dir/libpfk.o
Linking CXX shared library libpfk.so
[ 28%] Built target pfk
[ 30%] Generating conf.token.cpp
[ 32%] Generating conf.parse.cpp
Scanning dependencies of target iked
[ 34%] Building CXX object source/iked/CMakeFiles/iked.dir/crypto.o
[....bla bla bla, pozostałe obiekty...]
[100%] Building CXX object source/iked/CMakeFiles/iked.dir/main.o
Linking CXX executable iked
[100%] Built target iked
[waldo@F13 ike]$ 

Link to comment
Share on other sites

A masz zainstalowany "make"? Jeśli tak, to spróbuj go wyeksportować przed kompilacją

export CMAKE_MAKE_PROGRAM=/usr/bin/make

Nie wiem czy to coś pomoże, ale czytając "man cmake" i wyjście błędów, które podałeś i jeśli dobrze wszystko zrozumiałem, to "cmake" nie odnajduje polecenia "make". No i nie jestem pewien czy eksportować CMAKE_MAKE_PROGRAM czy CMAKE_BUILD_TOOL.

Może ktoś się wypowie, bo ja też guru nie jestem w tych tematach :)

 

[EDIT]

Chyba jednak CMAKE_BUILD_TOOL trzeba ustawić, bo w man piszą

       CMAKE_MAKE_PROGRAM
              See CMAKE_BUILD_TOOL.

              This   variable  is  around  for  backwards  compatibility,  see
              CMAKE_BUILD_TOOL.

więc CMAKE_MAKE_PROGRAM jest chyba przestarzałe, chociaż nie jest niepoprawne.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...