rodlie / qtfm

Qt File Manager
https://qtfm.eu
GNU General Public License v2.0
156 stars 43 forks source link

AutoMoc subprocess error when trying to compile #162

Closed probonopd closed 3 years ago

probonopd commented 4 years ago

On a Xubuntu 18.04 Live ISO:

git clone https://github.com/rodlie/qtfm --depth 1
cd qtfm
mkdir build && cd build
sudo apt-get -y install libqt5widgets5 libqt5gui5 libqt5concurrent5 libqt5dbus5 libqt5core5a ffmpeg imagemagick udisks2 hicolor-icon-theme adwaita-icon-theme libavdevice57 libswscale4 libavformat57 libavcodec57 libavutil55 libmagickwand-dev libmagickcore-dev libmagick++-dev tree cmake git build-essential qtbase5-dev qt5-qmake libmagick++-dev libavdevice-dev libswscale-dev libavformat-dev libavcodec-dev libavutil-dev autogen
cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_MAGICK=true -DENABLE_FFMPEG=true ..
make -j$(nproc)

gives

[ 10%] Built target QtFMBus
[ 12%] Automatic MOC, UIC and RCC for target QtFM

AutoMoc subprocess error
------------------------
moc_predefs generation failed

Command
-------
/usr/bin/c++ -dM -E -c /usr/share/cmake-3.10/Modules/CMakeCXXCompilerABI.cpp -I/root/qtfm/build/QtFM_autogen/include -I/root/qtfm/build -I/root/qtfm/libfm -I/root/qtfm/libfm/qtcopydialog -I/usr/include/ImageMagick-6 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -I/usr/include/x86_64-linux-gnu/qt5/QtDBus -I/usr/include -D-fopenmp "-DAPP=\"qtfm\"" "-DAPP_NAME=\"QtFM\"" "-DAPP_VERSION=\"6.3.0\"" -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DWITH_FFMPEG -DWITH_MAGICK

Output
------
<command-line>:0:1: error: macro names must be identifiers

(...)

CMakeFiles/QtFM_autogen.dir/build.make:57: recipe for target 'CMakeFiles/QtFM_autogen' failed
make[2]: *** [CMakeFiles/QtFM_autogen] Error 1
CMakeFiles/Makefile2:220: recipe for target 'CMakeFiles/QtFM_autogen.dir/all' failed
make[1]: *** [CMakeFiles/QtFM_autogen.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2