commaai / openpilot

openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system on 275+ supported cars.
https://comma.ai/openpilot
MIT License
49.87k stars 9.09k forks source link

no member named 'sizeInBytes' in 'QImage' #26539

Closed Torch-HXM closed 1 year ago

Torch-HXM commented 1 year ago

Describe the bug

when I build the project with command "scons -u -j$(nproc)",the issue came out. `clang++ -o selfdrive/ui/qt/widgets/ssh_keys.o -c -std=c++1z -DSWAGLOG="\"common/swaglog.h\"" -D_REENTRANT -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QUICK_LIB -DQT_QUICKWIDGETS_LIB -DQT_QML_LIB -DQT_CORE_LIB -DQT_MESSAGELOGCONTEXT -DSTYLE_PATH=\"/home/torch/Desktop/openpilot/selfdrive/navd/style.json\" -Wno-deprecated-declarations -g -fPIC -O2 -Wunused -Werror -Wshadow -Wno-unknown-warning-option -Wno-deprecated-register -Wno-register -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-reorder-init-list -Wno-error=unused-but-set-variable -DSWAGLOG="\"common/swaglog.h\"" -DENABLE_MAPS -I. -Ithird_party/acados/include -Ithird_party/acados/include/blasfeo/include -Ithird_party/acados/include/hpipm/include -Ithird_party/catch2/include -Ithird_party/libyuv/include -Ithird_party/json11 -Ithird_party/curl/include -Ithird_party/libgralloc/include -Ithird_party/android_frameworks_native/include -Ithird_party/android_hardware_libhardware/include -Ithird_party/android_system_core/include -Ithird_party/linux/include -Ithird_party/snpe/include -Ithird_party/mapbox-gl-native-qt/include -Ithird_party/qrcode -Ithird_party -Icereal -Iopendbc/can -I/home/torch/anaconda3/include -I/home/torch/anaconda3/include/qt -I/home/torch/anaconda3/include/qt/QtGui/5.12.8/QtGui -I/home/torch/anaconda3/include/qt/QtWidgets -I/home/torch/anaconda3/include/qt/QtGui -I/home/torch/anaconda3/include/qt/QtCore -I/home/torch/anaconda3/include/qt/QtNetwork -I/home/torch/anaconda3/include/qt/QtConcurrent -I/home/torch/anaconda3/include/qt/QtMultimedia -I/home/torch/anaconda3/include/qt/QtQuick -I/home/torch/anaconda3/include/qt/QtQml -I/home/torch/anaconda3/include/qt/QtQuickWidgets -I/home/torch/anaconda3/include/qt/QtLocation -I/home/torch/anaconda3/include/qt/QtPositioning -I/home/torch/anaconda3/include/qt/QtDBus -Iselfdrive/ui/qt selfdrive/ui/qt/widgets/ssh_keys.cc selfdrive/navd/map_renderer.cc:153:14: error: no member named 'sizeInBytes' in 'QImage' assert(cap.sizeInBytes() >= buf->len*4);


/usr/include/assert.h:93:27: note: expanded from macro 'assert'
     (static_cast <bool> (expr)                                         \
                          ^~~~
`

### OS Version

Ubuntu 20.04

### openpilot version or commit

_No response_

### Additional info

I have done the basic job according to the /tools/README.md,all goes well until the issue.
Torch-HXM commented 1 year ago

I have solved this problem.I found that when the project is compiled, the anaconda qt will be used preferentially,so I removed anaconda,then everything goes well.