mlj / castget

A simple, command-line based RSS enclosure downloader, primarily intended for automatic, unattended downloading of podcasts.
http://castget.johndal.com
GNU General Public License v2.0
98 stars 21 forks source link

Fails to build on Arch Linux #47

Closed maxrbriggs closed 3 years ago

maxrbriggs commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Confirmed that this now builds on Arch Linux.