Build issues

2020-01-03 Thread Robert Helling
Hi,

after far too many weeks without any reasonable amount of time to worry about 
Subsurface, the new year has provided me with some hours of free time to catch 
up and hopefully come up to speed again. By now, I can build again both desktop 
as well as mobile-on-desktop (have not tried to build mobile but that used to 
work with the occasional code signing problem). But there are a few annoyances 
I have not been able to overcome. For all of them, I at least have work arounds 
but I would like to list them here as maybe anybody of you has any idea how to 
deal with them.

Everything I do here is on MacOS Mojave. Hombrew should be up to date.

To be able to build a working mobile on desktop, my Qt version was too old. I 
cannot recall which version I tried, besides some older ones, I had 5.10 and 
5.12 installed, but now with 5.14 it works (™).

I also had to update Qt Creator to make the debugger start. It actually shows 
source code and variables but breakpoints seem not to work (but I tried only 
briefly).

When building from within Creator, the binary dies with

> objc[85638]: Class QMacAutoReleasePoolTracker is implemented in both 
> /Users/Helling/Qt/5.12.0/clang_64/lib/QtCore.framework/Versions/5/QtCore 
> (0x102539068) and 
> /Users/Helling/mobile/subsurface/build-mobile/Subsurface-mobile.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore
>  (0x107875068). One of the two will be used. Which one is undefined.
> objc[85638]: Class 
> QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE
>  is implemented in both 
> /Users/Helling/Qt/5.12.0/clang_64/lib/QtCore.framework/Versions/5/QtCore 
> (0x1025390e0) and 
> /Users/Helling/mobile/subsurface/build-mobile/Subsurface-mobile.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore
>  (0x1078750e0). One of the two will be used. Which one is undefined.
> objc[85638]: Class RunLoopModeTracker is implemented in both 
> /Users/Helling/Qt/5.12.0/clang_64/lib/QtCore.framework/Versions/5/QtCore 
> (0x102539108) and 
> /Users/Helling/mobile/subsurface/build-mobile/Subsurface-mobile.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore
>  (0x107875108). One of the two will be used. Which one is undefined.
> 2020-01-04 01:21:43.358550+0100 Subsurface-mobile[85638:10548329] 
> [qt.qpa.plugin] Could not load the Qt platform plugin "cocoa" in "" even 
> though it was found.
> 2020-01-04 01:21:43.358812+0100 Subsurface-mobile[85638:10548329] This 
> application failed to start because no Qt platform plugin could be 
> initialized. Reinstalling the application may fix this problem.
> 
> Available platform plugins are: cocoa.

but running

make -j2 install

from the command line produces a working binary (which can also be run from 
within Creator)

