Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919252 - net-libs/c-client-2007f_p7 - unix.c: error: passing argument 2 of utime from incompatible pointer type [-Wincompatible-pointer-types]
Summary: net-libs/c-client-2007f_p7 - unix.c: error: passing argument 2 of utime from ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: patch
Keywords: PATCH
: 944825 (view as bug list)
Depends on: 945080
Blocks: c99-porting gcc-14-stable
  Show dependency tree
 
Reported: 2023-12-05 08:09 UTC by Toralf Förster
Modified: 2024-11-27 10:33 UTC (History)
5 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,21.52 KB, text/plain)
2023-12-05 08:09 UTC, Toralf Förster
Details
emerge-history.txt.xz (emerge-history.txt.xz,86.98 KB, application/x-xz)
2023-12-05 08:10 UTC, Toralf Förster
Details
environment (environment,83.38 KB, text/plain)
2023-12-05 08:10 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.14 KB, application/x-xz)
2023-12-05 08:10 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,25.60 KB, application/x-xz)
2023-12-05 08:10 UTC, Toralf Förster
Details
net-libs:c-client-2007f_p7:20231205-053851.log (net-libs:c-client-2007f_p7:20231205-053851.log,22.61 KB, text/plain)
2023-12-05 08:10 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,96.20 KB, application/x-xz)
2023-12-05 08:10 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,23.69 KB, application/x-xz)
2023-12-05 08:10 UTC, Toralf Förster
Details
proposed patch (fix_incompatible_pointers.patch,29.40 KB, patch)
2024-06-05 16:08 UTC, asears
Details | Diff

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-05 08:09:59 UTC
  849 |              fs_get ((size_t) elt->private.msg.header.text.size + 1),
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  850 |              (size_t) 1,(size_t) elt->private.msg.header.text.size,f);
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`cat CCTYPE` -c `cat CFLAGS` unix.c
unix.c: In function unix_valid:
unix.c:231:21: error: passing argument 2 of utime from incompatible pointer type [-Wincompatible-pointer-types]
  231 |         utime (file,tp);        /* set the times */
      |                     ^~

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-20231123-170505

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-14 *
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:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.73.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 17.0.8.1_p1 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
3)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-17 
  [3]   openjdk-bin-21  system-vm

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

  HEAD of ::gentoo
commit af0bc6fb619b65f8b577e3e3bf684251babf74cc
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Dec 5 04:46:56 2023 +0000

    2023-12-05 04:46:56 UTC

emerge -qpvO net-libs/c-client
[ebuild  N    ] net-libs/c-client-2007f_p7  USE="ipv6 pam ssl -doc -kerberos -static-libs -topal"
Comment 1 Toralf Förster gentoo-dev 2023-12-05 08:09:59 UTC
Created attachment 877283 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-12-05 08:10:01 UTC
Created attachment 877284 [details]
emerge-history.txt.xz
Comment 3 Toralf Förster gentoo-dev 2023-12-05 08:10:02 UTC
Created attachment 877285 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-12-05 08:10:03 UTC
Created attachment 877286 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2023-12-05 08:10:04 UTC
Created attachment 877287 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-12-05 08:10:05 UTC
Created attachment 877288 [details]
net-libs:c-client-2007f_p7:20231205-053851.log
Comment 7 Toralf Förster gentoo-dev 2023-12-05 08:10:06 UTC
Created attachment 877289 [details]
qlist-info.txt.xz
Comment 8 Toralf Förster gentoo-dev 2023-12-05 08:10:07 UTC
Created attachment 877290 [details]
temp.tar.xz
Comment 9 asears 2024-06-05 16:08:00 UTC
Created attachment 895193 [details, diff]
proposed patch

There are more files using utime() this way, I only modified the ones needed to get it to build for me. The other files look like they are OS-specific.
Comment 10 Nuitari 2024-09-15 03:32:41 UTC
The patch fixed it for me, thank you!
Comment 11 Ionen Wolkens gentoo-dev 2024-11-24 17:59:20 UTC
*** Bug 944825 has been marked as a duplicate of this bug. ***
Comment 12 Larry the Git Cow gentoo-dev 2024-11-27 04:45:15 UTC
The bug has been closed via the following commit(s):

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

commit 047bf91f2c9c3bedd713e2d89c4bd67e87f85304
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-27 04:43:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-27 04:43:54 +0000

    net-libs/c-client: fix modern C issues
    
    Debian haven't moved on since _p7 in 2019 unfortunately. A friend of mine
    has a fork he needs to rebase which I may join him on as a proper base
    for distros rather than us all hoarding various patches, but for now,
    apply the patch from the bug (which does indeed fix various issues properly
    - thanks).
    
    Closes: https://bugs.gentoo.org/919252
    Thanks-to: asears@conestogawood.com
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/c-client/c-client-2007f_p7-r1.ebuild      | 171 +++++
 .../c-client/files/c-client-2007f_p7-c99.patch     | 791 +++++++++++++++++++++
 2 files changed, 962 insertions(+)
Comment 13 Holger Hoffstätte 2024-11-27 09:52:39 UTC
Hey @asears - this patch is great since it also applies on top of alpine's bundled c-client source, which has seen unrelated fixes in a parallel timeline. I'm not sure why I haven't seen these compiler errors since I've built alpine with gcc-14/15 and clang, but the fixes look good. Thanks!

It seems the only live repo for c-client is at https://github.com/uw-imap/imap, which of course has a gcc-14 bug report..
Comment 14 Holger Hoffstätte 2024-11-27 10:33:08 UTC
(In reply to Holger Hoffstätte from comment #13)
> this patch is great since it also applies on top of alpine's bundled c-client source

..and then does not compile. Nevermind, sorry for the noise.