Project

General

Profile

Actions

Bug #5960

closed

Recent commit to libosmocore broke the build under Slackware

Added by falconia about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
03/26/2023
Due date:
% Done:

0%

Spec Reference:

Description

This recent commit that has been merged on 2023-03-11:

https://cgit.osmocom.org/libosmocore/commit/?id=9dca9027b75b706f333ede584beb09143cb98cbd

breaks the build of libosmocore under Slackware 14.2. The following factors combine to break compilation of C modules under src/coding:

Factor 1: libosmocore header files are so intertwined (include each other freely) that no matter which part of libosmocore you are actually interested in, or more specifically no matter which libosmocore header you are including, <osmocom/core/talloc.h> will always get pulled in no matter what. In the present case, the include chain goes as follows:

In file included from ../../include/osmocom/core/utils.h:9:0,
from ../../include/osmocom/core/bit16gen.h:21,
from ../../include/osmocom/core/bits.h:11,
from gsm0503_interleaving.c:24:
../../include/osmocom/core/talloc.h:3:20: fatal error: talloc.h: No such file or directory

Factor 2: under Slackware 14.2 (I have no experience with other distros) the only system-installed talloc.h header lives in /usr/include/samba-4.0. Therefore, unless the compiler invokation line includes a -I/usr/include/samba-4.0 option, the inclusion of <talloc.h> from <osmocom/core/talloc.h> is guaranteed to cause a hard compilation failure.

Factor 3: the voodoo magic of autotools plus pkg-config is able to find this deeply-hidden talloc.h on my system, and it correctly sets TALLOC_CFLAGS to the needed -I path.

Factor 4: because of intertwined libosmocore header files (see Factor 1 above), practically every Osmocom sw component must include TALLOC_CFLAGS in its Makefile.am CFLAGS or CPPFLAGS, or else the build breaks. It appears that this rule has been followed by all Osmocom projects up until now, as I haven't run into this issue until this very recent libosmocore commit breaking src/coding.

fixeria: since it was your commit that broke the build, can you please give your attention to this matter?

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)