i'm trying to install mosquitto-1.3 in Linux, for doing this follow he step.
1- wget http://mosquitto.org/files/source/mosquitto-1.3.tar.gz
2- tar -zxvf mosquitto-1.3.tar.gz
3- cd mosquitto-1.3
4- cmake .
5- make install
Then it start fine but in the mid it breaks and show an error.
[root#localhost mosquitto-1.3]# make install
Scanning dependencies of target libmosquitto<br/>
[ 2%] Building C object lib/CMakeFiles/libmosquitto.dir/logging_mosq.c.o<br/>
[ 4%] Building C object lib/CMakeFiles/libmosquitto.dir/memory_mosq.c.o<br/>
[ 6%] Building C object lib/CMakeFiles/libmosquitto.dir/messages_mosq.c.o<br/>
[ 8%] Building C object lib/CMakeFiles/libmosquitto.dir/mosquitto.c.o<br/>
[ 10%] Building C object lib/CMakeFiles/libmosquitto.dir/net_mosq.c.o<br/>
[ 13%] Building C object lib/CMakeFiles/libmosquitto.dir/read_handle.c.o<br/>
[ 15%] Building C object lib/CMakeFiles/libmosquitto.dir /read_handle_client.c.o<br/>
[ 17%] Building C object lib/CMakeFiles/libmosquitto.dir /read_handle_shared.c.o<br/>
[ 19%] Building C object lib/CMakeFiles/libmosquitto.dir/send_client_mosq.c.o<br/>
[ 21%] Building C object lib/CMakeFiles/libmosquitto.dir/send_mosq.c.o<br/>
[ 23%] Building C object lib/CMakeFiles/libmosquitto.dir/srv_mosq.c.o<br/>
[ 26%] Building C object lib/CMakeFiles/libmosquitto.dir/thread_mosq.c.o<br/>
[ 28%] Building C object lib/CMakeFiles/libmosquitto.dir/time_mosq.c.o<br/>
[ 30%] Building C object lib/CMakeFiles/libmosquitto.dir/tls_mosq.c.o<br/>
[ 32%] Building C object lib/CMakeFiles/libmosquitto.dir/util_mosq.c.o<br/>
[ 34%] Building C object lib/CMakeFiles/libmosquitto.dir/will_mosq.c.o<br/>
Linking C shared library libmosquitto.so<br/>
/usr/bin/ld: cannot find -lcares<br/>
collect2: ld returned 1 exit status<br/>
make[2]: *** [lib/libmosquitto.so.1.3] Error 1<br/>
make[1]: *** [lib/CMakeFiles/libmosquitto.dir/all] Error 2<br/>
make: *** [all] Error 2<br/>
What can i do with this... help me... Thanks.
Looks like you don't have c-ares installed on your system. Please refer to compiling.txt file in source tree.
The following packages are required for mosquitto:
* tcp-wrappers (optional, package name libwrap0-dev)
* openssl (version 1.0.0 or greater if TLS-PSK support is needed, can be disabled)
* c-ares (for DNS-SRV support, can be disabled)
* libuuid (from e2fsprogs, can be disabled)
* On Windows, the Redhat pthreads library is required if threading support is
to be included.
To compile, run "make", but also see the file config.mk for more details on the
various options that can be compiled in.
Where possible use the Makefiles to compile. This is particularly relevant for
the client libraries as symbol information will be included. Use cmake to
compile on Windows or Mac.
If you have any questions, problems or suggestions (particularly related to
installing on a more unusual device like a plug-computer) then please get in
touch using the details in readme.txt.
Related
I want to use SCIP optimization suite 6.0.2 together with the Python interface PySCIPOpt, and to enable debugging. I work in Linux - Ubuntu 18.04LTS, without sudo privileges (I avoid using sudo because I want to do the same on a cluster, where I don't have the sudo option).
I follow the installation instructions in SCIP and PySCIPOpt, and try to install SCIP in my HOME directory, specifying custom path to the cmake command.
I have done the following:
in my .bashrc I export SCIPOPTDIR=$HOME/scipoptsuite-6.0.2/build
then in ~/scipoptsuite-6.0.2:
cmake -Bbuild -H. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$SCIPOPTDIR
output:
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find BISON (missing: BISON_EXECUTABLE)
-- Could NOT find FLEX (missing: FLEX_EXECUTABLE)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- Build shared libraries: ON
-- Build type: Debug
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find Readline (missing: Readline_INCLUDE_DIR Readline_LIBRARY)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- Could NOT find BLISS (missing: BLISS_INCLUDE_DIR BLISS_INCLUDE_DIRS BLISS_LIBRARIES BLISS_DEFINITIONS)
-- Could NOT find ZIMPL (missing: ZIMPL_DIR)
-- Could NOT find IPOPT (missing: IPOPT_LIBRARIES) (Required is at least version "3.12.0")
-- Looking for FE_DOWNWARD
-- Looking for FE_DOWNWARD - found
-- Could NOT find CRITERION (missing: CRITERION_LIBRARY CRITERION_INCLUDE_DIR)
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
CMake Warning at scip/doc/CMakeLists.txt:19 (message):
Could not find all of doxygen, python, php, and bash in system path, which
are required for generation of documentation
-- Could NOT find CRITERION (missing: CRITERION_LIBRARY CRITERION_INCLUDE_DIR)
-- Build shared libraries: ON
-- Build type: Debug
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Could NOT find GSL: Found unsuitable version "", but required is at least "2.0" (found GSL_INCLUDE_DIR-NOTFOUND)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- Could NOT find CLIQUER (missing: CLIQUER_INCLUDE_DIRS CLIQUER_LIBRARIES)
-- Could NOT find BLISS (missing: BLISS_INCLUDE_DIR BLISS_INCLUDE_DIRS BLISS_LIBRARIES BLISS_DEFINITIONS)
-- The following OPTIONAL packages have been found:
* PkgConfig
-- The following REQUIRED packages have been found:
* SOPLEX
* SCIP
-- The following OPTIONAL packages have not been found:
* BISON
* FLEX
* ZLIB
* Readline
* ZIMPL
* IPOPT (required version >= 3.12.0)
* Criterion
* GSL (required version >= 2.0)
* GMP
* CLIQUER
* HMETIS
* BLISS
-- Configuring done
-- Generating done
-- Build files have been written to: /home/avrech/scipoptsuite-6.0.2/build
then:
cmake --build build
Output:
Scanning dependencies of target soplex_update_githash
-- Git hash: b8833cd3
[ 0%] Built target soplex_update_githash
Scanning dependencies of target libsoplex-pic
[ 0%] Building CXX object soplex/src/CMakeFiles/libsoplex-pic.dir/soplex/changesoplex.cpp.o
...
[100%] Building C object gcg/src/CMakeFiles/gcg.dir/solver_mip.c.o
[100%] Building C object gcg/src/CMakeFiles/gcg.dir/stat.c.o
[100%] Linking CXX executable ../../bin/gcg
[100%] Built target gcg
At this point scip and soplex binaries exist in build/bin/, and SCIP can be launched as standalone solver by executing build/bin/scip. However, the build/ directory does not contain the include/ dir required for PySCIPOpt.
So according to this, I have tried to install SCIP by running:
cd build
make install
Then the error occurs:
-- Git hash: b8833cd3
[ 0%] Built target soplex_update_githash
[ 5%] Built target libsoplex-pic
[ 11%] Built target libsoplex
[ 11%] Built target soplex
-- Git hash: e639a0059d
[ 11%] Built target scip_update_githash
[ 44%] Built target scip
[ 76%] Built target libscip
-- Git hash: 6a662daa
[ 76%] Built target gcg_update_githash
[ 88%] Built target libgcg
[100%] Built target gcg
Install the project...
-- Install configuration: "Debug"
-- Installing: /home/avrech/scipoptsuite-6.0.2/build/include/soplex/array.h
...
-- Installing: /home/avrech/scipoptsuite-6.0.2/build/include/soplex/wallclocktimer.h
-- Installing: /home/avrech/scipoptsuite-6.0.2/build/include/soplex.h
CMake Error at soplex/src/cmake_install.cmake:149 (file):
file INSTALL cannot find
"/home/avrech/scipoptsuite-6.0.2/build/bin/soplex".
Call Stack (most recent call first):
soplex/cmake_install.cmake:42 (include)
cmake_install.cmake:42 (include)
Makefile:73: recipe for target 'install' failed
make: *** [install] Error 1
I see that the (probably partial) include/ dir is created, but for unkown reason the soplex executable disappears:
$ ls
bin include ...
$ ls bin
applications examples gcg interfaces scip
What have I done wrong?
A complete recipe for installing SCIP and PySCIPOpt with the debug option will be the best.
(The sudo privileges are available if needed)
Thank you.
You just need to specify a different directory for the install target. Set SCIPOPTDIR to some install/ dir instead of build/ and it should work. You cannot have install and build using the same directories.
PySCIPOpt is searching for the install directory so you always need to run install after building the project.
You don't need sudo for any of this as long as you don't want to install to some system directory.
I have just started using Raspberry PI 3. I'm trying to install an open source library named as OpenALPR on it. It's a library that takes an image of a vehicle's license plate as an argument and returns the text written on it. I've been following this link to install the library.
https://blog.vinczejanos.info/2017/05/01/install-openalpr-on-raspberry-pi-3-part-2/
I'm on the install OpenALPR step specified in the above link. I've encountered the following error on the last build command of that step i.e. make install
[ 21%] Built target support
[ 23%] Built target video
[ 51%] Built target openalpr
[ 52%] Built target alpr
[ 55%] Built target alprd
[ 56%] Built target openalpr-utils-prepcharsfortraining
[ 59%] Built target openalpr-utils-benchmark
[ 60%] Built target openalpr-utils-binarizefontsheet
[ 61%] Built target openalpr-utils-classifychars
[ 63%] Built target openalpr-utils-calibrate
[ 64%] Built target openalpr-utils-tagplates
[ 66%] Built target openalpr-utils-sortstate
[ 69%] Built target unittests
[ 96%] Built target openalpr-static
[ 97%] Built target simpleini
[ 99%] Built target openalprpy
[100%] Built target openalprgo
Install the project...
-- Install configuration: "RelWithDebugInfo"
-- Installing: /usr/bin/alpr
CMake Error at cmake_install.cmake:50 (file):
file INSTALL cannot copy file "/usr/src/openalpr/src/build/alpr" to
"/usr/bin/alpr".
Makefile:126: recipe for target 'install' failed
make: *** [install] Error 1
I can assure that all the steps above this one have been completed successfully. Please guide me regarding this error. Thanks.
The error has been resolved. All I did was executed the command make install without sudo which didn't give permission to copy files. Once I executed it as sudo make install it executed perfectly and is working now.
I am crosscompile one software for ARM cortex A8 and using CMAKE tool to generate Makefile.
my CMakeLists.txt file is as below
cmake_minimum_required(VERSION 2.8)
PROJECT(sierra-software)
include_directories($ENV{PREFIX}/include/sierra)
include_directories($ENV{PREFIX}/include/glib-2.0)
include_directories($ENV{PREFIX}/lib/glib-2.0/include)
include_directories($ENV{PREFIX}/include)
include_directories($ENV{PREFIX}/include/dbus-1.0)
include_directories($ENV{PREFIX}/lib/dbus-1.0/include)
find_package(PkgConfig)
# target_include_directories(sierra PUBLIC $<BUILD_INTERFACE:$ENV{PREFIX}/include>
# use, i.e. don't skip the full RPATH for the build tree
# SET(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
# SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
# the RPATH to be used when installing
# SET(CMAKE_INSTALL_RPATH "/home/deep/projects/code/build/lib")
IF(CMAKE_CROSSCOMPILING)
set(CMAKE_INSTALL_PREFIX $ENV{PREFIX})
# add_definitions(-g)
# SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
# add_definitions(-O3 -Wall -c -fmessage-length=0)
ELSE(CMAKE_CROSSCOMPILING)
add_definitions(-DSIMULATE_FIFOS -O3 -g)
set(CMAKE_INSTALL_PREFIX /home/host/satsys/usr)
ENDIF(CMAKE_CROSSCOMPILING)
include_directories(${GTHREAD_INCLUDE_DIRS} ${DBUS_GLIB_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS})
link_directories(${GTHREAD_LIBRARY_DIRS} ${DBUS_GLIB_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS})
include_directories(NetSerSel/src TrackingData/src ClientExternalGPS/src AlsaSierraConf/src Discretes/src alsa_relay/src smsHandle/src DBUSBaseConnection/src ClientModemsCommunication/src)
add_subdirectory(NetSerSel)
add_subdirectory(Discretes)
add_subdirectory(TrackingData)
add_subdirectory(ClientExternalGPS)
add_subdirectory(AlsaSierraConf)
add_subdirectory(alsa_relay)
add_subdirectory(smsHandle)
add_subdirectory(ModemsManagement)
add_subdirectory(TrackingManagement)
add_subdirectory(serveur_sierra)
add_subdirectory(ModemTalk)
add_subdirectory(DspicTalk)
add_subdirectory(send_msg)
add_subdirectory(get_data)
using following command I generate Makefile
[linux-devkit]:~/projects/code/src/sierra-software> cmake -DCMAKE_TOOLCHAIN_FILE=./arm.cmake
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /home/deep/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /home/deep/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working CXX compiler: /home/deep/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-g++
-- Check for working CXX compiler: /home/deep/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Found PkgConfig: /home/deep/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/pkg-config (found version "0.25")
-- checking for module 'alsa'
-- found alsa, version 1.0.26
-- checking for module 'dbus-1'
-- found dbus-1, version 1.6.8
-- checking for module 'glib-2.0'
-- found glib-2.0, version 2.34.3
-- checking for module 'dbus-glib-1'
-- found dbus-glib-1, version 0.100.2
-- checking for module 'gthread-2.0'
-- found gthread-2.0, version 2.34.3
-- checking for module 'glib-2.0'
-- found glib-2.0, version 2.34.3
-- Configuring done
-- Generating done
-- Build files have been written to: /home/deep/projects/code/src/sierra-software
when I compile project using make command it gives following error
[
linux-devkit]:~/projects/code/src/sierra-software> make
Scanning dependencies of target NetSerSel
[ 2%] Building C object NetSerSel/CMakeFiles/NetSerSel.dir/src/libNetSerSel.c.o
Linking C static library libNetSerSel.a
[ 2%] Built target NetSerSel
Scanning dependencies of target Discretes
[ 5%] Building C object Discretes/CMakeFiles/Discretes.dir/src/libDiscretes.c.o
Linking C static library libDiscretes.a
[ 5%] Built target Discretes
Scanning dependencies of target TrackingData
[ 7%] Building C object TrackingData/CMakeFiles/TrackingData.dir/src/libTrackingData.c.o
Linking C static library libTrackingData.a
[ 7%] Built target TrackingData
Scanning dependencies of target ClientExternalGPS
[ 10%] Building C object ClientExternalGPS/CMakeFiles/ClientExternalGPS.dir/src/libClientSharedExtGPSInfo.c.o
Linking C static library libClientExternalGPS.a
[ 10%] Built target ClientExternalGPS
Scanning dependencies of target AlsaSierraConf
[ 12%] Building C object AlsaSierraConf/CMakeFiles/AlsaSierraConf.dir/src/AlsaSierraConf.c.o
Linking C static library libAlsaSierraConf.a
[ 12%] Built target AlsaSierraConf
Scanning dependencies of target alsa_relay
[ 15%] Building C object alsa_relay/CMakeFiles/alsa_relay.dir/src/alsa_relay.c.o
Linking C static library libalsa_relay.a
[ 15%] Built target alsa_relay
Scanning dependencies of target smsHandle
[ 17%] Building C object smsHandle/CMakeFiles/smsHandle.dir/src/smsHandle.c.o
Linking C static library libsmsHandle.a
[ 17%] Built target smsHandle
Scanning dependencies of target ModemsManagement
[ 20%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/marshaller.c.o
[ 22%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libGSM.c.o
[ 25%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libIridium.c.o
[ 27%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/Tools.c.o
[ 30%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libsms.c.o
[ 32%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libDspic.c.o
[ 35%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libGC864.c.o
[ 37%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/main.c.o
[ 40%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libSharedDevicesInfo.c.o
[ 42%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libSharedModemsInfo.c.o
[ 45%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libDBusModemsManagement.c.o
/home/deep/projects/code/src/sierra-software/ModemsManagement/src/libDBusModemsManagement.c: In function ‘InitDbus’:
/home/deep/projects/code/src/sierra-software/ModemsManagement/src/libDBusModemsManagement.c:149:2: warning: ‘g_type_init’ is deprecated (declared at /home/deep/projects/code/build/include/glib-2.0/gobject/gtype.h:681) [-Wdeprecated-declarations]
/home/deep/projects/code/src/sierra-software/ModemsManagement/src/libDBusModemsManagement.c:150:2: warning: ‘g_thread_init’ is deprecated (declared at /home/deep/projects/code/build/include/glib-2.0/glib/deprecated/gthread.h:265) [-Wdeprecated-declarations]
[ 47%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libSMSmanagement.c.o
[ 50%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libSBD960x.c.o
[ 52%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libModem.c.o
[ 55%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/DList.c.o
[ 57%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/SFifo.c.o
[ 60%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/libThuraya.c.o
[ 62%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/DiscretesFifo.c.o
[ 65%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/MList.c.o
[ 67%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/pduconv.c.o
[ 70%] Building C object ModemsManagement/CMakeFiles/ModemsManagement.dir/src/KList.c.o
Linking C executable ModemsManagement
CMakeFiles/ModemsManagement.dir/src/libDBusModemsManagement.c.o: In function `InitDbus':
libDBusModemsManagement.c:(.text+0x162c): undefined reference to `g_thread_init'
libDBusModemsManagement.c:(.text+0x17b0): undefined reference to `org_freedesktop_DBus_request_name'
collect2: error: ld returned 1 exit status
ModemsManagement/CMakeFiles/ModemsManagement.dir/build.make:590: recipe for target 'ModemsManagement/ModemsManagement' failed
make[2]: *** [ModemsManagement/ModemsManagement] Error 1
CMakeFiles/Makefile2:429: recipe for target 'ModemsManagement/CMakeFiles/ModemsManagement.dir/all' failed
make[1]: *** [ModemsManagement/CMakeFiles/ModemsManagement.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
Error shows clearly that issue is related to linking
I have checked libgthread.so path to toolchain lib folder and also libgib-2.0.so library include properly.
please suggest how resolve this undefined reference issue.
I have do some work around in project just comment to call that function from where error comes in that file
//g_thread_init(NULL);
`and code compile with dependencies of zlib and libffi.
I am trying to compile and install glfw 3.1.1 for Ubuntu 14.10. The cmake finished successfully, however, when I go to execute the makefile through make it fails at the following:
[ 98%] Building C object tests/CMakeFiles/windows.dir/windows.c.o
Linking C executable windows
[ 98%] Built target windows
Scanning dependencies of target docs
[100%] Generating HTML documentation
Error: tag HTML_HEADER: header file `/home/dennis/Documents/LearningOpenGL/glfw-3.1.1/docs/header.html' does not exist
docs/CMakeFiles/docs.dir/build.make:52: recipe for target 'docs/CMakeFiles/docs' failed
make[2]: *** [docs/CMakeFiles/docs] Error 1
CMakeFiles/Makefile2:1184: recipe for target 'docs/CMakeFiles/docs.dir/all' failed
make[1]: *** [docs/CMakeFiles/docs.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
At first I thought that it is failing an optional step but then I realized that I can't compile my test project as it complains about the glfw header:
main.cpp:2:24: fatal error: GLFW/glfw3.h: No such file or directory
#include <GLFW/glfw3.h>
Thanks
Found the answer! I had to disable the "build documentation" option in the cmake gui.
It seems you just skip compiling the doc instead of fix it.
Simply go to docs/CMakeFiles/docs.dir, modify the file build.make.
For the build target docs/CMakeFiles/docs:, change the doxygen command
from:
doxygen.exe
to
doxygen.exe .
Installing libssh for ssh call on C.
Ubuntu 13.04
apt-get install gcc --fine
apt-get install cmake -fine
wget openssl-1.0.1e.tar.gz --fine
tar -xzvf openssl-1.0.1e.tar.gz --fine
./config --prefix=/usr/local --openssldir=/usr/local/openssl --fine
make --fine
make test --fine
make install --fine
wget zlib-1.2.8.tar.gz --fine
./configure; make test --fine
make install --fine
apt-get install dev-essential
now to install libssh.org
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug .. --fine
-- The C compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Performing Test WITH_FPIC
-- Performing Test WITH_FPIC - Success
-- Performing Test WITH_STACK_PROTECTOR
-- Performing Test WITH_STACK_PROTECTOR - Success
-- Found ZLIB: /usr/local/include
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'openssl'
-- found openssl, version 1.0.1e
-- Found OpenSSL: /usr/local/lib/libssl.a;/usr/local/lib/libcrypto.a
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not 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
-- checking for module 'heimdal-gssapi'
-- package 'heimdal-gssapi' not found
-- Could NOT find GSSAPI (missing: GSSAPI_LIBRARIES GSSAPI_INCLUDE_DIR)
-- Performing Test WITH_VISIBILITY_HIDDEN
-- Performing Test WITH_VISIBILITY_HIDDEN - Success
-- Looking for argp.h
-- Looking for argp.h - found
-- Looking for pty.h
-- Looking for pty.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for openssl/aes.h
-- Looking for openssl/aes.h - found
-- Looking for openssl/blowfish.h
-- Looking for openssl/blowfish.h - found
-- Looking for openssl/des.h
-- Looking for openssl/des.h - found
-- Looking for openssl/ecdh.h
-- Looking for openssl/ecdh.h - found
-- Looking for openssl/ec.h
-- Looking for openssl/ec.h - found
-- Looking for openssl/ecdsa.h
-- Looking for openssl/ecdsa.h - found
-- Looking for strncpy
-- Looking for strncpy - found
-- Looking for vsnprintf
-- Looking for vsnprintf - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for poll
-- Looking for poll - found
-- Looking for select
-- Looking for select - found
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found
-- Looking for ntohll
-- Looking for ntohll - not found
-- Looking for htonll
-- Looking for htonll - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for forkpty in util
-- Looking for forkpty in util - found
-- Looking for cfmakeraw
-- Looking for cfmakeraw - found
-- Looking for strtoull
-- Looking for strtoull - found
-- Looking for __strtoull
-- Looking for __strtoull - not found
-- Performing Test HAVE_GCC_THREAD_LOCAL_STORAGE
-- Performing Test HAVE_GCC_THREAD_LOCAL_STORAGE - Success
-- Performing Test HAVE_MSC_THREAD_LOCAL_STORAGE
-- Performing Test HAVE_MSC_THREAD_LOCAL_STORAGE - Failed
-- Performing Test HAVE_GCC_VOLATILE_MEMORY_PROTECTION
-- Performing Test HAVE_GCC_VOLATILE_MEMORY_PROTECTION - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- The CXX compiler identification is GNU 4.7.3
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- ********************************************
-- ********** libssh build options : **********
-- zlib support: ON
-- libgcrypt support: OFF
-- SSH-1 support: OFF
-- SFTP support: ON
-- Server support : ON
-- GSSAPI support : 0
-- Pcap debugging support : ON
-- With static library: OFF
-- Unit testing: OFF
-- Client code Unit testing: OFF
-- Public API documentation generation
-- Benchmarks: OFF
-- ********************************************
-- Configuring done
-- Generating done
-- Build files have been written to: /root/libssh/libssh-0.6.0rc1/build
****Now when i tryin to run
make or make install****
Scanning dependencies of target ssh_shared
[ 1%] Building C object src/CMakeFiles/ssh_shared.dir/agent.c.o
[ 2%] Building C object src/CMakeFiles/ssh_shared.dir/auth.c.o
[ 4%] Building C object src/CMakeFiles/ssh_shared.dir/base64.c.o
[ 5%] Building C object src/CMakeFiles/ssh_shared.dir/buffer.c.o
[ 6%] Building C object src/CMakeFiles/ssh_shared.dir/callbacks.c.o
[ 8%] Building C object src/CMakeFiles/ssh_shared.dir/channels.c.o
[ 9%] Building C object src/CMakeFiles/ssh_shared.dir/client.c.o
[ 10%] Building C object src/CMakeFiles/ssh_shared.dir/config.c.o
[ 12%] Building C object src/CMakeFiles/ssh_shared.dir/connect.c.o
[ 13%] Building C object src/CMakeFiles/ssh_shared.dir/dh.c.o
[ 14%] Building C object src/CMakeFiles/ssh_shared.dir/ecdh.c.o
[ 16%] Building C object src/CMakeFiles/ssh_shared.dir/error.c.o
[ 17%] Building C object src/CMakeFiles/ssh_shared.dir/getpass.c.o
[ 18%] Building C object src/CMakeFiles/ssh_shared.dir/init.c.o
[ 20%] Building C object src/CMakeFiles/ssh_shared.dir/kex.c.o
[ 21%] Building C object src/CMakeFiles/ssh_shared.dir/known_hosts.c.o
[ 22%] Building C object src/CMakeFiles/ssh_shared.dir/legacy.c.o
[ 24%] Building C object src/CMakeFiles/ssh_shared.dir/libcrypto.c.o
[ 25%] Building C object src/CMakeFiles/ssh_shared.dir/log.c.o
[ 26%] Building C object src/CMakeFiles/ssh_shared.dir/match.c.o
[ 28%] Building C object src/CMakeFiles/ssh_shared.dir/messages.c.o
[ 29%] Building C object src/CMakeFiles/ssh_shared.dir/misc.c.o
[ 30%] Building C object src/CMakeFiles/ssh_shared.dir/options.c.o
[ 32%] Building C object src/CMakeFiles/ssh_shared.dir/packet.c.o
[ 33%] Building C object src/CMakeFiles/ssh_shared.dir/packet_cb.c.o
[ 34%] Building C object src/CMakeFiles/ssh_shared.dir/packet_crypt.c.o
[ 36%] Building C object src/CMakeFiles/ssh_shared.dir/pcap.c.o
[ 37%] Building C object src/CMakeFiles/ssh_shared.dir/pki.c.o
[ 38%] Building C object src/CMakeFiles/ssh_shared.dir/poll.c.o
[ 40%] Building C object src/CMakeFiles/ssh_shared.dir/session.c.o
[ 41%] Building C object src/CMakeFiles/ssh_shared.dir/scp.c.o
[ 42%] Building C object src/CMakeFiles/ssh_shared.dir/socket.c.o
[ 44%] Building C object src/CMakeFiles/ssh_shared.dir/string.c.o
[ 45%] Building C object src/CMakeFiles/ssh_shared.dir/threads.c.o
[ 46%] Building C object src/CMakeFiles/ssh_shared.dir/wrapper.c.o
[ 48%] Building C object src/CMakeFiles/ssh_shared.dir/pki_crypto.c.o
[ 49%] Building C object src/CMakeFiles/ssh_shared.dir/sftp.c.o
[ 50%] Building C object src/CMakeFiles/ssh_shared.dir/sftpserver.c.o
[ 52%] Building C object src/CMakeFiles/ssh_shared.dir/server.c.o
[ 53%] Building C object src/CMakeFiles/ssh_shared.dir/bind.c.o
[ 54%] Building C object src/CMakeFiles/ssh_shared.dir/gzip.c.o
Linking C shared library libssh.so
[ 54%] Built target ssh_shared
Scanning dependencies of target ssh_threads_shared
[ 56%] Building C object src/threads/CMakeFiles/ssh_threads_shared.dir/pthread.c.o
Linking C shared library libssh_threads.so
[ 56%] Built target ssh_threads_shared
Scanning dependencies of target exec
[ 57%] Building C object examples/CMakeFiles/exec.dir/exec.c.o
[ 58%] Building C object examples/CMakeFiles/exec.dir/authentication.c.o
[ 60%] Building C object examples/CMakeFiles/exec.dir/knownhosts.c.o
[ 61%] Building C object examples/CMakeFiles/exec.dir/connect_ssh.c.o
Linking C executable exec
**../src/libssh.so.4.3.0: undefined reference to `dlopen'
../src/libssh.so.4.3.0: undefined reference to `dlclose'`
../src/libssh.so.4.3.0: undefined reference to `dlerror'
../src/libssh.so.4.3.0: undefined reference to `dlsym'
../src/libssh.so.4.3.0: undefined reference to `dladdr'**
libssh does not use dlopen at all. It is either openssl or another library which needs dlopen and is not linked correctly.
You’re linking against the static libraries of openssl it is probably openssl which needs libdl.