SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.02k stars 1.23k forks source link

Chromaprint tools [$100 awarded] #902

Closed rednoah closed 9 years ago

rednoah commented 10 years ago

Has anyone managed to compile fpcalc (and the ffmpeg dependencies) with the DSM toolchains?

http://acoustid.org/chromaprint

The $100 bounty on this issue has been claimed at Bountysource.

rednoah commented 9 years ago

Added bounty for contributing a Chromaprint fpcalc command-line utility make instructions to spksrc so that packages we can get it as package from SynoCommunity and all Synology platform.

Bountysource

cytec commented 9 years ago

@rednoah if ffmpeg is the only dependence that should be doable

rednoah commented 9 years ago

Lukas, the developer of fpcalc, already got it working specifically for arm7hf just to see if it's feasible. Works fine here, but only for DS213J and the likes. I don't know exactly how he did it though. I never got it compiling with spksrc with any of the toolkits. If there was packages for all platforms that would be really nice.

cytec commented 9 years ago

well there is already a boost package in cross and also an ffmpeg seems like the only missing depend is taglib and then it should be working ;)

Maybe i can take a look if i got access to my VM again

rednoah commented 9 years ago

Sure, let me know if you need help with testing. Lukas is also really nice in helping, as long as you generally know what you're doing I guess. :D

isujinx commented 9 years ago

There was some good explanation of the compiling process for chromaprint on the Bliss site, but this is way over my head programming wise. I'd just like to see a fpcalc package! Not sure how to add the bounty thing like rednoah - but I'd throw in $20 to see it done.

cytec commented 9 years ago

I'll probably/hopefully have access to my VM tomorrow... hopefully i can give it a try then. keep you updated

cytec commented 9 years ago

@rednoah good news got it working on my DS1513+ (cedarview):

daenerys>LD_LIBRARY_PATH=/usr/local/chromaprint/lib  /usr/local/chromaprint/bin/fpcalc
usage: /usr/local/chromaprint/bin/fpcalc [OPTIONS] FILE...

Options:
  -version      print version information
  -length SECS  length of the audio data used for fingerprint calculation (default 120)
  -raw          output the raw uncompressed fingerprint
  -algo NAME    version of the fingerprint algorithm    
cytec commented 9 years ago

seems that somehow rlink is not working correctly but i don't know how to set it correctly for cmake... maybe @Diaoul or @Dr-Bean have an idea on that? current code is available here: https://github.com/cytec/spksrc/commit/62f78d0a75b2104cee9c2ac2d3656052b101e2da

Diaoul commented 9 years ago

@cytec: IDK but this seems to explain a lot of variables involved in the RPATH stuff.

cytec commented 9 years ago

got it thanks :)

cytec commented 9 years ago

@Diaoul is there a way to make a PLIST file for spk also? seems like there is a lot of stuff generated which isn't needed at all (ffmpeg binaries etc)

Diaoul commented 9 years ago

Filtering out some stuff can be done in a extra install rule like python. PLIST filtering for SPK is not implemented yet. If you want you can give it a shot.

rednoah commented 9 years ago

If you need some testing for armada370 builds let me know.

isujinx commented 9 years ago

Not that I'll be terribly helpful in troubleshooting, but let me know if you need Intel testing.

Glad you got it working!

cytec commented 9 years ago

i've compiled a version for armada370 and currently doing a x64 compile. Test SPK's will be available here: https://cytec.us/syno/test-spk/chromaprint/

@rednoah can you test? this only installs fpcalc to /usr/local/chromaprint/bin/fpcalc atm any feedback is welcome

cytec commented 9 years ago

@Diaoul @rednoah asked to link fpcalc to /usr/local/bin or /usr/bin what do you think? personally i'm not really a fan of linking binaries and would leave that to the user...

rednoah commented 9 years ago

Works well on armada370.

If you don't wanna link the binary into the $PATH thats fine for me. I can hardcode /usr/local/chromaprint/bin/fpcalc into my lookup path.

cytec commented 9 years ago

Nice! yeah i think that'll be the prefered way, lets wait for @Diaoul to comment his thoughts on that but i'm pretty sure he doesn't like linking it anywhere :D

Diaoul commented 9 years ago

Well for command line only utilities it's accepted to link binaries into /usr/local/bin. For example mc and nano (PR pending) do that.

cytec commented 9 years ago

ok i'll change the link to /usr/local/bin then

isujinx commented 9 years ago

x64 Build works great! I ran filebot's sysinfo, it found my old version of fpcalc, deleted it and ran sysinfo, and it failed fpcalc. Then installed the spk from the test site, modified filebot.sh back to the original place it looked for fpcalc, ran sysinfo and it found the new version of fpcalc!

Great work!

cytec commented 9 years ago

seems like i can rename my PR and remove the WIP? anyone getting any errors/problems so far?

rednoah commented 9 years ago

No problems on my DS213J (armada370) so far.

Dr-Bean commented 9 years ago

Chromaprint 1.2-1 has been published on the repository on the beta channel. I'll leave this issue open for feedback, for now.

Diaoul commented 9 years ago

@cytec: you can also claim that bounty I believe

rednoah commented 9 years ago

I'm not sure how Bounty Source works, but I think it's linked to this GitHub issue, so if this issue is closed then the bounty should be claimable.