Board index FlightGear Support Compiling

Ubuntu Terragear Download_and_compile.sh not working

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

Ubuntu Terragear Download_and_compile.sh not working

Postby statto » Sun Aug 26, 2018 11:50 am

I'm not able to get download_and_compile.sh to work - Simgear installed properly.

The last bits of the compilation/error message is below, does anyone have any ideas on how to move forward:

Code: Select all
/home/statto/Terragear/terragear/src/Lib/terragear/tg_misc.cxx:278:74: note: suggested alternative:
In file included from /usr/include/c++/5/random:38:0,
                 from /usr/include/c++/5/bits/stl_algo.h:66,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/CGAL/config.h:323,
                 from /usr/include/CGAL/basic.h:29,
                 from /usr/include/CGAL/Cartesian/Cartesian_base.h:28,
                 from /usr/include/CGAL/Simple_cartesian.h:28,
                 from /usr/include/CGAL/Exact_predicates_exact_constructions_kernel.h:28,
                 from /home/statto/Terragear/terragear/src/Lib/terragear/tg_misc.cxx:3:
/usr/include/c++/5/cmath:641:5: note:   ‘std::isnan’
     isnan(_Tp __x)
     ^
In file included from /home/statto/Terragear/install/simgear/include/simgear/bucket/newbucket.hxx:38:0,
                 from /home/statto/Terragear/terragear/src/Lib/terragear/tg_polygon.hxx:60,
                 from /home/statto/Terragear/terragear/src/Lib/terragear/tg_misc.cxx:8:
/home/statto/Terragear/install/simgear/include/simgear/constants.h: At global scope:
/home/statto/Terragear/install/simgear/include/simgear/constants.h:70:13: warning: ‘SG_DEGREES_TO_RADIANS’ defined but not used [-Wunused-variable]
 const float SG_DEGREES_TO_RADIANS = SG_PI / 180.0f;
             ^
/home/statto/Terragear/install/simgear/include/simgear/constants.h:71:13: warning: ‘SG_RADIANS_TO_DEGREES’ defined but not used [-Wunused-variable]
 const float SG_RADIANS_TO_DEGREES = 180.0f / SG_PI;
             ^
