new CI builds
Dirk Hohndel
dirk at hohndel.org
Tue Apr 21 07:42:00 PDT 2020
On Tue, 2020-04-21 at 09:20 +0200, Berthold Stoeger wrote:
> Ok, this one is weird.
>
>
> That appears to be g++, right? To me this looks like it trips on an
> assertion
> of a "vector[n]" access. The one thing I found in the offending
> function was a
> construct of the type
> "&mean[0]"
> to pass an array down to C, which *technically* is indeed undefined
> behavior
> if "mean" is empty. However, the whole point of operator[] is that it
> is
> unchecked and as long as the callee doesn't access the array, this
> should work
> just fine. After all it is only taking an address.
Ah the beauty of corner cases...
> Therefore, I replaced above construct by "mean.data()" and put the
> call in an
> if for good measure:
> https://github.com/Subsurface-divelog/subsurface/pull/2778
> Please test this.
As I mentioned in my other response... there are no OBS builds for PRs.
> If my suspicion is correct, I consider that very unfriendly behavior
> of the
> compiler / library. @Dirk: does that version compile with other than
> the
> default settings?
You can see the settings used in packaging/OBS
cmake -DCMAKE_BUILD_TYPE=Release \
-DLRELEASE=lrelease-qt5 \
-DCMAKE_INSTALL_PREFIX=%{buildroot}/usr \
-DLIBDIVECOMPUTER_INCLUDE_DIR=$RPM_BUILD_DIR/install-root/include \
-DLIBGIT2_INCLUDE_DIR=$RPM_BUILD_DIR/install-root/include \
-DLIBDIVECOMPUTER_LIBRARIES=$RPM_BUILD_DIR/install-root/lib/libdivecomputer.a \
-DCMAKE_C_FLAGS:STRING="%optflags" \
-DCMAKE_CXX_FLAGS:STRING="%optflags" \
-DNO_PRINTING=OFF \
.. ; \
make VERBOSE=1 %{?_smp_mflags} subsurface)
My theory would be that the difference we are seeing here is that
different distributions use different flags as '%optflags' for
compilations and we inherit those. And of course, we build with clang
on Mac/iOS/Android and gcc for Windows and (I believe) all of the Linux
builds.
/D
More information about the subsurface
mailing list