Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 859910 - media-libs/libcdaudio-0.99.12-r4 fails to compile: cdaudio.c:123:7: error: conflicting types for mounts; have int
Summary: media-libs/libcdaudio-0.99.12-r4 fails to compile: cdaudio.c:123:7: error: co...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-22 06:43 UTC by Agostino Sarubbo
Modified: 2024-03-11 14:24 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,62.39 KB, text/plain)
2022-07-22 06:43 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-07-22 06:43:55 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-libs/libcdaudio-0.99.12-r3 fails to compile (lto).
Discovered on: amd64 (internal ref: lto_tinderbox)

NOTE:
This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-22 06:43:57 UTC
Created attachment 792998 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-10-06 08:53:41 UTC
lto_tinderbox has reproduced this issue with version 0.99.12-r4 - Updating summary.
Comment 3 Eli Schwartz 2024-03-11 02:59:22 UTC
cdaudio.c:123:7: error: conflicting types for 'mounts'; have 'int'
  123 |   int mounts;
      |       ^~~~~~
cdaudio.c:119:9: note: previous declaration of 'mounts' with type 'FILE *'
  119 |   FILE *mounts;
      |         ^~~~~~
cdaudio.c:124:18: error: conflicting types for 'mnt'; have 'struct statfs *'
  124 |   struct statfs *mnt;
      |                  ^~~
cdaudio.c:120:18: note: previous declaration of 'mnt' with type 'struct mntent *'
  120 |   struct mntent *mnt;
      |                  ^~~
cdaudio.c:159:19: error: invalid use of undefined type 'struct statfs'
  159 |     if(strncmp(mnt->mnt_fsname, devname, len) == 0) {
      |                   ^~


Not an LTO issue...

(Appears to be a screwed up autoconf check in cdaudio.c.)
Comment 4 Larry the Git Cow gentoo-dev 2024-03-11 14:24:06 UTC
The bug has been closed via the following commit(s):

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

commit fa245858213a0663022ff039f5ee7dbd2ec8575c
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-03-11 02:48:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-11 14:22:49 +0000

    media-libs/libcdaudio: fully refresh autotools
    
    It uses an extremely vintage 2004 edition that includes some kind of
    horrible idea from the early days of the 21st century. Apparently, back
    then, portability meant "autotools can convert your ANSI C code to K&R
    C". This functionality has long since been removed from current
    automake, so eautoreconf doesn't actually run until we remove a few
    troublesome lines.
    
    Needed to e.g. pass LTO warning flags through to the linker, and well, a
    whole lot more.
    
    Also fixes a build issue with conflicting definitions of mount?
    
    Closes: https://bugs.gentoo.org/859910
    Closes: https://bugs.gentoo.org/898236
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libcdaudio/libcdaudio-0.99.12-r5.ebuild | 12 ++++++++++++
 1 file changed, 12 insertions(+)