src/Lib/terragear/CMakeFiles/terragear.dir/build.make:158: recipe for target 'src/Lib/terragear/CMakeFiles/terragear.dir/tg_misc.cxx.o' failed
make[2]: *** [src/Lib/terragear/CMakeFiles/terragear.dir/tg_misc.cxx.o] Error 1
CMakeFiles/Makefile2:1070: recipe for target 'src/Lib/terragear/CMakeFiles/terragear.dir/all' failed
make[1]: *** [src/Lib/terragear/CMakeFiles/terragear.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
All optional package alternatives have found a matching package.
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2106
Joined: Fri Jan 25, 2008 9:57 pm

Re: Ubuntu Terragear Download_and_compile.sh not working

Postby FlugHund » Mon Aug 27, 2018 4:38 am

IIRC the script creates a log file, could you upload or paste it!
Also, which version of Ubuntu?
User avatar
FlugHund
 
Posts: 517
Joined: Thu Mar 01, 2007 3:27 pm
Callsign: D-HUND
IRC name: D-HUND / debdog
Version: next
OS: Devuan

Re: Ubuntu Terragear Download_and_compile.sh not working

Postby wkitty42 » Thu Aug 30, 2018 5:39 pm

the first question is: which version of ubuntu?

i have 14.04.5 here and had to back out a couple of commits and cherry pick some others... this also means that i'm using an older version of CGAL/GDAL/whatever... there is also something weird that myself and another have not been able to find but did figure out that a double build worked around...

effectively, i had to modify that section of the d&c script to look like this... there is some extra logging that i took the easy way out with and simply duplicated the code...
Code: Select all
#######################################################
# TERRAGEAR
#######################################################

TG_INSTALL_DIR=terragear
INSTALL_DIR_TG=$INSTALL_DIR/$TG_INSTALL_DIR
cd "$CBD"
if [[ "$(declare -p WHATTOBUILD)" =~ '['([0-9]+)']="TERRAGEAR"' ]]; then
  echo "****************************************" | tee -a $LOGFILE
  echo "*************** TERRAGEAR **************" | tee -a $LOGFILE
  echo "****************************************" | tee -a $LOGFILE

  mkdir -p "terragear"
  cd "$CBD"/terragear
  _gitDownload git://git.code.sf.net/p/flightgear/terragear
  _gitUpdate scenery/ws2.0
#####################################################
# remove the next line when GDAL has been worked in #
#---------------------------------------------------#
# this is where *I* had to reset to before creating #
# my branch and then cherry picking a few following #
# commits                                           #
#####################################################
#git reset --hard 082ee9b82f15c8067183925a2ce48da817fa3748
git branch --list

  if [ "$RECONFIGURE" = "y" ]; then
    echo "Reconfiguring..."
    cd "$CBD"
    mkdir -p build/terragear
    cd "$CBD"/build/terragear
    rm -f CMakeCache.txt
    echo "using $CMAKE" 2>&1 | tee -a $LOGFILE
    "$CMAKE" --version 2>&1 | tee -a $LOGFILE
    echo " ** 1st CMAKE execution"
    echo "$CMAKE" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
          -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_TG" \
          -DCMAKE_PREFIX_PATH="$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_CGAL" \
          $TG_CMAKEARGS \
          ../../terragear/ 2>&1 | tee -a $LOGFILE
    "$CMAKE" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
          -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_TG" \
          -DCMAKE_PREFIX_PATH="$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_CGAL" \
          $TG_CMAKEARGS \
          ../../terragear/ 2>&1 | tee -a $LOGFILE
    echo " ** 2nd CMAKE execution"
    echo "$CMAKE" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
          -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_TG" \
          -DCMAKE_PREFIX_PATH="$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_CGAL" \
          $TG_CMAKEARGS \
          ../../terragear/ 2>&1 | tee -a $LOGFILE
    "$CMAKE" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
          -DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_TG" \
          -DCMAKE_PREFIX_PATH="$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_CGAL" \
          $TG_CMAKEARGS \
          ../../terragear/ 2>&1 | tee -a $LOGFILE
  fi

  _make terragear

  cd "$CBD"

  SCRIPT=run_tg-construct.sh
  echo "#!/bin/sh" > $SCRIPT
  echo "cd \$(dirname \$0)" >> $SCRIPT
  echo "cd $SUB_INSTALL_DIR/$TG_INSTALL_DIR/bin" >> $SCRIPT
  echo "export LD_LIBRARY_PATH=$INSTALL_DIR_SIMGEAR/lib" >> $SCRIPT
  echo "./tg-construct \$@" >> $SCRIPT
  chmod 755 $SCRIPT

  SCRIPT=run_ogr-decode.sh
  echo "#!/bin/sh" > $SCRIPT
  echo "cd \$(dirname \$0)" >> $SCRIPT
  echo "cd $SUB_INSTALL_DIR/$TG_INSTALL_DIR/bin" >> $SCRIPT
  echo "export LD_LIBRARY_PATH=$INSTALL_DIR_SIMGEAR/lib" >> $SCRIPT
  echo "./ogr-decode \$@" >> $SCRIPT
  chmod 755 $SCRIPT

  SCRIPT=run_genapts850.sh
  echo "#!/bin/sh" > $SCRIPT
  echo "cd \$(dirname \$0)" >> $SCRIPT
  echo "cd $SUB_INSTALL_DIR/$TG_INSTALL_DIR/bin" >> $SCRIPT
  echo "export LD_LIBRARY_PATH=$INSTALL_DIR_SIMGEAR/lib" >> $SCRIPT
  echo "./genapts850 \$@" >> $SCRIPT
  chmod 755 $SCRIPT

fi
_logSep

note the two lines:
Code: Select all
    echo " ** 1st CMAKE execution"
[...]
    echo " ** 2nd CMAKE execution"
"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: 5577
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Ubuntu Terragear Download_and_compile.sh not working

Postby statto » Sat Sep 01, 2018 8:14 pm

I had to twice update isnan in tg_misc to std::isnan and it compiled tg_misc properly. Let's see if it takes the rest of the code...
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2106
Joined: Fri Jan 25, 2008 9:57 pm


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest