Project

General

Profile

Actions

Bug #4991

closed

fails to build on OBS/debian 8

Added by lynxis about 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
01/29/2021
Due date:
% Done:

100%

Spec Reference:

Description

the build on debian 8 is failing in OBS.
A manual build (./configure, make, make install) in an lxc container doesn't fail. Maybe we need to add some gcc flags?

https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmocore/Debian_8.0/i586


Related issues

Related to Cellular Network Infrastructure - Bug #5004: More fallout from -std=gnu11 on debian8Resolvedosmith02/02/2021

Actions
Actions #1

Updated by daniel about 2 years ago

The only thing that sticks out is the cast in OSIM_CARD_SW_LAST. Maybe that makes gcc believe and complain that this expression is not constant?

Then the question remains why it's running through on other debian versions as well as on your lxc.

Actions #2

Updated by laforge about 2 years ago

The OSIM_CARD_SW_LAST has been in the code since 2012, when the initial version of libosmosim was merged:

commit d54c2ee8c51b41b7f7a5a469efd6bb391a0c2b75
Author: Harald Welte <laforge@gnumonks.org>
Date:   Tue Jan 17 18:25:50 2012 +0100

    initial checkin of 'libosmosim'

Given that this has been compiling for close to a decade, the only conclusion is that it was broken by recent changes of compiler flags, such as this likely candidate:

commit f2afb98c833ce4a4b9c95b9b7977b1cb80d5e89f
Author: Oliver Smith <osmith@sysmocom.de>
Date:   Thu Jan 21 11:42:40 2021 +0100

    configure.ac: set -std=gnu11

    Avoid using different dialects by accident (and resulting compiler
    errors if compiler assumes a different dialect), like in
    I72310886bef4db635078b75715c9d98ee45391cc.

    Related: https://lists.osmocom.org/pipermail/openbsc/2019-September/013030.html
    Related: https://lists.osmocom.org/pipermail/openbsc/2021-January/013360.html
    Related: osmo-pcu Ia57ba101627e3cc0babeca82631e207a3e2e0960
    Change-Id: Id79b13d3c498acb565f91eba650328fccb5a13ef

Not sure why C11 would not consider that initializer as 'const'. All of the fields are constante values.

Actions #3

Updated by osmith almost 2 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 90

I was able to reproduce it in docker ("debian:stretch") and submitted a fix:

https://gerrit.osmocom.org/c/libosmocore/+/22588

Actions #4

Updated by osmith almost 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100
Actions #5

Updated by osmith almost 2 years ago

  • Related to Bug #5004: More fallout from -std=gnu11 on debian8 added
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)