Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 881015 - net-proxy/3proxy-0.9.0 - common.c: error: incompatible function pointer types initializing int
Summary: net-proxy/3proxy-0.9.0 - common.c: error: incompatible function pointer types...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alex Efros
URL: https://github.com/3proxy/3proxy/issu...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2022-11-11 19:01 UTC by Toralf Förster
Modified: 2023-03-22 01:20 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,17.64 KB, text/plain)
2022-11-11 19:01 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,108.45 KB, text/plain)
2022-11-11 19:02 UTC, Toralf Förster
Details
environment (environment,63.33 KB, text/plain)
2022-11-11 19:02 UTC, Toralf Förster
Details
etc.clang.tar.bz2 (etc.clang.tar.bz2,703 bytes, application/x-bzip)
2022-11-11 19:02 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,22.14 KB, application/x-bzip)
2022-11-11 19:02 UTC, Toralf Förster
Details
net-proxy:3proxy-0.9.0:20221111-185731.log (net-proxy:3proxy-0.9.0:20221111-185731.log,3.43 KB, text/plain)
2022-11-11 19:02 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,17.32 KB, application/x-bzip)
2022-11-11 19:02 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 2022-11-11 19:01:58 UTC
cat Makefile.Linux > src/Makefile.var
make[1]: Entering directory '/var/tmp/portage/net-proxy/3proxy-0.9.0/work/3proxy-0.9.0/src'
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
clang -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -fPIC -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER -fPIC -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER common.c
common.c:208:2: error: incompatible function pointer types initializing 'int
      (*)(struct pollfd *, unsigned int, int)' with an expression of type 'int
      (struct pollfd *, nfds_t, int)' (aka 'int (struct pollfd *, unsigned long,

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

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

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

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:
1)	OpenJDK 17.0.5_p8 [openjdk-17]
*)	Eclipse Temurin JDK 17.0.5_p8 [openjdk-bin-17]
3)	Eclipse Temurin JDK 8.352_p08 [openjdk-bin-8]
4)	Eclipse Temurin JRE 17.0.5_p8 [openjdk-jre-bin-17]
Available Java Virtual Machines:
  [1]   openjdk-17 
  [2]   openjdk-bin-8 
  [3]   openjdk-bin-17  system-vm
  [4]   openjdk-jre-bin-17 

php cli (if any):
  [1]   php8.1 *

  HEAD of ::gentoo
commit 50981ac2023e8bf2fa65fd343cd7a370b3266d4b
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Fri Nov 11 17:46:50 2022 +0000

    2022-11-11 17:46:50 UTC

emerge -qpvO net-proxy/3proxy
[ebuild  N    ] net-proxy/3proxy-0.9.0
Comment 1 Toralf Förster gentoo-dev 2022-11-11 19:01:59 UTC
Created attachment 831587 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-11-11 19:02:00 UTC
Created attachment 831589 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-11-11 19:02:02 UTC
Created attachment 831591 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-11-11 19:02:03 UTC
Created attachment 831593 [details]
etc.clang.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-11-11 19:02:04 UTC
Created attachment 831595 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-11-11 19:02:05 UTC
Created attachment 831597 [details]
net-proxy:3proxy-0.9.0:20221111-185731.log
Comment 7 Toralf Förster gentoo-dev 2022-11-11 19:02:06 UTC
Created attachment 831599 [details]
temp.tar.bz2
Comment 8 Alex Efros 2022-11-11 21:31:49 UTC
Sorry, I've no idea how to reproduce this - on my system it builds okay.
Can you please give me some hints about this?

At a glance problem might be in using clang instead of gcc, and the error itself looks a bit weird - function pointer types probably shouldn't change because of different compiler (I'm not a C developer, so I might miss something here).
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-11 21:44:50 UTC
(In reply to Alex Efros from comment #8)
> Sorry, I've no idea how to reproduce this - on my system it builds okay.
> Can you please give me some hints about this?
> 
> At a glance problem might be in using clang instead of gcc, and the error
> itself looks a bit weird - function pointer types probably shouldn't change
> because of different compiler (I'm not a C developer, so I might miss
> something here).

Clang 16 makes -Wincompatible-function-pointer-types an error by default. GCC doesn't have this specific warning, but it does have -Wincompatible-pointer-types.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-11 21:45:36 UTC
It's OK to not know how to fix it yourself (I'm working on docs to help folks though), but please report it upstream & cross link the bugs. Thank you!
Comment 11 Larry the Git Cow gentoo-dev 2023-03-22 01:20:22 UTC
The bug has been closed via the following commit(s):

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

commit 20d962742de92d136470b6a3dd2c4e6727ffa2ff
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2023-03-21 14:02:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-22 01:19:09 +0000

    net-proxy/3proxy: add 0.9.4
    
    - EAPI bump
    - update HOMEPAGE and SRC_URI
    - update gentoo patch
    - add fix for clang-16 [1,2]
    - remove src_compile phase, CC is now exported in src_prepare, LN is
      not needed anymore as it is set to $(CC) by default.
    
    [1] https://github.com/3proxy/3proxy/issues/895
    [2] https://github.com/3proxy/3proxy/pull/907
    
    Closes: https://bugs.gentoo.org/881015
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Closes: https://github.com/gentoo/gentoo/pull/30287
    Signed-off-by: Sam James <sam@gentoo.org>

 net-proxy/3proxy/3proxy-0.9.4.ebuild               | 47 ++++++++++++++++++
 net-proxy/3proxy/Manifest                          |  1 +
 .../files/3proxy-0.9.4-function-pointer-fix.patch  | 58 ++++++++++++++++++++++
 net-proxy/3proxy/files/3proxy-0.9.4-gentoo.patch   | 38 ++++++++++++++
 4 files changed, 144 insertions(+)