Project

General

Profile

Bug #10495

GCC-5: Buildtype Release: weird warnings

Added by Antonio Piazza almost 5 years ago. Updated over 4 years ago.

Status:
Confirmed
Priority:
Low
Assignee:
-
Category:
Buildsystem
Target version:
-
Start date:
05/28/2015
Due date:
% Done:

10%

Estimated time:
Affected Version:
git development version
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

I got an error trying to build from source with option "--buildtype Release".
The error is:

darktable/src/common/interpolation.c: In function ‘dt_interpolation_compute_sample’:
darktable/src/common/interpolation.c:789:21: error: array subscript is above array bounds [-Werror=array-bounds]
h += kernelh[j] * ipixel0;

No problem with option "--buildtype Debug"

gcc5-interpolation.patch (1.62 KB) gcc5-interpolation.patch Pedro Côrte-Real, 07/14/2015 12:17 AM

Related issues

Has duplicate darktable - Bug #10584: Build with -Werror=array-bounds failed in function dt_interpolation_compute_sampleDuplicate07/13/2015

History

#1 Updated by Antonio Piazza almost 5 years ago

I got an error trying to build from source with option "--buildtype Release".
The error is:

darktable/src/common/interpolation.c: In function ‘dt_interpolation_compute_sample’:
darktable/src/common/interpolation.c:789:21: error: array subscript is above array bounds [-Werror=array-bounds]
h += kernelh[j] * ipixel[0];

No problem with option "--buildtype Debug"

#2 Updated by Roman Lebedev almost 5 years ago

  • System changed from other GNU/Linux to all
  • Affected Version changed from git stable branch to git development version
  • % Done changed from 0 to 10
  • Status changed from New to Confirmed
  • Subject changed from Error in building from source to GCC-5: Buildtype Release: weird warnings

Yep, that is gcc5-only thing.
So far we do not know if this is a real issue or a false-positive.
Best bet for now is to either build with other compiler (gcc-4.9, clang), or in other build type.

#3 Updated by Roman Lebedev almost 5 years ago

[12:57:38] <LebedevRI> i tried to fix it, found no fix that suited me, tried to autoreduce a testcase to report as a gcc bug, but had no real success there either
[12:58:04] <LebedevRI> i propose to just wait until next gcc5 point release, and then reiterate

#4 Updated by Roman Lebedev over 4 years ago

  • Has duplicate Bug #10584: Build with -Werror=array-bounds failed in function dt_interpolation_compute_sample added

#5 Updated by Pedro Côrte-Real over 4 years ago

Could someone with gcc5 try the attached patch to see if it fixes it?

#6 Updated by Roman Lebedev over 4 years ago

WIth git master/darktable-1.6.x, and current gcc-5 from sid:

$ gcc-5 --version
gcc-5 (Debian 5.1.1-14) 5.1.1 20150711
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ dpkg -l | grep gcc-5
ii gcc-5 5.1.1-14 amd64 GNU C compiler
ii gcc-5-base:amd64 5.1.1-14 amd64 GCC, the GNU Compiler Collection (base package)
ii libgcc-5-dev:amd64 5.1.1-14 amd64 GCC support library (development files)

I no longer see those warnings/errors.

Also available in: Atom PDF

Go to top