Discussion:
[Flightgear-devel] Linux Debug build
Erik Hofman
2017-07-19 11:11:07 UTC
Permalink
Could someone enlighten me why the debug build of SimGear creates
libraries ending with d which don't get picked up by FlightGear in debug
build?

It took me several hours before I noticed that the changes I made just
did not get picked up when building FlightGear.

In essence it is now impossible to create a debug build when you
encounter a problem which needs debugging.

Erik
--
http://www.adalin.com - High performance virtual reality audio software.
Erik Hofman
2017-07-19 11:20:33 UTC
Permalink
Post by Erik Hofman
Could someone enlighten me why the debug build of SimGear creates
libraries ending with d which don't get picked up by FlightGear in debug
build?
It took me several hours before I noticed that the changes I made just
did not get picked up when building FlightGear.
In essence it is now impossible to create a debug build when you
encounter a problem which needs debugging.
Alright, the problem seems to be
/usr/local/lib/cmake/SimGear/SimGearTargets.cmake

which does not get updated when switching from a normal build to a debug
build.

Erik
--
http://www.adalin.com - High performance virtual reality audio software.
James Turner
2017-07-19 11:26:54 UTC
Permalink
Post by Erik Hofman
Could someone enlighten me why the debug build of SimGear creates libraries ending with d which don't get picked up by FlightGear in debug build?
It took me several hours before I noticed that the changes I made just did not get picked up when building FlightGear.
In essence it is now impossible to create a debug build when you encounter a problem which needs debugging.
Alright, the problem seems to be
/usr/local/lib/cmake/SimGear/SimGearTargets.cmake
which does not get updated when switching from a normal build to a debug build.
Hmm, I can debug on Mac and Windows, so i think it’s at least partially working?

But this stuff is fiddly, so I can easily believe it needs some tweaks. Note in general on Mac and MSVC the idea is that Debug and Release co-exist, there is no ‘switching’ by re-runing cmake. So maybe that’s why it works for me?

Kind regards,
James
w***@gmail.com
2017-07-19 16:54:00 UTC
Permalink
Post by Erik Hofman
Alright, the problem seems to be
/usr/local/lib/cmake/SimGear/SimGearTargets.cmake
which does not get updated when switching from a normal build to a debug build.
i see the following when i build simgear with the dnc script on my linux system...


Install the project...
-- Install configuration: "Debug"
-- Up-to-date:
/home/myuser/flightgear-dev/next/install/simgear/include/simgear/simgear_config.h
-- Up-to-date:
/home/myuser/flightgear-dev/next/install/simgear/lib/cmake/SimGear/SimGearTargets.cmake
-- Installing:
/home/myuser/flightgear-dev/next/install/simgear/lib/cmake/SimGear/SimGearTargets-debug.cmake
-- Up-to-date:
/home/myuser/flightgear-dev/next/install/simgear/lib/cmake/SimGear/SimGearConfig.cmake
-- Up-to-date:
/home/myuser/flightgear-dev/next/install/simgear/lib/cmake/SimGear/SimGearConfigVersion.cmake


it appears to generate a new SimGearTargets-debug.cmake file when i build in
Debug mode... if i switch to Release mode, SimGearTargets.cmake is rewritten
each time and the -debug one is left alone...

i cannot tell which one flightgear is using when it is built, though... i can
see it finding OSG and PLIB when configuring but aside from that, i don't see
anything related to simgear in the flightgear configure or build output... well,
there is this line

-- Min Simgear version is 2017.3.0

and the path to my simgear but that's all... i'm guessing this is because the
dnc script doesn't build simgear as shared object files??
--
NOTE: No off-list assistance is given without prior approval.
*Please keep mailing list traffic on the list unless*
*a signed and pre-paid contract is in effect with us.*
Erik Hofman
2017-07-20 05:38:55 UTC
Permalink
Post by w***@gmail.com
Post by Erik Hofman
Alright, the problem seems to be
/usr/local/lib/cmake/SimGear/SimGearTargets.cmake
which does not get updated when switching from a normal build to a debug build.
i see the following when i build simgear with the dnc script on my linux system...
Install the project...
-- Install configuration: "Debug"
/home/myuser/flightgear-dev/next/install/simgear/include/simgear/simgear_config.h
/home/myuser/flightgear-dev/next/install/simgear/lib/cmake/SimGear/SimGearTargets.cmake
/home/myuser/flightgear-dev/next/install/simgear/lib/cmake/SimGear/SimGearTargets-debug.cmake
/home/myuser/flightgear-dev/next/install/simgear/lib/cmake/SimGear/SimGearConfig.cmake
/home/myuser/flightgear-dev/next/install/simgear/lib/cmake/SimGear/SimGearConfigVersion.cmake
it appears to generate a new SimGearTargets-debug.cmake file when i
build in Debug mode... if i switch to Release mode, SimGearTargets.cmake
is rewritten each time and the -debug one is left alone...
i cannot tell which one flightgear is using when it is built, though...
i can see it finding OSG and PLIB when configuring but aside from that,
i don't see anything related to simgear in the flightgear configure or
build output... well, there is this line
-- Min Simgear version is 2017.3.0
and the path to my simgear but that's all... i'm guessing this is
because the dnc script doesn't build simgear as shared object files??
I'm not sure what happened exactly.
It was bloody hot over here yesterday and was quite frustrating to have
a few spare hours to work on FlightGear just to see it burn up by a
build issue. Maybe I will look at it some time. Maybe never.

