Board index FlightGear Support Compiling

here's why brisa's script won't compile anymore on Debian's  Topic is solved

Building FlightGear from source, and in the need for help?

here's why brisa's script won't compile anymore on Debian's

Postby hamzaalloush » Tue Mar 17, 2015 9:55 pm

hi,

the brisa's (download_and_compile) script started doing funny things since fglauncher's introduction to the 3.4 release branch on SF.

the QT5 code written for fglauncher requires C++ members otherwise not provided with system-side QT libraries found on the stable versions of debian based distros, but instead requires developmental QT5 libraries/external packages(that might conflict with the QT environment).

i'll provide the compile log, along with the source code for my system-side native (v5.2.1) QT5 libraries that Brisa's d&c script depends on for my Ubuntu 14.04, namely the "qt5-default" package on Ubuntu, it results in compile error, so here's the full dependancies in Brisa's d&c script for FlightGear:

Code: Select all
# FG
PKG="$PKG libopenal-dev libudev-dev qt5-default libdbus-1-dev libpng12-dev libplib-dev"


this will result in compilation failure on Ubuntu's stable Trusty's 14.04, Linux Mint Qiana and Olivia, and possibly others.

for this to work you'll need Ubuntu's Utopic 14.10 or Ubuntu's "next" 15.04 to get appropriate version of libraries that build.

the code that the fglauncher is written upon depends on (v5.3) QT5 source libraries, these are the cause of the errors.

here's Ubuntu's system-side QT5 versions for their appropriate releases, you need v5.3 QT5 libraries or more: http://packages.ubuntu.com/trusty/qtbase5-dev

disclaimer, i'm not a C++ programmer, but hopefully i have some principles to atleast pinpoint this issue.

here's proof from the build log that "make" did infact include QT's system-side libraries:
Code: Select all
-I/usr/include/qt5 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64



first we begin with our compiler error:
Code: Select all
[ 23%] Built target fgcom
[ 23%] Automoc for target fglauncher
[ 23%] Built target fglauncher_automoc
[ 23%] Building CXX object src/GUI/CMakeFiles/fglauncher.dir/QtLauncher.cxx.o
In file included from /home/hamza/build/FlightGear/stable/flightgear/src/GUI/QtLauncher.cxx:35:0:
/home/hamza/build/FlightGear/stable/build/flightgear/src/GUI/ui_Launcher.h: In member function ‘void Ui_Launcher::retranslateUi(QDialog*)’:
/home/hamza/build/FlightGear/stable/build/flightgear/src/GUI/ui_Launcher.h:588:26: error: ‘class QPlainTextEdit’ has no member named ‘setPlaceholderText’
         commandLineArgs->setPlaceholderText(QApplication::translate("Launcher", "--option=value --prop:/sim/name=value", 0));
                          ^
make[2]: *** [src/GUI/CMakeFiles/fglauncher.dir/QtLauncher.cxx.o] Error 1
make[1]: *** [src/GUI/CMakeFiles/fglauncher.dir/all] Error 2
make: *** [all] Error 2


here is the journey for the error:

