| Summary: | Build issue: Building amarok refuses to support mp4 tag writing | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Darrell <darrella> |
| Component: | non-core programs | Assignee: | Slávek Banko <slavek.banko> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | bugwatch, darrella, kb9vqf, slavek.banko |
| Priority: | P1 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | All | ||
| OS: | Slackware 13 | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 1415 | ||
| Attachments: |
Partial patch to enable mp4 tagging
Patch to build mp4 tag support with autotools Partial patch for mp4v2 cmake support Add MP4Tags* API support Add MP4Tags* API support (2) Patch for mp4v2 cmake support Patch for mp4v2 cmake support (2) Add MP4Tags* API support (3) Patch for mp4v2 cmake support (3) |
||
|
Description
Darrell
2010-10-05 14:26:37 CDT
Created attachment 262 [details]
Partial patch to enable mp4 tagging
This bug report remains valid for adding mp4 tagging support but the scope has changed with Amarok being ported to cmake. :)
I created a partial patch to provide mp4v2 support under the new cmake build process, but I ran into problems beyond my knowledge. I receive a bunch of undefined reference errors at about 95% build. All of the affected function calls are in mp4v2 header files.
The problem is with the linking and not the compiling. Somebody else will need to finish this patch. I am grasping at the wind with this cmake stuff. :)
I added include statements in the affected files, but they seem to be ignored. For example, I tried <mp4v2/mp4v2.h> and <mp4v2.h>. I tried adding -DINCLUDE_DIRECTORIES="/usr/include/mp4v2".
Note: In Slackware the mp4v2 headers are installed at /usr/include/mp4v2.
Even when we get this patch to build, the build log shows that many of the function calls are deprecated and should be updated.
Build errors:
metadata/mp4/libtagmp4.a(mp4file.cpp.o): In function `TagLib::MP4::File::save()':
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:96: undefined reference to `MP4Close'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:98: undefined reference to `MP4Modify'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:114: undefined reference to `MP4GetMetadataTool'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:116: undefined reference to `MP4MetadataDelete'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:129: undefined reference to `MP4SetMetadataName'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:130: undefined reference to `MP4SetMetadataArtist'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:131: undefined reference to `MP4SetMetadataAlbum'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:132: undefined reference to `MP4SetMetadataComment'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:133: undefined reference to `MP4SetMetadataGenre'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:138: undefined reference to `MP4SetMetadataYear'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:140: undefined reference to `MP4GetMetadataTrack'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:141: undefined reference to `MP4SetMetadataTrack'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:145: undefined reference to `MP4SetMetadataCompilation'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:148: undefined reference to `MP4SetMetadataCoverArt'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:157: undefined reference to `MP4SetMetadataTool'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:162: undefined reference to `MP4Close'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:164: undefined reference to `MP4Read'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:129: undefined reference to `MP4SetMetadataName'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:133: undefined reference to `MP4SetMetadataGenre'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:132: undefined reference to `MP4SetMetadataComment'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:131: undefined reference to `MP4SetMetadataAlbum'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:130: undefined reference to `MP4SetMetadataArtist'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:154: undefined reference to `MP4SetMetadataCompilation'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:143: undefined reference to `MP4SetMetadataTempo'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:111: undefined reference to `MP4GetMetadataCompilation'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:101: undefined reference to `MP4Read'
metadata/mp4/libtagmp4.a(mp4file.cpp.o): In function `~File':
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:74: undefined reference to `MP4Close'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:74: undefined reference to `MP4Close'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:74: undefined reference to `MP4Close'
metadata/mp4/libtagmp4.a(mp4file.cpp.o): In function `File':
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:59: undefined reference to `MP4Read'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4file.cpp:59: undefined reference to `MP4Read'
metadata/mp4/libtagmp4.a(mp4properties.cpp.o): In function `TagLib::MP4::Properties::readAudioTrackProperties(void*, unsigned int)':
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4properties.cpp:106: undefined reference to `MP4GetTrackTimeScale'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4properties.cpp:109: undefined reference to `MP4GetTrackDuration'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4properties.cpp:112: undefined reference to `MP4ConvertFromTrackDuration'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4properties.cpp:116: undefined reference to `MP4GetTrackBitRate'
metadata/mp4/libtagmp4.a(mp4properties.cpp.o): In function `TagLib::MP4::Properties::readMP4Properties(void*)':
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4properties.cpp:84: undefined reference to `MP4GetNumberOfTracks'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4properties.cpp:88: undefined reference to `MP4FindTrackId'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4properties.cpp:91: undefined reference to `MP4GetTrackType'
metadata/mp4/libtagmp4.a(mp4tag.cpp.o): In function `TagLib::MP4::Tag::readTags(void*)':
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:84: undefined reference to `MP4GetMetadataName'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:88: undefined reference to `MP4GetMetadataArtist'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:93: undefined reference to `MP4GetMetadataComment'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:98: undefined reference to `MP4GetMetadataYear'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:102: undefined reference to `MP4GetMetadataAlbum'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:106: undefined reference to `MP4GetMetadataTrack'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:109: undefined reference to `MP4GetMetadataDisk'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:112: undefined reference to `MP4GetMetadataTempo'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:115: undefined reference to `MP4GetMetadataCompilation'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:118: undefined reference to `MP4GetMetadataGenre'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:122: undefined reference to `MP4GetMetadataWriter'
/dev/shm/applications/amarok/amarok/src/metadata/mp4/mp4tag.cpp:126: undefined reference to `MP4GetMetadataCoverArt'
metadata/mp4/libtagmp4.a(taglib_mp4filetyperesolver.cpp.o): In function `MP4FileTypeResolver::createFile(char const*, bool, TagLib::AudioProperties::ReadStyle) const':
/dev/shm/applications/amarok/amarok/src/metadata/mp4/taglib_mp4filetyperesolver.cpp:40: undefined reference to `MP4Read'
collect2: ld returned 1 exit status
Created attachment 900 [details] Patch to build mp4 tag support with autotools I found a patch online that I updated for R14: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-sound/amarok/files/amarok-libmp4v2.patch?view=markup The patch allowed amarok to build mp4 tag support when using autotools. I don't know what usability tests might suffice to validate the patch. Amarok does not build mp4 tag support when using cmake. There is a missing CMakeLists.txt file. Bug report 818 addresses other incomplete build options with amarok. Patch looks sane and mp4v2/ seems to be the current location of the mp4v2.h file on Ubuntu as well. Pushed to GIT in hash 4782580. Thanks for reporting, and for the patch! I tried to build on Debian Wheezy and Ubuntu Raring with patch from commit 47825804 and this causes FTBFS: /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp: In member function 'void TagLib::MP4::Tag::readTags(MP4FileHandle)': /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:85:43: error: 'MP4GetMetadataName' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:89:45: error: 'MP4GetMetadataArtist' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:94:46: error: 'MP4GetMetadataComment' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:99:43: error: 'MP4GetMetadataYear' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:103:44: error: 'MP4GetMetadataAlbum' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:107:59: error: 'MP4GetMetadataTrack' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:110:58: error: 'MP4GetMetadataDisk' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:113:47: error: 'MP4GetMetadataTempo' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:116:54: error: 'MP4GetMetadataCompilation' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:119:44: error: 'MP4GetMetadataGenre' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:123:45: error: 'MP4GetMetadataWriter' was not declared in this scope /tmp/buildd/amarok-trinity-3.5.13/./amarok/src/metadata/mp4/mp4tag.cpp:127:59: error: 'MP4GetMetadataCoverArt' was not declared in this scope make[7]: *** [mp4tag.lo] Error 1 It seems that mp4 tags support needs a rework - for 1.9.0 was 'meta' functions deprecated, in newer versions already missing: http://mp4v2.googlecode.com/svn/doc/1.9.0/api/group__mp4__meta.html Current state for mp4 support on Debian and Ubuntu is dismal: + Debian Squeeze - n/a - cannot be build + Debian Wheezy - 2.0.0 - causes FTBFS + Ubuntu Lucid - 1.6 - cannot be enabled + Ubuntu Maverick - 1.6 - cannot be enabled + Ubuntu Natty - 1.6 - cannot be enabled + Ubuntu Oneiric - n/a - cannot be build + Ubuntu Precise - 1.9.1 - causes FTBFS + Ubuntu Quantal - 2.0.0 - causes FTBFS + Ubuntu Raring - 2.0.0 - causes FTBFS I have libmp4v2-1.9.1 installed on Slackware 14.0.
Looks like the build failures are cmake related only. I can build amarok with automake using --with-mp4v2 and there are no build failures.
Part of the problem is incomplete mp4v2 support with cmake. I'm trying to massage an initial patch for cmake, using parts of attachment 262 [details].
Of course, no build failures does not mean mp4v2 tagging is working with amarok. I haven't tested that. :)
What happens when you build amarok with automake and --with-mp4v2?
This is certainly not cmake specific problem. On Debian and Ubuntu amarok are built using automake. The problems are two: 1) Older (1.6) libmp4v2 has include /usr/include/mp4.h => after patch which change mp4.h to mv4v2/mp4v2.h autotools not allow to enable mp4 support. 2) Newer libmp4v2 does not include group of functions MP4GetMeta* => mp4 support can not be built - causes FTBFS. Okay. I can't explain why I don't see a build failure with automake. Slavek, do you think you will be able to handle this report? I am swamped with bug reports right now and need all the help I can get! Created attachment 1149 [details] Partial patch for mp4v2 cmake support Partial patch to provide cmake support for mp4v2. Needs more work! I see several "undefined reference" failures when using the patch. Note, there are several more directories in amarok/amarok/src/metadata/ that do not have CMakeLists.txt files. Already noted in bug report 818, Comment #4: http://bugs.pearsoncomputing.net/show_bug.cgi?id=818#c4 > Slavek, do you think you will be able to handle this report? I am swamped with bug reports right now and need all the help I can get!
Slavek and I can play with this. :)
I don't think this bug report, or related bug report 818 should be a stopper for R14.0.0. If we get this resolved by then, great, if not, we keep tinkering for a maintenance release.
Created attachment 1264 [details]
Add MP4Tags* API support
Please try in your distributions.
Under cmake with both patches (attachments 1149 and 1264) the build fails with numerous "has not been declared" and "was not declared in this scope" errors. Here is a snippet of the errors: /dev/shm/amarok/amarok/src/metadata/mp4/mp4properties.h:71:40: error: 'MP4FileHandle' has not been declared /dev/shm/amarok/amarok/src/metadata/mp4/mp4properties.h:75:47: error: 'MP4FileHandle' has not been declared /dev/shm/amarok/amarok/src/metadata/mp4/mp4properties.h:75:70: error: 'MP4TrackId' has not been declared /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.h:44:25: error: 'MP4FileHandle' has not been declared /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.h:80:17: error: 'MP4FileHandle' does not name a type /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.h:44:46: error: 'MP4_INVALID_FILE_HANDLE' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4tag.h:51:32: error: 'MP4FileHandle' has not been declared /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:53:9: error: 'MP4FileHandle' has not been declared /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:63:18: error: 'MP4_INVALID_FILE_HANDLE' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:65:9: error: 'mp4file' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:65:31: error: 'MP4Read' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:69:9: error: 'mp4file' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:80:14: error: 'mp4file' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:80:21: error: 'MP4Close' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:102:14: error: 'mp4file' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:102:21: error: 'MP4Close' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:104:5: error: 'MP4FileHandle' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:104:19: error: expected ';' before 'handle' /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:105:8: error: 'handle' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:105:18: error: 'MP4_INVALID_FILE_HANDLE' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:107:33: error: 'MP4Read' was not declared in this scope /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:125:101: error: 'handle' was not declared in this scope Under automake with both patches the build fails with the following: mp4tag.cpp:90:39: error: could not convert 'MP4TagsFetch(filetags, mp4file)' from 'void' to 'bool'mp4file.cpp: In member function 'virtual bool TagLib::MP4::File::save()': mp4file.cpp:113:38: error: could not convert 'MP4TagsFetch(filetags, handle)' from 'void' to 'bool' mp4tag.cpp:90:39: error: in argument to unary ! mp4file.cpp:113:38: error: in argument to unary ! Created attachment 1266 [details]
Add MP4Tags* API support (2)
Fixed: Functions in API version 1.9.x are not returned status => is not possible to test the success of fetching tags.
Because cmake for amarok is fundamentally incomplete, in the patch I did not anticipate using cmake for building, for now.
Created attachment 1267 [details]
Patch for mp4v2 cmake support
Well, I tried to update your patch for mp4v2 cmake support.
Testing is up to you :)
Created attachment 1268 [details]
Patch for mp4v2 cmake support (2)
Fixed small typo...
I'll test both updated patches and test both cmake and automake. After we get amarok to build without errors, what kind of usability test do we perform to test MP4 tagging? (Odpověď na komentář #17)
> I'll test both updated patches and test both cmake and automake.
>
> After we get amarok to build without errors, what kind of usability test do we
> perform to test MP4 tagging?
With the mp4v2 support should be possible to edit tags in MP4 / M4A files. It can be used for the usability test.
Building with cmake I see the following build failure: /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:137:69: error: 'mp4tab' was not declared in this scope Same build error with automake. Probably the same patch will fix both. Created attachment 1269 [details]
Add MP4Tags* API support (3)
Fixed small typo...
With cmake I see errors like the following: /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:102: undefined reference to `MP4Close' /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:104: undefined reference to `MP4Modify' /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:112: undefined reference to `MP4TagsAlloc' /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:113: undefined reference to `MP4TagsFetch' /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:132: undefined reference to `MP4TagsSetName' /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:133: undefined reference to `MP4TagsSetArtist' /dev/shm/amarok/amarok/src/metadata/mp4/mp4file.cpp:134: undefined reference to `MP4TagsSetAlbum' Created attachment 1270 [details]
Patch for mp4v2 cmake support (3)
Yes, of course - missing linking mp4v2 library.
Fixed, I hope :)
I built without error with both cmake and automake. I don't have any mp4 or m4a audio files but I think the tag editing is working. Using ffmpeg I converted an mp3 audio file to m4a. With amarok I then edited a tag in the m4a file and there were no popup errors. The file date/time stamp also changed. I don't know whether this is a sufficient test. Note: In konqueror, when I select the m4a file and select Properties, there is no Meta Info tab. There is a Preview tab, but konqueror freezes when I select the Preview tab. No such problems with an mp3 audio file. Let me correct that. When I converted the mp3 to mp4, selecting the Propertied Preview tab in konqueror resulted in a freeze, but not with the mp3->m4a file I created. There is no Meta Info tab with either the m4a or mp4 file. The freeze is caused by Trinity not recognizing mp4 as an audio file format. The Properties dialog declares the file as an MPEG-4 Video and not MPEG-4 Audio. Do we need a new bug report to recognize mp4 as a valid audio mimetype? I would say push the two patches to GIT. :-) Good job! Fixed in GIT hashes 8bad2664 and 5fc2ad73. |