Erik
--
http://www.adalin.com - High performance virtual reality audio software.
Florent Rougon
2017-07-20 06:08:29 UTC
Permalink
Hi,
Post by Erik Hofman
I'm not sure what happened exactly.
It was bloody hot over here yesterday and was quite frustrating to have a few
spare hours to work on FlightGear just to see it burn up by a build issue.
Maybe I will look at it some time. Maybe never.
I've used Debug builds on Linux without problems (not tried in the last
weeks, though), but *without* -DSIMGEAR_SHARED=ON. Maybe this explains,
however I'm not sure if it works for you now.

@wkitty42: yup, from my reading, dnc.sh implicitly uses
-DSIMGEAR_SHARED=OFF (it's the default, except when passing specific
options which dnc.sh doesn't).

Regards
--
Florent
Erik Hofman
2017-07-20 06:13:08 UTC
Permalink
Post by Florent Rougon
Hi,
Post by Erik Hofman
I'm not sure what happened exactly.
It was bloody hot over here yesterday and was quite frustrating to have a few
spare hours to work on FlightGear just to see it burn up by a build issue.
Maybe I will look at it some time. Maybe never.
I've used Debug builds on Linux without problems (not tried in the last
weeks, though), but *without* -DSIMGEAR_SHARED=ON. Maybe this explains,
however I'm not sure if it works for you now.
@wkitty42: yup, from my reading, dnc.sh implicitly uses
-DSIMGEAR_SHARED=OFF (it's the default, except when passing specific
options which dnc.sh doesn't).
I'm not building shared SimGear libraries either.

Erik
--
http://www.adalin.com - High performance virtual reality audio software.
Florent Rougon
2017-07-20 06:32:21 UTC
Permalink
Post by Erik Hofman
I'm not building shared SimGear libraries either.
Ah... and does it work for you now? (I didn't quite understand the end
of your first message from today)

Regards
--
Florent
Erik Hofman
2017-07-20 07:37:09 UTC
Permalink
Post by Florent Rougon
Post by Erik Hofman
I'm not building shared SimGear libraries either.
Ah... and does it work for you now? (I didn't quite understand the end
of your first message from today)
Somehow I do now have a build that picks up the debug version of the
SimGear libraries. Don't ask me what has changed though..

Erik
--
http://www.adalin.com - High performance virtual reality audio software.
Erik Hofman
2017-07-20 07:46:53 UTC
Permalink
Post by Erik Hofman
Post by Florent Rougon
Post by Erik Hofman
I'm not building shared SimGear libraries either.
Ah... and does it work for you now? (I didn't quite understand the end
of your first message from today)
Somehow I do now have a build that picks up the debug version of the
SimGear libraries. Don't ask me what has changed though..
Ah yes I do know, I removed /usr/local/lib/cmake/SimGear/SimGear* and
reinstalled SimGear

Erik
--
http://www.adalin.com - High performance virtual reality audio software.
Florent Rougon
2017-07-20 08:32:09 UTC
Permalink
Post by Erik Hofman
Somehow I do now have a build that picks up the debug version of the SimGear
libraries. Don't ask me what has changed though..
Ah yes I do know, I removed /usr/local/lib/cmake/SimGear/SimGear* and
reinstalled SimGear
Good :-)
--
Florent
w***@gmail.com
2017-07-20 14:59:54 UTC
Permalink
@wkitty42: yup, from my reading, dnc.sh implicitly uses -DSIMGEAR_SHARED=OFF
(it's the default, except when passing specific options which dnc.sh
doesn't).
ahhh... so if i switched that to -DSIMGEAR_SHARED=ON i should be able to see
which .so files are used and linked into FG... based on the name(s) that i feel
will probably be displayed, that should tell if the SG debug ones are used or
not? at least ldd would be able to tell me ;)

i really don't know if they are or not but i do build debug for /everything/ i
build when i do build debug... i don't know if PLIB has debug (haven't seen
anything special) but OSG does and those are the only two that i build here
besides FG/SG...
--
NOTE: No off-list assistance is given without prior approval.
*Please keep mailing list traffic on the list unless*
*a signed and pre-paid contract is in effect with us.*
Florent Rougon
2017-07-20 16:38:41 UTC
Permalink
Post by w***@gmail.com
ahhh... so if i switched that to -DSIMGEAR_SHARED=ON i should be able to see
which .so files are used and linked into FG... based on the name(s) that i
feel will probably be displayed, that should tell if the SG debug ones are
used or not? at least ldd would be able to tell me ;)
Yes, ldd should tell you the .so files required and found.
Post by w***@gmail.com
i really don't know if they are or not but i do build debug for /everything/ i
build when i do build debug... i don't know if PLIB has debug (haven't seen
anything special) but OSG does and those are the only two that i build here
besides FG/SG...
I didn't dig into plib's build system, but download_and_compile.sh does:

"$CMAKE" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_DIR_PLIB" \
../../plib 2>&1 | tee -a $LOGFILE

so it should use the globally-configured build type.

Regards
--
Florent
Loading...