Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 61568 - Musicbrainz does not compile example getalbum.c
Summary: Musicbrainz does not compile example getalbum.c
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-24 15:25 UTC by Alexander Gretencord
Modified: 2004-08-29 10:20 UTC (History)
0 users

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


Attachments
Patches musicbrainz source file example/getalbum.c to define numDates at beginning of file instead of where it is used (musicbrainz-2.1.1.patch,811 bytes, patch)
2004-08-24 15:26 UTC, Alexander Gretencord
Details | Diff
new ebuld that applies patch (musicbrainz-2.1.1-r1.ebuild,1.35 KB, patch)
2004-08-24 15:30 UTC, Alexander Gretencord
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Gretencord 2004-08-24 15:25:02 UTC
The getalbum example does not compile.

The error is because numDates is defined right where it is used. The patch included defined numDates at the beginning of the file. Patch will be submitted to upstream.

Reproducible: Always
Steps to Reproduce:
1. emerge musicbrainz 2.1.1 (or even 2.1.0)
Actual Results:  
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include    -march=i686 -O2 -pipe -Wall -c 
getalbum.c 
getalbum.c: In function `main': 
getalbum.c:144: parse error before `int' 
getalbum.c:145: `numDates' undeclared (first use in this function) 
getalbum.c:145: (Each undeclared identifier is reported only once 
getalbum.c:145: for each function it appears in.) 
make[2]: *** [getalbum.o] Error 1 
make[2]: *** Waiting for unfinished jobs.... 
make[2]: Leaving directory 
`/var/tmp/portage/musicbrainz-2.1.1/work/libmusicbrainz-2.1.1/examples' 
make[1]: *** [all-recursive] Error 1 
make[1]: Leaving directory 
`/var/tmp/portage/musicbrainz-2.1.1/work/libmusicbrainz-2.1.1' 
make: *** [all] Error 2 

Expected Results:  
 

Using gcc 2.95.3 and libc 2.2.5, dunno if this is the problem.
Comment 1 Alexander Gretencord 2004-08-24 15:26:34 UTC
Created attachment 38121 [details, diff]
Patches musicbrainz source file example/getalbum.c to define numDates at beginning of file instead of where it is used
Comment 2 Alexander Gretencord 2004-08-24 15:30:16 UTC
Created attachment 38122 [details, diff]
new ebuld that applies patch
Comment 3 Alexander Gretencord 2004-08-24 15:34:52 UTC
As I just noticed, this was already fixed by upstream. From their cvs:

getalbum.c 1.11 3 months robert Fixed a C++ vs C issue
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2004-08-29 10:20:47 UTC
fixed in portage