Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on Arch Linux #47

Closed
maxrbriggs opened this issue Feb 14, 2021 · 2 comments
Closed

Fails to build on Arch Linux #47

maxrbriggs opened this issue Feb 14, 2021 · 2 comments
Assignees
Milestone

Comments

@maxrbriggs
Copy link

Building from git according to the readme instructions fails on Arch Linux during make.

Making all in src
make[2]: Entering directory '/home/max/castget/src'
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2     -g -O2 -MT castget.o -MD -MP -MF .deps/castget.Tpo -c -o castget.o castget.c
In file included from /usr/include/unicode/umachine.h:52,
                 from /usr/include/unicode/utypes.h:38,
                 from /usr/include/unicode/ucnv_err.h:88,                                                                              
                 from /usr/include/unicode/ucnv.h:52,
                 from /usr/include/libxml2/libxml/encoding.h:31,
                 from /usr/include/libxml2/libxml/parser.h:810,
                 from castget.c:32:
/usr/include/id3/globals.h:87:13: error: two or more data types in declaration specifiers
   87 | typedef int bool;
      |             ^~~~
make[2]: *** [Makefile:471: castget.o] Error 1

It seems to be a conflict between the unicode library's usage of stdbool and id3lib's own definition of the type. I've tried compiling after removing the relevant block from /usr/include/id3/globals.h, and have successfully built castget with no errors.

@mlj
Copy link
Owner

mlj commented Feb 20, 2021

As you say, this happens because id3lib defines bool as int, while the unicode library defines bool using stdbool.h, which defines bool using a gcc extension on Arch.

This has to be fixed in id3lib (and there are similar reports on their mailing list form a long time ago), but id3lib is unmaintained so that is unlikely to happen in upstream.

I guess we'll have to port castget to taglib.

mlj added a commit that referenced this issue Feb 28, 2021
This replaces id3lib with taglib for setting tags like ID3v2 in media
files (issue #48). id3lib is unmaintained and currently leads to compile
errors on some platforms (issue #47).

Switching to taglib has the added advantage of expanding support beyond
MP3 files. Taglib also supports, for example, Ogg Vorbis, FLAC, WAV and
MP4 files.

The switch from id3lib to taglib is mostly straightforward except for
"content group" (ID3v2 "TIT1", castget configuration key
"id3contentgroup"), which taglib lacks support for. This is therefore
also dropped from castget.

This also uses the opportunity to replace the pedantically named
configuration keys, e.g. "id3leadartist", with simpler ones:

* id3title (ID3v2 TIT2) -> title_tag
* id3album (ID3v2 TALB) -> album_tag
* id3contenttype (ID3v2 TCON) -> genre_tag
* id3year (ID3v2 TYER) -> year_tag
* id3comment (ID3v2 COMM) -> comment_tag
@mlj mlj self-assigned this Feb 28, 2021
@mlj mlj modified the milestones: Release 2.0.0, Release 2.1.0 Feb 28, 2021
@mlj
Copy link
Owner

mlj commented Feb 28, 2021

Confirmed that this now builds on Arch Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants