http://www.perlmonks.org?node_id=989182


in reply to Audio::TagLib and Strawberry Perl

I guess I should have included the errors.

Just the iostream errors ...

In file included from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.6.3/include/c++/ios:44:0, from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.6.3/include/c++/ostream:40, from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.6.3/include/c++/iostream:40, from C:/Libraries/taglib/include/taglib/tbytevector.h +:34, from C:/Libraries/taglib/include/taglib/apeitem.h:29, from TagLib.xs:29: c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ')' before '*' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ')' before '*' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ')' before '*' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ')' before '*' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ';' at end of member declaration c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected unqualified-id before ')' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ';' at end of member declaration c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected unqualified-id before ')' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf: In member function 'std::basic_streambuf<_CharT, _Traits>::__s +treambuf_type* std::basic_streambuf<_CharT, _Traits>::pubsetbuf(std:: +basic_streambuf<_CharT, _Traits>::char_type*, std::streamsize)': c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:238:22: error: expected unqualified-id before '(' token

The full results from (r is a batch file):

dmake clean makefile.pl dmake
C:\strawberry\cpan\build\Audio-TagLib-1.61>r C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e rm_f -- \ *.a core \ core.[0-9] core.[0-9][0-9] \ TagLib.bso TagLib.c \ blib\arch\auto\Audio\TagLib\extralibs.ld pm_to_blib.ts \ MYMETA.json core.[0-9][0-9][0-9][0-9] \ MYMETA.yml TagLib.x \ TagLib.bs perl.exe \ tmon.out blib\arch\auto\Audio\TagLib\extralibs.all \ *.o pm_to_blib \ blibdirs.ts core.[0-9][0-9][0-9][0-9][0-9] \ *perl.core core.*perl.*.? \ Makefile.aperl TagLib.def \ perl core.[0-9][0-9][0-9] \ mon.out libTagLib.def \ perlmain.c perl.exe \ so_locations TagLib.exp C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e rm_rf -- \ dll.exp dll.base \ blib C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv -- Makefile +Makefile.old > NUL Checking if your kit is complete... Looks good Writing Makefile for Audio::TagLib Writing MYMETA.yml and MYMETA.json cp lib/Audio/TagLib/ByteVector/Iterator.pm blib\lib\Audio\TagLib\ByteV +ector\Iterator.pm cp lib/Audio/TagLib/ID3v1/StringHandler.pm blib\lib\Audio\TagLib\ID3v1 +\StringHandler.pm cp lib/Audio/TagLib/String.pm blib\lib\Audio\TagLib\String.pm cp lib/Audio/TagLib/ID3v2/UniqueFileIdentifierFrame.pm blib\lib\Audio\ +TagLib\ID3v2\UniqueFileIdentifierFrame.pm cp lib/Audio/TagLib/ID3v2/FrameListMap/Iterator.pm blib\lib\Audio\TagL +ib\ID3v2\FrameListMap\Iterator.pm cp lib/Audio/TagLib/MPC/Properties.pm blib\lib\Audio\TagLib\MPC\Proper +ties.pm cp lib/Audio/TagLib/AudioProperties.pm blib\lib\Audio\TagLib\AudioProp +erties.pm cp lib/Audio/TagLib/MPEG/File.pm blib\lib\Audio\TagLib\MPEG\File.pm cp lib/Audio/TagLib/Ogg/File.pm blib\lib\Audio\TagLib\Ogg\File.pm cp lib/Audio/TagLib/ID3v2/Footer.pm blib\lib\Audio\TagLib\ID3v2\Footer +.pm cp lib/Audio/TagLib/ID3v2/Tag.pm blib\lib\Audio\TagLib\ID3v2\Tag.pm cp lib/Audio/TagLib/String/Iterator.pm blib\lib\Audio\TagLib\String\It +erator.pm cp lib/Audio/TagLib/ID3v2/UnknownFrame.pm blib\lib\Audio\TagLib\ID3v2\ +UnknownFrame.pm cp lib/Audio/TagLib/Vorbis/File.pm blib\lib\Audio\TagLib\Vorbis\File.p +m cp lib/Audio/TagLib/Vorbis/Properties.pm blib\lib\Audio\TagLib\Vorbis\ +Properties.pm cp lib/Audio/TagLib/Tag.pm blib\lib\Audio\TagLib\Tag.pm cp lib/Audio/TagLib/ID3v1/GenreMap/Iterator.pm blib\lib\Audio\TagLib\I +D3v1\GenreMap\Iterator.pm cp lib/Audio/TagLib/Ogg/FieldListMap.pm blib\lib\Audio\TagLib\Ogg\Fiel +dListMap.pm cp lib/Audio/TagLib/APE/Footer.pm blib\lib\Audio\TagLib\APE\Footer.pm cp lib/Audio/TagLib/ID3v2/UserTextIdentificationFrame.pm blib\lib\Audi +o\TagLib\ID3v2\UserTextIdentificationFrame.pm cp lib/Audio/TagLib/File.pm blib\lib\Audio\TagLib\File.pm cp lib/Audio/TagLib/ID3v2/CommentsFrame.pm blib\lib\Audio\TagLib\ID3v2 +\CommentsFrame.pm cp lib/Audio/TagLib/ID3v2/Header.pm blib\lib\Audio\TagLib\ID3v2\Header +.pm cp lib/Audio/TagLib/ID3v2/TextIdentificationFrame.pm blib\lib\Audio\Ta +gLib\ID3v2\TextIdentificationFrame.pm cp lib/Audio/TagLib/APE/Tag.pm blib\lib\Audio\TagLib\APE\Tag.pm cp lib/Audio/TagLib/Ogg/Vorbis/File.pm blib\lib\Audio\TagLib\Ogg\Vorbi +s\File.pm cp lib/Audio/TagLib/ID3v2/AttachedPictureFrame.pm blib\lib\Audio\TagLi +b\ID3v2\AttachedPictureFrame.pm cp lib/Audio/TagLib/ID3v2/RelativeVolumeFrame.pm blib\lib\Audio\TagLib +\ID3v2\RelativeVolumeFrame.pm cp lib/Audio/TagLib/ID3v2/ExtendedHeader.pm blib\lib\Audio\TagLib\ID3v +2\ExtendedHeader.pm cp lib/Audio/TagLib/FLAC/File.pm blib\lib\Audio\TagLib\FLAC\File.pm cp lib/Audio/TagLib/ID3v2/Frame.pm blib\lib\Audio\TagLib\ID3v2\Frame.p +m cp lib/Audio/TagLib/Ogg/PageHeader.pm blib\lib\Audio\TagLib\Ogg\PageHe +ader.pm cp lib/Audio/TagLib/MPC/File.pm blib\lib\Audio\TagLib\MPC\File.pm cp lib/Audio/TagLib/FLAC/Properties.pm blib\lib\Audio\TagLib\FLAC\Prop +erties.pm cp lib/Audio/TagLib/ID3v2.pm blib\lib\Audio\TagLib\ID3v2.pm cp lib/Audio/TagLib/ID3v2/RelativeVolumeFrame/PeakVolume.pm blib\lib\A +udio\TagLib\ID3v2\RelativeVolumeFrame\PeakVolume.pm cp lib/Audio/TagLib/Ogg/XiphComment.pm blib\lib\Audio\TagLib\Ogg\XiphC +omment.pm cp lib/Audio/TagLib/Ogg/FLAC/File.pm blib\lib\Audio\TagLib\Ogg\FLAC\Fi +le.pm cp lib/Audio/TagLib/ID3v1.pm blib\lib\Audio\TagLib\ID3v1.pm cp lib/Audio/TagLib/MPEG/Header.pm blib\lib\Audio\TagLib\MPEG\Header.p +m cp lib/Audio/TagLib/ID3v2/FrameFactory.pm blib\lib\Audio\TagLib\ID3v2\ +FrameFactory.pm cp lib/Audio/TagLib/FileRef/FileTypeResolver.pm blib\lib\Audio\TagLib\ +FileRef\FileTypeResolver.pm cp lib/Audio/TagLib/Ogg/FieldListMap/Iterator.pm blib\lib\Audio\TagLib +\Ogg\FieldListMap\Iterator.pm cp lib/Audio/TagLib/APE/Item.pm blib\lib\Audio\TagLib\APE\Item.pm cp lib/Audio/TagLib/ID3v2/FrameList.pm blib\lib\Audio\TagLib\ID3v2\Fra +meList.pm cp lib/Audio/TagLib/ID3v2/FrameList/Iterator.pm blib\lib\Audio\TagLib\ +ID3v2\FrameList\Iterator.pm cp lib/Audio/TagLib/ID3v1/GenreMap.pm blib\lib\Audio\TagLib\ID3v1\Genr +eMap.pm cp lib/Audio/TagLib/StringList.pm blib\lib\Audio\TagLib\StringList.pm cp lib/Audio/TagLib/MPEG/XingHeader.pm blib\lib\Audio\TagLib\MPEG\Xing +Header.pm cp lib/Audio/TagLib/APE/ItemListMap.pm blib\lib\Audio\TagLib\APE\ItemL +istMap.pm cp lib/Audio/TagLib/Ogg/Vorbis/Properties.pm blib\lib\Audio\TagLib\Ogg +\Vorbis\Properties.pm cp lib/Audio/TagLib/ID3v2/FrameListMap.pm blib\lib\Audio\TagLib\ID3v2\ +FrameListMap.pm cp lib/Audio/TagLib/ByteVectorList.pm blib\lib\Audio\TagLib\ByteVector +List.pm cp lib/Audio/TagLib/ID3v2/SynchData.pm blib\lib\Audio\TagLib\ID3v2\Syn +chData.pm cp lib/Audio/TagLib.pm blib\lib\Audio\TagLib.pm cp lib/Audio/TagLib/Ogg/Page.pm blib\lib\Audio\TagLib\Ogg\Page.pm cp lib/Audio/TagLib/ByteVector.pm blib\lib\Audio\TagLib\ByteVector.pm cp lib/Audio/TagLib/MPEG/Properties.pm blib\lib\Audio\TagLib\MPEG\Prop +erties.pm cp lib/Audio/TagLib/ID3v1/Tag.pm blib\lib\Audio\TagLib\ID3v1\Tag.pm cp lib/Audio/TagLib/FileRef.pm blib\lib\Audio\TagLib\FileRef.pm cp lib/Audio/TagLib/APE/ItemListMap/Iterator.pm blib\lib\Audio\TagLib\ +APE\ItemListMap\Iterator.pm C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp + -C++ -hiertype -typemap C:\strawberry\perl\lib\ExtUtils\typemap -ty +pemap typemap TagLib.xs > TagLib.xsc && C:\strawberry\perl\bin\perl. +exe -MExtUtils::Command -e mv -- TagLib.xsc TagLib.c g++ -c -IC:\strawberry\c\include -I./include -IC:/Libraries/taglib/in +clude/taglib -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPL +ICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields +-s -O2 -DVERSION=\"1.61\" -DXS_VERSION=\"1.61\" "-IC:\strawber +ry\perl\lib\CORE" -DNO_DOXYGEN TagLib.c TagLib.xs:23:15: warning: extra tokens at end of #ifdef directive [ena +bled by default] TagLib.xs:24:15: warning: extra tokens at end of #undef directive [ena +bled by default] TagLib.xs:26:16: warning: extra tokens at end of #undef directive [ena +bled by default] TagLib.xs:32:0: warning: "do_open" redefined [enabled by default] TagLib.xs:31:0: note: this is the location of the previous definition TagLib.xs:34:0: warning: "do_close" redefined [enabled by default] TagLib.xs:33:0: note: this is the location of the previous definition In file included from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.6.3/include/c++/ios:44:0, from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.6.3/include/c++/ostream:40, from c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/ +4.6.3/include/c++/iostream:40, from C:/Libraries/taglib/include/taglib/tbytevector.h +:34, from C:/Libraries/taglib/include/taglib/apeitem.h:29, from TagLib.xs:29: c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ')' before '*' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ')' before '*' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ')' before '*' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ')' before '*' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ';' at end of member declaration c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected unqualified-id before ')' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected ';' at end of member declaration c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:571:7: error: expected unqualified-id before ')' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf: In member function 'std::basic_streambuf<_CharT, _Traits>::__s +treambuf_type* std::basic_streambuf<_CharT, _Traits>::pubsetbuf(std:: +basic_streambuf<_CharT, _Traits>::char_type*, std::streamsize)': c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/stre +ambuf:238:22: error: expected unqualified-id before '(' token ./xs/tstring.xs: In function 'void XS_Audio__TagLib__String_new(PerlIn +terpreter*, CV*)': ./xs/tstring.xs:90:14: warning: deprecated conversion from string cons +tant to 'char*' [-Wwrite-strings] ./xs/tstring.xs:93:14: warning: deprecated conversion from string cons +tant to 'char*' [-Wwrite-strings] ./xs/tstring.xs:104:15: warning: deprecated conversion from string con +stant to 'char*' [-Wwrite-strings] ./xs/tstring.xs:107:15: warning: deprecated conversion from string con +stant to 'char*' [-Wwrite-strings] ./xs/tstring.xs:110:15: warning: deprecated conversion from string con +stant to 'char*' [-Wwrite-strings] ./xs/tstring.xs:113:15: warning: deprecated conversion from string con +stant to 'char*' [-Wwrite-strings] ./xs/tstring.xs:116:15: warning: deprecated conversion from string con +stant to 'char*' [-Wwrite-strings] ./xs/fileref.xs: In function 'void XS_Audio__TagLib__FileRef_new(PerlI +nterpreter*, CV*)': ./xs/fileref.xs:17:17: warning: deprecated conversion from string cons +tant to 'char*' [-Wwrite-strings] dmake: Error code 129, while making 'TagLib.o' C:\strawberry\cpan\build\Audio-TagLib-1.61>

-Enjoy
fh :)_~

Replies are listed 'Best First'.
Re^2: Audio::TagLib and Strawberry Perl
by syphilis (Archbishop) on Aug 23, 2012 at 02:25 UTC
    c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.6.3/include/c++/streambuf:571:7: error: expected ')' before '*' token

    Yes, that's as far as I got with 1.61, too.
    I think it means that streambuf is being parsed as a C file instead of as the C++ file that it is.
    But I don't know why that is happening or what to do about it. I do see one invocation of 'gcc' in the generated Makefile:
    .c.i: gcc -E -c $(PASTHRU_INC) $(INC) \ $(CCFLAGS) $(OPTIMIZE) \ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \ $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFIN +E) $(DEFINE) $*.c > $*.i
    But I see nothing in the build output to indicate that's causing the problem. (Still, perhaps that's something that could be investigated further.)

    I think you're quite right that there's nothing wrong with the taglib library, and that the problem is Audio::TagLib.
    I think it's a pity that Audio::TagLib has chosen to build against the libtag C++ library, instead of against the libtag_c C library.
    At least I presume libtag_c is a C library - and that I'd therefore have a good chance of being able to work around any problems in the offchance that it didn't build straight out of the box.

    Cheers,
    Rob