Compile error - app/main.cpp #16774
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Build/Install
Related to compiling or installing QGIS
Author Name: Loïc BARTOLETTI (@lbartoletti)
Original Redmine Issue: 7902
Affected QGIS version: master
Redmine category:build/install
FreeBSD and other unix also using posix signal.
We have build error with app/main.cpp because the #ifdef #include on line 89 is only for linux :
@/usr/home/bart/Quantum-GIS/src/app/main.cpp:291: error: 'SIGQUIT' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:291: error: 'signal' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:292: error: 'SIGILL' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:293: error: 'SIGFPE' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:294: error: 'SIGSEGV' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:295: error: 'SIGBUS' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:296: error: 'SIGSYS' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:297: error: 'SIGTRAP' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:298: error: 'SIGXCPU' was not declared in this scope
/usr/home/bart/Quantum-GIS/src/app/main.cpp:299: error: 'SIGXFSZ' was not declared in this scope
gmake[2]: *** [src/app/CMakeFiles/qgis.dir/main.cpp.o] Erreur 1
gmake[1]: *** [src/app/CMakeFiles/qgis.dir/all] Erreur 2
gmake: *** [all] Erreur 2@
Solution :
Include unistd, execinfo and signal also for unix/bsd platform. Example for FreeBSD (with Q_OS_* defined) :
#ifdef Q_OS_FREEBSD /* and other unix bsd ? */
#include <unistd.h>
#include <execinfo.h>
#include <signal.h>
#endif
Related issue(s): #16780 (relates)
Redmine related issue(s): 7908
The text was updated successfully, but these errors were encountered: