AaronLK / libibeo

C++ client library to interface with Ibeo LUX laser scanners
GNU Lesser General Public License v3.0
10 stars 5 forks source link

How should I go about Compiling this? #1

Open garethellis0 opened 8 years ago

garethellis0 commented 8 years ago

Hey Aaron,

I'm trying to get this program to compile, but running into some problems with cmake and ninja. How should I get this to compile? Do you normally just do it through codeblocks? Because the .sh file keeps failing for me at the cmake line.

AaronLK commented 8 years ago

What output are you getting from the setupbuild.sh script?

Once that is done, you can either use ninja from the command line or the codeblocks build command, either will work.

Aaron

On Tue, Oct 13, 2015 at 7:07 AM, garethellis0 notifications@github.com wrote:

Hey Aaron,

I'm trying to get this program to compile, but running into some problems with cmake and ninja. How should I get this to compile? Do you normally just do it through codeblocks? Because the .sh file keeps failing for me at the cmake line.

— Reply to this email directly or view it on GitHub https://github.com/AaronLK/libibeo/issues/1.

garethellis0 commented 8 years ago

Alright, fixed the compile errors by just switching from Ninja to the Unix makefiles, my bad, should have tried that in the first place. Now I'm getting errors with building the program in CodeBlocks. I keep getting the error shown below. Any suggestions? Thanks!

||=== Build: all in Project (compiler: GNU GCC Compiler) ===| CMakeFiles\Makefile2|85|recipe for target 'libibeo/CMakeFiles/ibeo.dir/all' failed| C:\Users\Gareth\Downloads\libibeo-master\build\release\Makefile|83|recipe for target 'all' failed| ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

As an added note, when running the setupbuild.sh file, it throws several errors

cannot find source file: include/message_types.h CMake Error: CMake can not determine linker languages for target: ibeo CMake Error: Cannot determine the link language for target "ibeo".

AaronLK commented 8 years ago

I need more output to help. Can you rerun the configuration, then run make from the command line and send me all that output?

Aaron

On Fri, Oct 16, 2015 at 8:18 AM, garethellis0 notifications@github.com wrote:

Alright, fixed the compile errors by just switching from Ninja to the Unix makefiles, my bad, should have tried that in the first place. Now I'm getting errors with building the program in CodeBlocks. I keep getting the error shown below. Any suggestions? Thanks!

||=== Build: all in Project (compiler: GNU GCC Compiler) ===| CMakeFiles\Makefile2|85|recipe for target 'libibeo/CMakeFiles/ibeo.dir/all' failed| C:\Users\Gareth\Downloads\libibeo-master\build\release\Makefile|83|recipe for target 'all' failed| ||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

— Reply to this email directly or view it on GitHub https://github.com/AaronLK/libibeo/issues/1#issuecomment-148744302.

garethellis0 commented 8 years ago

$ make Scanning dependencies of target ibeo make[2]: * No rule to make target 'libibeo/CMakeFiles/ibeo.dir/build'. Stop. CMakeFiles/Makefile2:85: recipe for target 'libibeo/CMakeFiles/ibeo.dir/all' failed make[1]: * [libibeo/CMakeFiles/ibeo.dir/all] Error 2 makefile:83: recipe for target 'all' failed make: *\ [all] Error 2

AaronLK commented 8 years ago

I still can't tell what commands you are running. Here is the type of verbosity that can help me out - this is a clone, setup build, and build output:

aaron@linux /tmp $ git clone git@github.com:AaronLK/libibeo.git remote: Counting objects: 61, done. remote: Total 61 (delta 0), reused 0 (delta 0), pack-reused 61 Receiving objects: 100% (61/61), 22.53 KiB | 0 bytes/s, done. Resolving deltas: 100% (22/22), done. Checking connectivity... done.

aaron@linux /tmp $ cd libibeo/ aaron@linux /tmp/libibeo $ ls CMakeLists.txt libibeo LICENSE README.md setupbuild.sh utils

aaron@linux /tmp/libibeo $ ./setupbuild.sh -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is GNU 4.8.2 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Boost version: 1.54.0 -- Found the following Boost libraries: -- system -- thread -- Configuring done -- Generating done -- Build files have been written to: /tmp/libibeo/build/debug -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is GNU 4.8.2 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Boost version: 1.54.0 -- Found the following Boost libraries: -- system -- thread -- Configuring done -- Generating done -- Build files have been written to: /tmp/libibeo/build/release

aaron@linux /tmp/libibeo $ cd build/debug/

