AutoModelCar / AutoModelCarWiki

59 stars 25 forks source link

Error in set2.sh when freeshly flashed #7

Closed hector-sab closed 7 years ago

hector-sab commented 7 years ago

After flashing the emmc and running the set2.sh script the following error shows up. I have followed the Flashing guide (and done it successfully in the past), but this time is different somehow.

mkdir -p obj/libuvc
mkdir -p lib
mkdir -p bin
g++ src/image.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0`  -c -o obj/image.o
src/image.cpp: In function 'size_t rsimpl::get_image_size(int, int, rs_format)':
src/image.cpp:38:38: error: request for member 'c_str' in 'format', which is of non-class type 'rs_format'
         default: std::cout << format.c_str() << std::endl;
                                      ^
make: *** [obj/image.o] Error 1

Any help is greatly appreciated

ZahraBoroujeni commented 7 years ago

Instead running the setup1.sh and setup2.sh, could you run the commands inside them line by line in the terminal? If you run the lines we can find where is the problem exactly. Don't forget to reboot after last line of setup1.sh

hector-sab commented 7 years ago

All commands in set.sh work just fine, making glfw and copying all files in the respective folders. However, in set2.sh after cd librealsense, when running make install, it shows up the error mentioned above.

Edit: After checking the first log (make install) of the set.sh the next warning shows up

Linking C shared library libglfw.so
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 26%] Built target glfw
make[2]: Warning: File `examples/CMakeFiles/boing.dir/flags.make' has modification time 2.2e+04 s in the future
.
.
Linking C executable boing
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 28%] Built target boing
make[2]: Warning: File `examples/CMakeFiles/gears.dir/flags.make' has modification time 2.2e+04 s in the future
.
.
Linking C executable particles
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 40%] Built target particles
make[2]: Warning: File `examples/CMakeFiles/simple.dir/flags.make' has modification time 2.2e+04 s in the future
.
.
Linking C executable wave
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 46%] Built target wave
make[2]: Warning: File `tests/CMakeFiles/clipboard.dir/flags.make' has modification time 2.2e+04 s in the future
.
.
Linking C executable cursor
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 53%] Built target cursor
make[2]: Warning: File `tests/CMakeFiles/empty.dir/flags.make' has modification time 2.2e+04 s in the future
.
.
Linking C executable empty
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 57%] Built target empty
make[2]: Warning: File `tests/CMakeFiles/events.dir/flags.make' has modification time 2.2e+04 s in the future
.
.
Linking C executable events
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
[ 61%] Built target events
make[2]: Warning: File `tests/CMakeFiles/gamma.dir/flags.make' has modification time 2.2e+04 s in the future
.
.
make: warning:  Clock skew detected.  Your build may be incomplete.
set 1 is finished, reboot please!

The full log is in here

ZahraBoroujeni commented 7 years ago

I can guess that you did not set time correctly:

for example: date --set "2016-11-16 11:03:00"

hector-sab commented 7 years ago

I forgot to update the date in the log that I showed you, when updated no warning in set.sh is presented. However, the problem with set2.sh still remains, same error:

# 12:27:53 Parmida-12:~> date --set "2016-11-16 12:29:00"
Wed Nov 16 12:29:00 UTC 2016
# 12:29:00 Parmida-12:~> ./set2.sh 
mkdir -p obj/libuvc
mkdir -p lib
mkdir -p bin
cc src/verify.c -std=c89 -Iinclude -c -o obj/verify.o
g++ src/context.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0`  -c -o obj/context.o
g++ src/device.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0`  -c -o obj/device.o
g++ src/f200-private.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0`  -c -o obj/f200-private.o
g++ src/f200.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0`  -c -o obj/f200.o
g++ src/image.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0`  -c -o obj/image.o
src/image.cpp: In function 'size_t rsimpl::get_image_size(int, int, rs_format)':
src/image.cpp:38:38: error: request for member 'c_str' in 'format', which is of non-class type 'rs_format'
         default: std::cout << format.c_str() << std::endl;
                                      ^
make: *** [obj/image.o] Error 1
# 12:29:00 Parmida-12:~> date --set "2016-11-16 12:30:00"
Wed Nov 16 12:30:00 UTC 2016
# 12:30:00 Parmida-12:~> ./set2.sh 
mkdir -p obj/libuvc
mkdir -p lib
mkdir -p bin
g++ src/image.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0`  -c -o obj/image.o
src/image.cpp: In function 'size_t rsimpl::get_image_size(int, int, rs_format)':
src/image.cpp:38:38: error: request for member 'c_str' in 'format', which is of non-class type 'rs_format'
         default: std::cout << format.c_str() << std::endl;
                                      ^
make: *** [obj/image.o] Error 1
# 12:30:05 Parmida-12:~> ./set2.sh 
mkdir -p obj/libuvc
mkdir -p lib
mkdir -p bin
g++ src/image.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0`  -c -o obj/image.o
src/image.cpp: In function 'size_t rsimpl::get_image_size(int, int, rs_format)':
src/image.cpp:38:38: error: request for member 'c_str' in 'format', which is of non-class type 'rs_format'
         default: std::cout << format.c_str() << std::endl;
                                      ^
make: *** [obj/image.o] Error 1
# 12:30:11 Parmida-12:~> 
ZahraBoroujeni commented 7 years ago

Quick and dirty solution: Comment out the line 38 in src/image.cpp

default: std::cout << format.c_str() << std::endl

ZahraBoroujeni commented 7 years ago

Quick and dirty solution: or replace it for know with line below:

default: std::cout << "format.c_str()" << std::endl

AutoModelCar commented 7 years ago

the problem was how you copy the folder to odroid: do not use sudo to copy folder!

scp -r ...