Project

General

Profile

Actions

Bug #4112

closed

OpenBSC fails to compile on openSUSE Tumbleweed (gcc 9.1 with LTO enabled)

Added by roox over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
07/17/2019
Due date:
% Done:

0%

Resolution:
Spec Reference:

Description

openSUSE just enabled LTO by default for its packages in Tumbleweed/Factory.
https://lists.opensuse.org/opensuse-factory/2019-07/msg00240.html
https://gcc.gnu.org/wiki/LinkTimeOptimization

This means the distro provided CFLAGS now changed from

without LTO

CFLAGS='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection  -g'

to

with LTO enabled

CFLAGS="-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -flto=4 -g -Werror=implicit -Werror=maybe-uninitialized -Werror=memset-transposed-args -Werror=null-dereference -Werror=sizeof-array-argument -Werror=sizeof-pointer-memaccess" 

compiling openbsc master then triggers the following warnings/errors:

[   23s] gsm_04_08.c:1464:2: error: 'mi_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
[   23s] ../../include/openbsc/acc_ramp.h:90:32: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] acc_ramp.c:279:22: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] acc_ramp.c:280:30: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] acc_ramp.c:281:35: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] acc_ramp.c:277:16: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] ../../include/openbsc/acc_ramp.h:90:32: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] acc_ramp.c:279:22: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] acc_ramp.c:280:30: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] acc_ramp.c:281:35: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] acc_ramp.c:277:16: error: potential null pointer dereference [-Werror=null-dereference]
[   23s] lto-wrapper: fatal error: make returned 2 exit status
[   23s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: error: lto-wrapper failed
[   23s] collect2: error: ld returned 1 exit status
[   23s] error: Bad exit status from /var/tmp/rpm-tmp.6yGOJj (%build)

I have attatched the full buildlog.


Files


Related issues

Related to OsmoBSC - Bug #4113: osmo-bsc fails to compile on openSUSE Tumbleweed (gcc 9.1 with LTO enabled)ResolvedHoernchen07/17/2019

Actions
Related to Cellular Network Infrastructure - Bug #4123: gcc & LTO related issuesRejectedHoernchen07/19/2019

Actions
Actions #1

Updated by laforge over 4 years ago

  • Related to Bug #4113: osmo-bsc fails to compile on openSUSE Tumbleweed (gcc 9.1 with LTO enabled) added
Actions #2

Updated by laforge over 4 years ago

  • Assignee set to Hoernchen
Actions #3

Updated by Hoernchen over 4 years ago

  • Related to Bug #4123: gcc & LTO related issues added
Actions #4

Updated by Hoernchen over 4 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)