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

Bug 638576

Summary: dev-libs/libcdio-1.0.0: build fail with "error: ‘i_first_track’ undeclared"
Product: Gentoo Linux Reporter: Nikolaj Šujskij <skrattaren>
Component: Current packagesAssignee: Gentoo Sound Team <sound>
Status: RESOLVED FIXED    
Severity: normal CC: Adrian.Bassett, alex, andig.mail, arve.barsnes, asturm, b.buschinski, bertrand, candrews, chris, iivanich, ivanhoe, j0inty, krinpaus, leonchik1976, mark+gentoobugs, order+gentoo, phobosk, rose, silvio.gerli, tetromino, tka, xaviermiller, yellowhat46, zeekec
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://savannah.gnu.org/bugs/?52495
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: libcdio-1.0.0 build log
emerge --info '=dev-libs/libcdio-1.0.0::gentoo'
build.log

Description Nikolaj Šujskij 2017-11-23 16:39:02 UTC
Created attachment 505898 [details]
libcdio-1.0.0 build log

% emerge -pqv '=dev-libs/libcdio-1.0.0::gentoo'
[ebuild  r  U ] dev-libs/libcdio-1.0.0 [0.94-r1] USE="cddb cxx -minimal -static-libs {-test}" ABI_X86="(64) -32 (-x32)" 
[ebuild  rR   ] dev-libs/libcdio-paranoia-0.94_p2  USE="cxx -static-libs {-test}" ABI_X86="(64) -32 (-x32)" 

See build log and `emerge --info` attached
Comment 1 Nikolaj Šujskij 2017-11-23 16:40:24 UTC
Created attachment 505900 [details]
emerge --info '=dev-libs/libcdio-1.0.0::gentoo'
Comment 2 Steffen 'j0inty' Stollfuß 2017-11-24 08:36:37 UTC
Hi,

I got the same error after I was switching to the gcc-7.2.0 profile.

[snip]
/bin/sh ../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -march=skylake -O2 -pipe  -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wdeclaration-after-statement -Wdisabled-optimization -Wendif-labels -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-sign-compare -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wunused -Wwrite-strings  -Wl,-O1 -Wl,--as-needed -o mmc-tool mmc-tool.o util.o getopt.o getopt1.o ../lib/iso9660/libiso9660.la ../lib/driver/libcdio.la  -lm
../../libcdio-1.0.0/src/cdda-player.c: In function ‘get_cddb_disc_info’:
../../libcdio-1.0.0/src/cdda-player.c:534:60: error: ‘i_first_track’ undeclared (first use in this function); did you mean ‘i_last_track’?
   b_db = init_cddb(p_cdio, &p_conn, &p_cddb_disc, xperror, i_first_track,
                                                            ^~~~~~~~~~~~~
                                                            i_last_track
../../libcdio-1.0.0/src/cdda-player.c:534:60: note: each undeclared identifier is reported only once for each function it appears in
../../libcdio-1.0.0/src/cdda-player.c:535:20: error: ‘i_tracks’ undeclared (first use in this function); did you mean ‘_tracef’?
                    i_tracks, &i_cddb_matches);
                    ^~~~~~~~
                    _tracef
../../libcdio-1.0.0/src/cdda-player.c: In function ‘get_cddb_track_info’:
../../libcdio-1.0.0/src/cdda-player.c:834:51: error: ‘i_first_track’ undeclared (first use in this function); did you mean ‘i_last_track’?
                                         i_track - i_first_track);
                                                   ^~~~~~~~~~~~~
                                                   i_last_track
make[2]: *** [Makefile:654: cdda-player.o] Error 1
[/snap]