1 - FlightGear's 3.4 "QTLauncher.cxx" includes "ui_Launcher.h"
[#include "ui_Launcher.h"]

2 - declaring pointer "commandLineArgs" of type "QPlainTextEdit", in "ui_Launcher.h" .
[QPlainTextEdit *commandLineArgs;]

3 - pointer "commandLineArgs" given class "QPlainTextEdit" and assigned address, in "ui_Launcher.h".
[commandLineArgs = new QPlainTextEdit(groupBox_2);]

4 - "commandLineArgs" gets called to access member method "setPlaceholderText", in "ui_Launcher.h."
[commandLineArgs->setPlaceholderText(QApplication::translate("Launcher", "--option=value --prop:/sim/name=value", 0));]

5 - system-side QT5 library "/usr/include/qt5/QtWidgets/qplaintextedit.h" gets called by "commandLineArgs" to find "setPlaceholderText" implementation and cannot find it!

thus the error,

Code: Select all
error: ‘class QPlainTextEdit’ has no member named ‘setPlaceholderText’
         commandLineArgs->setPlaceholderText(QApplication::translate("Launcher", "--option=value --prop:/sim/name=value", 0));


this method has not been implemented yet in the class prior to QT 5.3:
http://doc.qt.io/qt-5/qplaintextedit.html

James Turner has released a commit but i don't know if it has been merged into release/3.4 yet?
http://sourceforge.net/p/flightgear/flightgear/ci/a3d3e81a86c8c5485506335cb5b8aa0714b69e88/
Last edited by hamzaalloush on Wed Mar 18, 2015 1:52 am, edited 1 time in total.
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: here's why brisa's script won't compile anymore on Debia

Postby hamzaalloush » Tue Mar 17, 2015 10:12 pm

this is just a glimpse of the future for QT5 and added maintanance requirements.

personally, if the fglauncher is an experimental feature for 3.4, i didn't use it before, why not move it to next?
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: here's why brisa's script won't compile anymore on Debia

Postby wkitty42 » Tue Mar 17, 2015 10:51 pm

flyingsolo wrote in Tue Mar 17, 2015 9:55 pm:hi,

the brisa's (download_and_compile) script started doing funny things since fglauncher's introduction to the 3.4 release branch on SF.

the code written for fglauncher requires QT5 libraries with C++ members otherwise not compatable with system-side QT libraries found on the stable versions of debian based distros, but instead requires developmental QT5 libraries/external packages(that might conflict with the QT environment).

i'll provide the compile log, along with the source code for my system-side native (v5.2.1) QT5 libraries that Brisa's d&c script depends on for my Ubuntu 14.04, namely the "qt5-default" package on Ubuntu, it results in compile error, so here's the full dependancies in Brisa's d&c script for FlightGear:

Code: Select all
# FG
PKG="$PKG libopenal-dev libudev-dev qt5-default libdbus-1-dev libpng12-dev libplib-dev"


this will result in compilation failure on Ubuntu's stable Trusty's 14.04, Linux Mint Qiana and Olivia, and possibly others.

it is working just fine over here... i'm on kubuntu 14.04 and have not had any problems at all... packages were installed when i first ran the dnc script a week before the fgdata repo was split into two parts... then after that split, i got the new dnc v2.32 script from the fg meta repository on sourceforge... i let it install packages of which there were only 5 or 7 IIRC... since then i've not had it install any other packages and the compiles have been just fine... i even have the Qt5 --launcher option working...

FWIW: the dns script is up to v2.33 and contains the new repo urls... i haven't updated my meta repo from sf in a few days so there may even be a newer version with a few more updated urls... i know there are/were two or three still pointing to gitorious...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6662
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: here's why brisa's script won't compile anymore on Debia

Postby hamzaalloush » Tue Mar 17, 2015 11:24 pm

i was using the git d&c, will look into fgmeta at SF now.



can please post the contents of these commands?

Code: Select all
$ cat $branchdir/build/flighthear/src/Main/CMakeFiles/fgfs.dir/flags.make

$ grep "commandLineArgs" $branchdir/build/flighthear/src/GUI/ui_Launcher.h

$ grep "void set" /usr/include/qt5/QtWidgets/qplaintextedit.h



where you edit $branchdir to your stable | next directory for d&c

are you using stable or next btw?

thanks
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: here's why brisa's script won't compile anymore on Debia

Postby hamzaalloush » Tue Mar 17, 2015 11:39 pm

it says on your profile you use git(i assume you use the next branch), that explains it, you already have the patches if so. unless you have non-native QT5. in which case the result of these commands will be really helpfull to decide.
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: here's why brisa's script won't compile anymore on Debia

Postby hamzaalloush » Wed Mar 18, 2015 10:48 am

bug report is up

http://sourceforge.net/p/flightgear/codetickets/1709/

please vote if you have this issue, i have now idea how to handle bug reports it says "closed"
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: here's why brisa's script won't compile anymore on Debia

Postby wkitty42 » Wed Mar 18, 2015 1:41 pm

yes, sorry about that... i am using 3.5.0... i don't think i've tried 3.4.0 from git since the split... i guess i should... sorry for the feathered props...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6662
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: here's why brisa's script won't compile anymore on Debia

Postby hamzaalloush » Thu Mar 19, 2015 1:45 am

until James's patch gets merged into release/3.4, you can safely disable the fglauncher functionality by manually adding the "-DENABLE_QT=off" parameter into FG's CMake options in the script, like so:

Code: Select all
if [ "$RECONFIGURE" = "y" ]; then
      cd "$CBD"
      mkdir -p build/flightgear
      cd "$CBD"/build/flightgear
      rm -f CMakeCache.txt
      cmake -DCMAKE_BUILD_TYPE="Release" \
            -DENABLE_FLITE=ON \
            -DENABLE_QT=off \
            -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_FGFS" \
            -DCMAKE_PREFIX_PATH="$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_OPENRTI;$INSTALL_DIR_PLIB" \
            ../../flightgear 2>&1 | tee -a $LOGFILE
    fi


to do this easily without using a text editor, simply navigate in the console to the directory where the download_and_compile.sh script is located, and execute this 'sed' command:
Code: Select all
sed -i '/-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_FGFS"/i\            -DENABLE_QT=off\ \\' ./download_and_compile.sh && chmod +x download_and_compile.sh
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: here's why brisa's script won't compile anymore on Debia  

Postby Hooray » Thu Mar 19, 2015 2:34 pm

flyingsolo wrote in Tue Mar 17, 2015 9:55 pm:the QT5 code written for fglauncher requires C++ members otherwise not provided with system-side QT libraries found on the stable versions of debian based distros, but instead requires developmental QT5 libraries/external packages(that might conflict with the QT environment).

Ideally, this should really be raised on the devel list - or by filing a support ticket to ensure that this is getting sufficient attention.
Alternatively, I suggest to send a PM to F-JJTH and/or Zakalawe with a heads-up linking to this discussion - as this is an important issue, especially in the light of the Qt5 launcher possibly becoming increasingly integrated, and maybe even enabled by default at some point - so such issues related to dependencies should really be brought to the attention of the corresponding developers early on.

So. if you can, please post a follow-up to the devel list, and/or the issue tracker - or at least get in toch with any of the two core developers, or even both to ensure that this won't be a problem for FG 3.6+

Thank you
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11977
Joined: Tue Mar 25, 2008 8:40 am

Re: here's why brisa's script won't compile anymore on Debia

Postby hamzaalloush » Thu Mar 19, 2015 7:20 pm

here is James's reply on the support ticket created for this issue:

https://sourceforge.net/p/flightgear/codetickets/1709/

James Turner wrote:The qt launcher is not intended for use on non-OSX platforms in 3.4. It's being generalised to work on all platforms on 'next' for 3.6, but it should be ignored by anyone except me in 3.4

(Eg, there is language on the buttons which is OS-X specific, references to 'the Finder')


in addition of linking this thread to F-JJTH and/or Zakalawe, should i duplicate this ticket and set a Milestone for 3.6 on the issue tracker at SF?

please advice,

Thanks
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: here's why brisa's script won't compile anymore on Debia

Postby hamzaalloush » Fri Mar 20, 2015 8:21 pm

Suggested fix for the download_and_compile script on next, it is ment for people who will stick with Ubuntu LTS which still has long way to go and might stick with these older libraries:

Code: Select all
--- a/download_and_compile.sh
+++ b/download_and_compile.sh
@@ -255,6 +255,19 @@
 fi
 
 #######################################################
+# QT5 COMPATIBILITY WITH 3.4
+#######################################################
+
+function _qt5Fix(){
+  if [ "$FGVERSION" = "release/3.4.0" ]; then
+    cd "$CBD"/flightgear
+    git config user.name "alias"
+    git config user.email "email-blocked"
+    git cherry-pick a3d3e81a86c8c5485506335cb5b8aa0714b69e88 2>&1 | tee -a $LOGFILE
+  fi
+}
+
+#######################################################
 # PLIB
 #######################################################
 PLIB_INSTALL_DIR=plib
@@ -363,6 +376,7 @@
   if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="FGFS"' ]]; then
     _gitDownload git://git.code.sf.net/p/flightgear/flightgear
     _gitUpdate $FGVERSION
+    _qt5Fix
 
     if [ "$RECONFIGURE" = "y" ]; then
       cd "$CBD"
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: here's why brisa's script won't compile anymore on Debia

Postby hamzaalloush » Mon Mar 23, 2015 7:51 pm

the 3.4 release QT5 option now defaults to OFF, after Zakalawe added fix into the branch.
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest