Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 881143

Summary: net-analyzer/p0f-3.09_beta-r1 - .build-34.c: error: call to undeclared library function printf with type int (const char , ); ISO
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED FIXED    
Severity: normal CC: arcctgx
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/40581
Whiteboard: dead upstream
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412, 941869    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.clang.tar.bz2
etc.portage.tar.bz2
net-analyzer:p0f-3.09_beta-r1:20221112-190301.log
temp.tar.bz2
Add missing #include statement.

Description Toralf Förster gentoo-dev 2022-11-12 19:12:12 UTC
[*] Checking if memory alignment is required... FAIL

Well, something went horribly wrong, sorry. Here's the output from GCC:

.build-34.c:2:34: error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
volatile u8 tmp[6]; int main() { printf("%d\n", *(u32*)(tmp+1)); return 0; }
                                 ^

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_hardened-j4-20221111-181859

  -------------------------------------------------------------------

GNUMAKEFLAGS="$GNUMAKEFLAGS --jobserver-style=pipe"
GNUMAKEFLAGS="$GNUMAKEFLAGS --shuffle"
CC=clang
CXX=clang++
gcc-config -l:
 [1] x86_64-pc-linux-gnu-12 *
clang/llvm (if any):
clang version 15.0.4
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/15
15.0.4
Python 3.10.8
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-bin-1.65.0 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 17.0.5_p8 [openjdk-bin-17]
2)	Eclipse Temurin JDK 8.352_p08 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-17  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):

  HEAD of ::gentoo
commit f6917650a106a7a39a7f707f31fcc9d385e0f620
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Nov 12 17:16:53 2022 +0000

    2022-11-12 17:16:53 UTC

emerge -qpvO net-analyzer/p0f
[ebuild  N    ] net-analyzer/p0f-3.09_beta-r1  USE="ipv6 -debug"
Comment 1 Toralf Förster gentoo-dev 2022-11-12 19:12:13 UTC
Created attachment 832119 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-11-12 19:12:15 UTC
Created attachment 832121 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-11-12 19:12:16 UTC
Created attachment 832123 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-11-12 19:12:17 UTC
Created attachment 832125 [details]
etc.clang.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-11-12 19:12:18 UTC
Created attachment 832127 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-11-12 19:12:19 UTC
Created attachment 832129 [details]
net-analyzer:p0f-3.09_beta-r1:20221112-190301.log
Comment 7 Toralf Förster gentoo-dev 2022-11-12 19:12:20 UTC
Created attachment 832131 [details]
temp.tar.bz2
Comment 8 arcctgx 2024-12-09 20:37:18 UTC
Created attachment 913676 [details, diff]
Add missing #include statement.

I noticed a build failure when rebuilding world during a profile upgrade. This patch addresses the issue - at least with gcc-14.2, I did not test with clang.
Comment 9 Larry the Git Cow gentoo-dev 2025-02-15 15:58:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a45152155d2cecb7c81f36d690be1c74db80c25

commit 5a45152155d2cecb7c81f36d690be1c74db80c25
Author:     NHOrus <jy6x2b32pie9@yahoo.com>
AuthorDate: 2025-02-15 11:35:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-15 15:57:58 +0000

    net-analyzer/p0f: port to C23, remove USE=ipv6
    
    Folds multiple sed incantations into one patch, also adds minimal test.
    C23 fix is from attachment to the bug, and folded into main patch.
    USE=ipv6 enabled a build of `p0f-sendsyn6` utility, build it always.
    
    Closes: https://bugs.gentoo.org/881143
    Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
    Closes: https://github.com/gentoo/gentoo/pull/40581
    Signed-off-by: Sam James <sam@gentoo.org>

 net-analyzer/p0f/files/p0f-3.09_beta-build.patch | 66 ++++++++++++++++++++++++
 net-analyzer/p0f/p0f-3.09_beta-r2.ebuild         | 51 ++++++++++++++++++
 2 files changed, 117 insertions(+)