gr33tz
j0inty
Comment 3 Steffen 'j0inty' Stollfuß 2017-11-24 08:37:19 UTC
Created attachment 506256 [details]
build.log
Comment 4 Nikolaj Šujskij 2017-11-24 09:08:01 UTC
(In reply to Steffen 'j0inty' Stollfuß from comment #2)
> I got the same error after I was switching to the gcc-7.2.0 profile.
I tried switching back to 6.4.0, but that didn't help
Comment 5 Ivan Iraci 2017-11-24 10:07:19 UTC
Emerging with USE="-cddb" works fine.
Comment 6 jorgicio 2017-11-24 14:23:12 UTC
I'm having the same issue in the -r1 version updated today.
Comment 7 Bernard Cafarelli gentoo-dev 2017-11-24 15:29:51 UTC
Indeed the code is under HAVE_CDDB, so it will only appear with USE=cddb

Filed an upstream bug with tentative fix
Comment 8 Bernard Cafarelli gentoo-dev 2017-11-24 15:57:47 UTC
@sound folks, when bumping/fixing, look at:
https://savannah.gnu.org/bugs/?52495#comment1

Apparently there is another fix worth taking in (for LIBCDIO_VERSION_NUM)
Comment 9 Xavier Miller (RETIRED) gentoo-dev 2017-11-25 09:08:52 UTC
-r1 doesn't work too
Comment 10 Juergen Rose 2017-11-25 13:56:39 UTC
(In reply to Bernard Cafarelli from comment #7)
> Indeed the code is under HAVE_CDDB, so it will only appear with USE=cddb
> 
> Filed an upstream bug with tentative fix

With the patch from https://savannah.gnu.org/bugs/?52495 I was able to emerge libcdio-1.0.0-r1 and then to reemerge libcdio-paranoia-0.94_p2. But trying to reemerge vcdimager-0.7.24 fails with:

/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/data_structures.h:31:42: error: unknown type name ‘_cdio_list_cmp_func’; did you mean ‘_cdio_list_cmp_func_t’?
 void _vcd_list_sort (CdioList_t *p_list, _cdio_list_cmp_func cmp_func);
                                          ^~~~~~~~~~~~~~~~~~~
                                          _cdio_list_cmp_func_t
In file included from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/mpeg_stream.h:29:0,
                 from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/vcd.h:28,
                 from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/pbc.h:29,
                 from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c:30:
/var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/mpeg.h:106:7: error: unknown type name ‘CdioList’
       CdioList *aps_list; /* filled up by vcd_mpeg_source */
       ^~~~~~~~
In file included from /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/info.c:56:0:
Comment 11 Juergen Rose 2017-11-25 15:17:02 UTC
(In reply to Juergen Rose from comment #10)
...
> With the patch from https://savannah.gnu.org/bugs/?52495 I was able to
> emerge libcdio-1.0.0-r1 and then to reemerge libcdio-paranoia-0.94_p2. But
> trying to reemerge vcdimager-0.7.24 fails with:
> 
> /var/tmp/portage/media-video/vcdimager-0.7.24/work/vcdimager-0.7.24/lib/
> data_structures.h:31:42: error: unknown type name ‘_cdio_list_cmp_func’; did
> you mean ‘_cdio_list_cmp_func_t’?
>  void _vcd_list_sort (CdioList_t *p_list, _cdio_list_cmp_func cmp_func);
>                                           ^~~~~~~~~~~~~~~~~~~
>                                           _cdio_list_cmp_func_t
...
This seems to be https://bugs.gentoo.org/638646.
Comment 12 Larry the Git Cow gentoo-dev 2017-11-27 17:59:32 UTC
The bug has been closed via the following commit(s):

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

commit 9c7e5953cdc545031ed5c83cb671176711931d62
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2017-11-27 17:53:48 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2017-11-27 17:58:02 +0000

    dev-libs/libcdio: Fix build with USE=cddb
    
    Reported-by: Nikolaj Šujskij <skrattaren@yandex.ru>
    Thanks-to: Bernard Cafarelli <voyageur@gentoo.org>
    Closes: https://bugs.gentoo.org/638576
    Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-libs/libcdio/files/libcdio-1.0.0-cddb.patch | 37 +++++++++++++++++++++++++
 dev-libs/libcdio/libcdio-1.0.0-r1.ebuild        |  6 +++-
 2 files changed, 42 insertions(+), 1 deletion(-)