oscit build error & fix

7 views
Skip to first unread message

Quentin Berthet

unread,
Dec 12, 2009, 5:40:07 PM12/12/09
to ru...@googlegroups.com
Hi Gaspard and list !

Here are the log of the oscit compilation problemes I had, and the corrections I have found. 
I don't think it is the c++ way of doing things, and I don't know why this is necessary on my setup (karmic-koala up to date), But It Work(tm). 

So the first problem: 

tumnao@ubuntu-dev:~/rubyk/oscit$ make
cd build && cmake ..
STATUS,Guessing Linux host endianess to be little endian.
STATUS,You can run cmake with -DENDIANESS=OSC_HOST_BIG_ENDIAN if you need to change this setting.
-- ===========================================================================
--    OSCIT build configuration settings                                      
-- ===========================================================================
--    Platform                                                     = linux
--    OSCIT_ENABLE_TESTING  (Build and run tests)                  = ON
--    OSCIT_MEMORY_CHECKING (Enable checking against memory leaks) = OFF
-- ===========================================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tumnao/rubyk/oscit/build
cd build && make
make[1]: Entering directory `/home/tumnao/rubyk/oscit/build'
make[2]: Entering directory `/home/tumnao/rubyk/oscit/build'
make[3]: Entering directory `/home/tumnao/rubyk/oscit/build'
[  2%] Generating ../src/value.cpp
[  4%] Generating ../src/mapper.cpp
[  7%] Generating ../src/url.cpp
make[3]: Leaving directory `/home/tumnao/rubyk/oscit/build'
make[3]: Entering directory `/home/tumnao/rubyk/oscit/build'
[  9%] Building CXX object CMakeFiles/oscit.dir/src/matrix.cpp.o
[ 11%] Building CXX object CMakeFiles/oscit.dir/src/list.cpp.o
[ 14%] Building CXX object CMakeFiles/oscit.dir/src/thread.cpp.o
[ 16%] Building CXX object CMakeFiles/oscit.dir/src/file.cpp.o
[ 19%] Building CXX object CMakeFiles/oscit.dir/src/callback.cpp.o
[ 21%] Building CXX object CMakeFiles/oscit.dir/src/osc_map_command.cpp.o
In file included from /home/tumnao/rubyk/oscit/include/oscit/osc_command.h:5,
                 from /home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h:7,
                 from /home/tumnao/rubyk/oscit/src/osc_map_command.cpp:1:
/home/tumnao/rubyk/oscit/include/oscit/command.h:28: error: ‘uint16_t’ has not been declared
/home/tumnao/rubyk/oscit/include/oscit/command.h:32: error: ‘uint16_t’ has not been declared
/home/tumnao/rubyk/oscit/include/oscit/command.h:76: error: ‘uint16_t’ does not name a type
/home/tumnao/rubyk/oscit/include/oscit/command.h:149: error: ‘uint16_t’ does not name a type
In file included from /home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h:7,
                 from /home/tumnao/rubyk/oscit/src/osc_map_command.cpp:1:
/home/tumnao/rubyk/oscit/include/oscit/osc_command.h:16: error: expected ‘)’ before ‘port’
/home/tumnao/rubyk/oscit/include/oscit/osc_command.h:18: error: ‘uint16_t’ has not been declared
/home/tumnao/rubyk/oscit/include/oscit/osc_command.h:40: error: ‘uint16_t’ has not been declared
In file included from /home/tumnao/rubyk/oscit/src/osc_map_command.cpp:1:
/home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h:19: error: expected ‘)’ before ‘port’
/home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h:70: error: ‘uint16_t’ does not name a type
/home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h: In member function ‘const oscit::Value oscit::OscMapCommand::port(const oscit::Value&)’:
/home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h:25: error: ‘port_’ was not declared in this scope
/home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h:31: error: ‘port_’ was not declared in this scope
/home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h: In member function ‘const oscit::Value oscit::OscMapCommand::reply_port(const oscit::Value&)’:
/home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h:38: error: ‘reply_port_’ was not declared in this scope
/home/tumnao/rubyk/oscit/include/oscit/osc_map_command.h:42: error: ‘reply_port_’ was not declared in this scope
/home/tumnao/rubyk/oscit/src/osc_map_command.cpp: In constructor ‘oscit::OscMapCommand::OscMapCommand()’:
/home/tumnao/rubyk/oscit/src/osc_map_command.cpp:16: error: class ‘oscit::OscMapCommand’ does not have any field named ‘reply_port_’
/home/tumnao/rubyk/oscit/src/osc_map_command.cpp: At global scope:
/home/tumnao/rubyk/oscit/src/osc_map_command.cpp:19: error: expected ‘)’ before ‘port’
make[3]: *** [CMakeFiles/oscit.dir/src/osc_map_command.cpp.o] Error 1
make[3]: Leaving directory `/home/tumnao/rubyk/oscit/build'
make[2]: *** [CMakeFiles/oscit.dir/all] Error 2
make[2]: Leaving directory `/home/tumnao/rubyk/oscit/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/tumnao/rubyk/oscit/build'
make: *** [default] Error 2
tumnao@ubuntu-dev:~/rubyk/oscit$ 

For this i've just added #include "stdint.h" on the top of oscit/include/oscit/command.h.. 

And then the second :

tumnao@ubuntu-dev:~/rubyk/oscit$ make
cd build && cmake ..
STATUS,Guessing Linux host endianess to be little endian.
STATUS,You can run cmake with -DENDIANESS=OSC_HOST_BIG_ENDIAN if you need to change this setting.
-- ===========================================================================
--    OSCIT build configuration settings                                      
-- ===========================================================================
--    Platform                                                     = linux
--    OSCIT_ENABLE_TESTING  (Build and run tests)                  = ON
--    OSCIT_MEMORY_CHECKING (Enable checking against memory leaks) = OFF
-- ===========================================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tumnao/rubyk/oscit/build
cd build && make
make[1]: Entering directory `/home/tumnao/rubyk/oscit/build'
make[2]: Entering directory `/home/tumnao/rubyk/oscit/build'
make[3]: Entering directory `/home/tumnao/rubyk/oscit/build'
Scanning dependencies of target oscit
make[3]: Leaving directory `/home/tumnao/rubyk/oscit/build'
make[3]: Entering directory `/home/tumnao/rubyk/oscit/build'
[  2%] Building CXX object CMakeFiles/oscit.dir/src/value.cpp.o
[  4%] Building CXX object CMakeFiles/oscit.dir/src/matrix.cpp.o
[  7%] Building CXX object CMakeFiles/oscit.dir/src/list.cpp.o
[  9%] Building CXX object CMakeFiles/oscit.dir/src/file.cpp.o
[ 11%] Building CXX object CMakeFiles/oscit.dir/src/osc_map_command.cpp.o
[ 14%] Building CXX object CMakeFiles/oscit.dir/src/script.cpp.o
[ 16%] Building CXX object CMakeFiles/oscit.dir/src/osc_command.cpp.o
[ 19%] Building CXX object CMakeFiles/oscit.dir/src/location.cpp.o
[ 21%] Building CXX object CMakeFiles/oscit.dir/src/midi_message.cpp.o
In file included from /home/tumnao/rubyk/oscit/src/midi_message.cpp:1:
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h: In member function ‘bool oscit::MidiMessage::set(std::vector<unsigned char, std::allocator<unsigned char> >&, time_t)’:
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h:68: error: ‘stderr’ was not declared in this scope
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h:68: error: ‘fprintf’ was not declared in this scope
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h: In member function ‘void oscit::MidiMessage::set_channel(int)’:
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h:141: error: ‘stderr’ was not declared in this scope
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h:141: error: ‘fprintf’ was not declared in this scope
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h: In member function ‘unsigned int oscit::MidiMessage::channel() const’:
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h:183: error: ‘stderr’ was not declared in this scope
/home/tumnao/rubyk/oscit/include/oscit/midi_message.h:183: error: ‘fprintf’ was not declared in this scope
make[3]: *** [CMakeFiles/oscit.dir/src/midi_message.cpp.o] Error 1
make[3]: Leaving directory `/home/tumnao/rubyk/oscit/build'
make[2]: *** [CMakeFiles/oscit.dir/all] Error 2
make[2]: Leaving directory `/home/tumnao/rubyk/oscit/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/tumnao/rubyk/oscit/build'
make: *** [default] Error 2
tumnao@ubuntu-dev:~/rubyk/oscit$ 

