Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920775 - net-vpn/pptpd-1.4.0-r3 - [clang] compat.c: error: call to undeclared function strerror; ISO C99 and later
Summary: net-vpn/pptpd-1.4.0-r3 - [clang] compat.c: error: call to undeclared function...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sergey Popov
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c99-porting glibc-2.38
  Show dependency tree
 
Reported: 2023-12-27 08:54 UTC by Toralf Förster
Modified: 2024-04-27 01:11 UTC (History)
0 users

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


Attachments
emerge-info.txt (emerge-info.txt,17.88 KB, text/plain)
2023-12-27 08:54 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,105.21 KB, text/plain)
2023-12-27 08:54 UTC, Toralf Förster
Details
environment (environment,100.73 KB, text/plain)
2023-12-27 08:54 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.12 KB, application/x-xz)
2023-12-27 08:54 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,20.58 KB, application/x-xz)
2023-12-27 08:54 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,6.05 KB, application/x-xz)
2023-12-27 08:54 UTC, Toralf Förster
Details
net-vpn:pptpd-1.4.0-r3:20231227-055108.log (net-vpn:pptpd-1.4.0-r3:20231227-055108.log,11.07 KB, text/plain)
2023-12-27 08:54 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,172.18 KB, text/plain)
2023-12-27 08:54 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,40.84 KB, application/x-xz)
2023-12-27 08:54 UTC, Toralf Förster
Details
var.tmp.clang.tar.xz (var.tmp.clang.tar.xz,1.19 KB, application/x-xz)
2023-12-27 08:54 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-12-27 08:54:48 UTC
too long lines were shrinked:

make[2]: warning: -j4 forced in submake: resetting jobserver mode.
clang -o pptpd-logwtmp.so -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -shared -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -fno-builtin -Wall -DSBINDIR='"/usr/sbin"' -DLIBDIR='"/usr/lib64"' -I.. -I../../include -fPIC pp
clang -DHAVE_CONFIG_H -I. -I.    -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -fno-builtin -Wall -DSBINDIR='"/usr/sbin"' -DLIBDIR='"/usr/lib64"' -c -o pptpmanager.o pptpmanager.c
clang -DHAVE_CONFIG_H -I. -I.    -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -fno-builtin -Wall -DSBINDIR='"/usr/sbin"' -DLIBDIR='"/usr/lib64"' -c -o compat.o compat.c
make[2]: Leaving directory '/var/tmp/portage/net-vpn/pptpd-1.4.0-r3/work/pptpd-1.4.0/plugins'
clang -DHAVE_CONFIG_H -I. -I.    -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -fno-builtin -Wall -DSBINDIR='"/usr/sbin"' -DLIBDIR='"/usr/lib64"' -c -o inststr.o inststr.c
compat.c:168:5: error: call to undeclared function 'strerror'; ISO C99 and later
      do not support implicit function declarations
      [-Wimplicit-function-declaration]

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma-20231225-172010

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

CC=clang
CXX=clang++
gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 17.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.6
Python 3.11.7
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-bin-1.74.1 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
2)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
go version go1.21.5 linux/amd64

  HEAD of ::gentoo
commit f73b48f01328a70a75144d264f7200179b9177fe
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed Dec 27 04:46:57 2023 +0000

    2023-12-27 04:46:56 UTC

emerge -qpvO net-vpn/pptpd
[ebuild  N    ] net-vpn/pptpd-1.4.0-r3  USE="tcpd -gre-extreme-debug"
Comment 1 Toralf Förster gentoo-dev 2023-12-27 08:54:49 UTC
Created attachment 880436 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-12-27 08:54:50 UTC
Created attachment 880437 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2023-12-27 08:54:51 UTC
Created attachment 880438 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-12-27 08:54:52 UTC
Created attachment 880439 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2023-12-27 08:54:53 UTC
Created attachment 880440 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-12-27 08:54:54 UTC
Created attachment 880441 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-12-27 08:54:55 UTC
Created attachment 880442 [details]
net-vpn:pptpd-1.4.0-r3:20231227-055108.log
Comment 8 Toralf Förster gentoo-dev 2023-12-27 08:54:56 UTC
Created attachment 880443 [details]
qlist-info.txt
Comment 9 Toralf Förster gentoo-dev 2023-12-27 08:54:57 UTC
Created attachment 880444 [details]
temp.tar.xz
Comment 10 Toralf Förster gentoo-dev 2023-12-27 08:54:58 UTC
Created attachment 880445 [details]
var.tmp.clang.tar.xz
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-27 00:55:06 UTC
Interestingly, I think this is specific to glibc-2.38+, because it only happens with strlcpy (the include was guarded with #ifndef HAVE_STRLCPY).
Comment 12 Larry the Git Cow gentoo-dev 2024-04-27 01:11:27 UTC
The bug has been closed via the following commit(s):

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

commit de42887364fb0681a6045f33b48dfefe58c46298
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-27 00:55:29 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-27 00:55:29 +0000

    net-vpn/pptpd: fix Modern C issue
    
    Interestingly, this only seems to manifest with >=glibc-2.38, because
    the include had a '#ifndef HAVE_STRLCPY' guard.
    
    Closes: https://bugs.gentoo.org/920775
    Closes: https://bugs.gentoo.org/927333
    Signed-off-by: Sam James <sam@gentoo.org>

 net-vpn/pptpd/files/pptpd-1.4.0-c99.patch                | 16 ++++++++++++++++
 .../{pptpd-1.4.0-r3.ebuild => pptpd-1.4.0-r4.ebuild}     |  3 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)