But this takes quite long (even with very little changed source code), as I get 
error messages like
> 
> ERROR: ""
> ERROR: 
> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>  string table not at the end of the file (can't be processed) in file: 
> Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Extras/libqtquickextrasplugin.dylib.dSYM/Contents/Resources/DWARF/libqtquickextrasplugin.dylib\n"
> ERROR: ""
> ERROR: 
> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>  string table not at the end of the file (can't be processed) in file: 
> Subsurface-mobile.app/Contents/Resources/qml/QtLocation/libdeclarative_location_debug.dylib.dSYM/Contents/Resources/DWARF/libdeclarative_location_debug.dylib\n"
> ERROR: ""
> ERROR: 
> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>  string table not at the end of the file (can't be processed) in file: 
> Subsurface-mobile.app/Contents/Resources/qml/QtLocation/libdeclarative_location.dylib.dSYM/Contents/Resources/DWARF/libdeclarative_location.dylib\n"
> ERROR: ""
> ERROR: 
> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>  string table not at the end of the file (can't be processed) in file: 
> Subsurface-mobile.app/Contents/Resources/qml/QtPositioning/libdeclarative_positioning.dylib.dSYM/Contents/Resources/DWARF/libdeclarative_positioning.dylib\n"
> ERROR: ""
> ERROR: 
> "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>  string table not at the end of the file (can't be processed) in file: 
> Subsurface-mobile.app/Contents/Resources/qml/QtPositioning/libdeclarative_positioning_debug.dylib.dSYM/Contents/Resources/DWARF/libdeclarative_positioning_debug.dylib\n"
> ERROR: ""

for pages and pages  (and this takes a while). I tried to google this but could 
not find anything useful. This actually is most annoying.

Furthermore, I could not push to my Github fork from the command line (with an 
error message

remote: Resolving deltas: 100% (3/3), complet

Re: Build issues

2020-01-03 Thread Dirk Hohndel
Sorry, on my phone.
Blow away your build directory and call build.sh from the directory above 
Subsurface with the path set up correctly for your Qt version.
That will fix all of the build time and run time issues

The loss of gas info is very scary. If this is in git then you know which exact 
version wrote the bad data. Please let us know so we can track that down

/D

On January 3, 2020 4:33:09 PM PST, Robert Helling  wrote:
>Hi,
>
>after far too many weeks without any reasonable amount of time to worry
>about Subsurface, the new year has provided me with some hours of free
>time to catch up and hopefully come up to speed again. By now, I can
>build again both desktop as well as mobile-on-desktop (have not tried
>to build mobile but that used to work with the occasional code signing
>problem). But there are a few annoyances I have not been able to
>overcome. For all of them, I at least have work arounds but I would
>like to list them here as maybe anybody of you has any idea how to deal
>with them.
>
>Everything I do here is on MacOS Mojave. Hombrew should be up to date.
>
>To be able to build a working mobile on desktop, my Qt version was too
>old. I cannot recall which version I tried, besides some older ones, I
>had 5.10 and 5.12 installed, but now with 5.14 it works (™).
>
>I also had to update Qt Creator to make the debugger start. It actually
>shows source code and variables but breakpoints seem not to work (but I
>tried only briefly).
>
>When building from within Creator, the binary dies with
>
>> objc[85638]: Class QMacAutoReleasePoolTracker is implemented in both
>/Users/Helling/Qt/5.12.0/clang_64/lib/QtCore.framework/Versions/5/QtCore
>(0x102539068) and
>/Users/Helling/mobile/subsurface/build-mobile/Subsurface-mobile.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore
>(0x107875068). One of the two will be used. Which one is undefined.
>> objc[85638]: Class
>QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE
>is implemented in both
>/Users/Helling/Qt/5.12.0/clang_64/lib/QtCore.framework/Versions/5/QtCore
>(0x1025390e0) and
>/Users/Helling/mobile/subsurface/build-mobile/Subsurface-mobile.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore
>(0x1078750e0). One of the two will be used. Which one is undefined.
>> objc[85638]: Class RunLoopModeTracker is implemented in both
>/Users/Helling/Qt/5.12.0/clang_64/lib/QtCore.framework/Versions/5/QtCore
>(0x102539108) and
>/Users/Helling/mobile/subsurface/build-mobile/Subsurface-mobile.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore
>(0x107875108). One of the two will be used. Which one is undefined.
>> 2020-01-04 01:21:43.358550+0100 Subsurface-mobile[85638:10548329]
>[qt.qpa.plugin] Could not load the Qt platform plugin "cocoa" in ""
>even though it was found.
>> 2020-01-04 01:21:43.358812+0100 Subsurface-mobile[85638:10548329]
>This application failed to start because no Qt platform plugin could be
>initialized. Reinstalling the application may fix this problem.
>> 
>> Available platform plugins are: cocoa.
>
>but running
>
>make -j2 install
>
>from the command line produces a working binary (which can also be run
>from within Creator)
>
>But this takes quite long (even with very little changed source code),
>as I get error messages like
>> 
>> ERROR: ""
>> ERROR:
>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>string table not at the end of the file (can't be processed) in file:
>Subsurface-mobile.app/Contents/Resources/qml/QtQuick/Extras/libqtquickextrasplugin.dylib.dSYM/Contents/Resources/DWARF/libqtquickextrasplugin.dylib\n"
>> ERROR: ""
>> ERROR:
>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>string table not at the end of the file (can't be processed) in file:
>Subsurface-mobile.app/Contents/Resources/qml/QtLocation/libdeclarative_location_debug.dylib.dSYM/Contents/Resources/DWARF/libdeclarative_location_debug.dylib\n"
>> ERROR: ""
>> ERROR:
>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>string table not at the end of the file (can't be processed) in file:
>Subsurface-mobile.app/Contents/Resources/qml/QtLocation/libdeclarative_location.dylib.dSYM/Contents/Resources/DWARF/libdeclarative_location.dylib\n"
>> ERROR: ""
>> ERROR:
>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>string table not at the end of the file (can't be processed) in file:
>Subsurface-mobile.app/Contents/Resources/qml/QtPositioning/libdeclarative_positioning.dylib.dSYM/Contents/Resources/DWARF/libdeclarative_positioning.dylib\n"
>> ERROR: ""
>> ERROR:
>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool:
>string table not at the end of the file (can't be processed) in file:
>Subsurface-mobile.app/Contents/Resources/qml/QtPositioning