Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 638576 - dev-libs/libcdio-1.0.0: build fail with "error: ‘i_first_track’ undeclared"
Summary: dev-libs/libcdio-1.0.0: build fail with "error: ‘i_first_track’ undeclared"
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: 2017-11-23 16:39 UTC by Nikolaj Šujskij
Modified: 2017-11-27 17:59 UTC (History)
24 users (show)

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


Attachments
libcdio-1.0.0 build log (build.log,97.54 KB, text/x-log)
2017-11-23 16:39 UTC, Nikolaj Šujskij
Details
emerge --info '=dev-libs/libcdio-1.0.0::gentoo' (file_638576.txt,17.36 KB, text/plain)
2017-11-23 16:40 UTC, Nikolaj Šujskij
Details
build.log (build.log,221.87 KB, text/x-log)
2017-11-24 08:37 UTC, Steffen 'j0inty' Stollfuß
Details

Note You need to log in before you can comment on or make changes to this bug.
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(-)