aaron@linux /tmp/libibeo/build/debug $ ninja -v [1/4] /usr/bin/c++ -Dibeo_EXPORTS -std=c++0x -g -fPIC -I../../libibeo/include -MMD -MT libibeo/CMakeFiles/ibeo.dir/libibeo.cpp.o -MF "libibeo/CMakeFiles/ibeo.dir/libibeo.cpp.o.d" -o libibeo/CMakeFiles/ibeo.dir/libibeo.cpp.o -c ../../libibeo/libibeo.cpp [2/4] : && /usr/bin/c++ -fPIC -std=c++0x -g -shared -Wl,-soname,libibeo.so -o libibeo/libibeo.so libibeo/CMakeFiles/ibeo.dir/libibeo.cpp.o -lboost_system -lboost_thread -lpthread && : [3/4] /usr/bin/c++ -std=c++0x -g -I../../libibeo/include -MMD -MT utils/ibeoscan/CMakeFiles/ibeoscan.dir/main.cpp.o -MF "utils/ibeoscan/CMakeFiles/ibeoscan.dir/main.cpp.o.d" -o utils/ibeoscan/CMakeFiles/ibeoscan.dir/main.cpp.o -c ../../utils/ibeoscan/main.cpp [4/4] : && /usr/bin/c++ -std=c++0x -g utils/ibeoscan/CMakeFiles/ibeoscan.dir/main.cpp.o -o utils/ibeoscan/ibeoscan -rdynamic libibeo/libibeo.so -lboost_system -lboost_thread -lpthread -Wl,-rpath,/tmp/libibeo/build/debug/libibeo && :

On Thu, Oct 22, 2015 at 9:52 AM, garethellis0 notifications@github.com wrote:

$ make Scanning dependencies of target ibeo make[2]: * No rule to make target 'libibeo/CMakeFiles/ibeo.dir/build'. Stop. CMakeFiles/Makefile2:85: recipe for target 'libibeo/CMakeFiles/ibeo.dir/all' failed make[1]: * [libibeo/CMakeFiles/ibeo.dir/all] Error 2 makefile:83: recipe for target 'all' failed make: *\ [all] Error 2

— Reply to this email directly or view it on GitHub https://github.com/AaronLK/libibeo/issues/1#issuecomment-150288765.

garethellis0 commented 8 years ago

This is my setup-build output:

`gareth@gareth-vb:~/Desktop/libibeo-master$ ./setupbuild.sh mkdir: cannot create directory ‘build’: File exists mkdir: cannot create directory ‘debug’: File exists mkdir: cannot create directory ‘release’: File exists -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is unknown -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- broken CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "/usr/bin/cc" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/gareth/Desktop/libibeo-master/build/debug/CMakeFiles/CMakeTmp

Run Build Command:/usr/sbin/ninja cmTryCompileExec2288943030

die: error: unable to read configuration filelog: reading configuration file: cmTryCompileExec2288943030

CMake will not be able to correctly generate this project. Call Stack (most recent call first):

-- Configuring incomplete, errors occurred! See also "/home/gareth/Desktop/libibeo-master/build/debug/CMakeFiles/CMakeOutput.log". See also "/home/gareth/Desktop/libibeo-master/build/debug/CMakeFiles/CMakeError.log". -- The C compiler identification is GNU 4.8.2 -- The CXX compiler identification is unknown -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- broken CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "/usr/bin/cc" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/gareth/Desktop/libibeo-master/build/release/CMakeFiles/CMakeTmp

Run Build Command:/usr/sbin/ninja cmTryCompileExec4068999972

die: error: unable to read configuration filelog: reading configuration file: cmTryCompileExec4068999972

CMake will not be able to correctly generate this project. Call Stack (most recent call first):

-- Configuring incomplete, errors occurred! See also "/home/gareth/Desktop/libibeo-master/build/release/CMakeFiles/CMakeOutput.log". See also "/home/gareth/Desktop/libibeo-master/build/release/CMakeFiles/CMakeError.log". `

garethellis0 commented 8 years ago

The generated CMakeError.log:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: CMAKE_CXX_COMPILER-NOTFOUND Build flags: Id flags:

The output was: No such file or directory

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: CMAKE_CXX_COMPILER-NOTFOUND Build flags: Id flags: -c

The output was: No such file or directory

Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler": Determining if the C compiler works failed with the following output: Change Dir: /home/gareth/Desktop/libibeo-master/build/debug/CMakeFiles/CMakeTmp

Run Build Command:/usr/sbin/ninja cmTryCompileExec2288943030 die: error: unable to read configuration filelog: reading configuration file: cmTryCompileExec2288943030

garethellis0 commented 8 years ago

The generated CMakeOutput.log

The system is: Linux - 3.13.0-24-generic - x86_64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: /usr/bin/cc Build flags: Id flags:

The output was: 0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/gareth/Desktop/libibeo-master/build/debug/CMakeFiles/2.8.12.2/CompilerIdC/a.out"

AaronLK commented 8 years ago

Well, it looks like your development environment is either broken or not setup correctly, and you don't appear to have a C++ compiler installed (g++).

Aaron

On Fri, Oct 30, 2015 at 8:16 AM, garethellis0 notifications@github.com wrote:

The generated CMakeOutput.log

The system is: Linux - 3.13.0-24-generic - x86_64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: /usr/bin/cc Build flags: Id flags:

The output was: 0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/gareth/Desktop/libibeo-master/build/debug/CMakeFiles/ 2.8.12.2/CompilerIdC/a.out"

— Reply to this email directly or view it on GitHub https://github.com/AaronLK/libibeo/issues/1#issuecomment-152552957.