For this, added #include <stdio.h> on top of oscit/include/oscit/midi_message.h and this is ok, except the test_runner who get stuck in :

test 1
    Start 1: oscit_test

1: Test command: /home/tumnao/rubyk/oscit/build/test_runner
1: Test timeout computed to be: 9.99988e+06
1: Running 342 tests........................................................................................................................
1: In ThreadTest::test_create_stop:
1: /home/tumnao/rubyk/oscit/test/thread_test.h:111: counter.value_ ==> 1 != 2
1: In ThreadTest::test_create_kill:
1: /home/tumnao/rubyk/oscit/test/thread_test.h:126: counter.value_ ==> 2 != 1
1: Could not set thread priority to 42 (Operation not permitted). You might need to run the application as super user.
1: .
1: In ThreadTest::test_create_high_priority:
1: /home/tumnao/rubyk/oscit/test/thread_test.h:158: counter.value_ ==> 1 != 2

But you've told me it is normal.

I will also try to compile mimas this evening, and as soon as my first build of openembedded is done, I will try to compile it with oscit for the gumstix :-)

++
Quentin






Gaspard Bucher

unread,
Dec 13, 2009, 3:12:27 AM12/13/09
to ru...@googlegroups.com
Thanks for the feedback Quentin !

The fixes you propose are perfectly fine (I just replaced fprintf by
std::cerr). It's just strange these errors don't show up in my linux
box...

I pushed the changes to github.

Gaspard
> --
> _______________________________________________
> rubyk mailing list
> ru...@rubyk.org
> http://rubyk.org/en/community
Reply all
Reply to author
Forward
0 new messages