Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948356 - dev-libs/userspace-rcu-0.15.0 compile error urcu-bp.c implicit declaration of function assert
Summary: dev-libs/userspace-rcu-0.15.0 compile error urcu-bp.c implicit declaration of...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2025-01-18 17:13 UTC by Joe Harvell
Modified: 2025-01-18 17:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (einfo.txt,7.75 KB, text/plain)
2025-01-18 17:14 UTC, Joe Harvell
Details
add required include of assert.h (urcu-bp-assert.patch,266 bytes, patch)
2025-01-18 17:15 UTC, Joe Harvell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Harvell 2025-01-18 17:13:14 UTC
Compiling with gcc14 it looks like assert.h is needed but not (transitively included).  See below:

urcu-bp.c: In function 'expand_arena':
urcu-bp.c:412:17: error: implicit declaration of function 'assert' [-Wimplicit-function-declaration]
  412 |                 assert(new_chunk == last_chunk);
      |                 ^~~~~~
urcu-bp.c:42:1: note: 'assert' is defined in header '<assert.h>'; this is probably fixable by adding '#include <assert.h>'
   41 | #include <urcu/urcu-bp.h>
  +++ |+#include <assert.h>
   42 | #define _LGPL_SOURCE
urcu-bp.c:412:17: warning: nested extern declaration of 'assert' [-Wnested-externs]
  412 |                 assert(new_chunk == last_chunk);


Reproducible: Always

Steps to Reproduce:
1.compile with gcc14
2.
3.
Actual Results:  
compile fails as summarized in description

Expected Results:  
compile success
Comment 1 Joe Harvell 2025-01-18 17:14:40 UTC
Created attachment 917008 [details]
emerge --info

output of emerge --info
Comment 2 Joe Harvell 2025-01-18 17:15:54 UTC
Created attachment 917009 [details, diff]
add required include of assert.h
Comment 3 Joe Harvell 2025-01-18 17:16:29 UTC
package compiles successfully with attached patch
Comment 4 Joe Harvell 2025-01-18 17:20:46 UTC
jharvell@wolfhound ~$ gcc-config -l
 [1] x86_64-pc-linux-gnu-12
 [2] x86_64-pc-linux-gnu-13
 [3] x86_64-pc-linux-gnu-14 *

jharvell@wolfhound ~$ gcc --version
gcc (Gentoo 14.2.1_p20241221 p7) 14.2.1 20241221
Copyright (C) 2024 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.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-18 17:53:03 UTC
Note that this is caused by -DNDEBUG. Please send the patch upstream.