Closed seagullyoyo closed 10 years ago
I don't see why it would like to link against pthread. Could you please just do the following:
cd /tmp
git clone http://github.com/dominikschnitzer/musly.git
cd musly
mkdir build && cd build
cmake ..
VERBOSE=1 make
If you still observe the same problem, please post the commands shown after the "Linking CXX executable musly" line, and also let us know what's your operating system. Thank you!
Sorry, dr.schnitzer, i didn't see your reply in time. I have solved the issue by adding "pthread" in "target_link_libraries". And now I'm studying your phD thesis, i have some questions:
Sorry for the late reply and thanks for posting your solution. To answer your questions:
I'm closing this Issue because the original problem is solved, but please feel free to post follow-up questions on the similarity measures.
Linking CXX executable musly
../libmusly/libmusly.so: undefined reference to avresample_alloc_context' ../libmusly/libmusly.so: undefined reference to
inflateReset'
../libmusly/libmusly.so: undefined reference to clock_gettime' ../libmusly/libmusly.so: undefined reference to
inflateEnd'
../libmusly/libmusly.so: undefined reference to compress' ../libmusly/libmusly.so: undefined reference to
avresample_isopen'
../libmusly/libmusly.so: undefined reference to deflate' ../libmusly/libmusly.so: undefined reference to
deflateInit'
../libmusly/libmusly.so: undefined reference to inflateInit2_' ../libmusly/libmusly.so: undefined reference to
inflate'
../libmusly/libmusly.so: undefined reference to avresample_close' ../libmusly/libmusly.so: undefined reference to
inflateSync'
../libmusly/libmusly.so: undefined reference to compress2' ../libmusly/libmusly.so: undefined reference to
zlibCompileFlags'
../libmusly/libmusly.so: undefined reference to crc32' ../libmusly/libmusly.so: undefined reference to
deflateEnd'
../libmusly/libmusly.so: undefined reference to deflateBound' ../libmusly/libmusly.so: undefined reference to
deflateReset'
../libmusly/libmusly.so: undefined reference to avresample_convert' ../libmusly/libmusly.so: undefined reference to
pthread_create'
../libmusly/libmusly.so: undefined reference to BZ2_bzDecompress' ../libmusly/libmusly.so: undefined reference to
avresample_free'
../libmusly/libmusly.so: undefined reference to BZ2_bzDecompressEnd' ../libmusly/libmusly.so: undefined reference to
avresampleopen'
../libmusly/libmusly.so: undefined reference to `inflateInit'
../libmusly/libmusly.so: undefined reference todeflateInit2_' ../libmusly/libmusly.so: undefined reference to
BZ2_bzDecompressInit'
../libmusly/libmusly.so: undefined reference touncompress' ../libmusly/libmusly.so: undefined reference to
pthread_join'
collect2: ld 返回 1
make[2]: * [musly/musly] 错误 1
make[1]: * [musly/CMakeFiles/musly.dir/all] 错误 2
make: *\ [all] 错误 2
lxcheng@lxcheng-Aspire-4745G:~/project/musly$
The errors printed on my screen is showing above
Hey, thanks for your report! Could you please do what I asked above? I'd like to see what exactly was the linker command and compare with what it should have been. Also please let me know your operating system (including the version) and the version of libav!
Thank you for reply.First,the system used is ubutun 12.04,the came out the problems mentioned above.Then I update the system to ubutun 14.04,then I succeed to install the package.Then I perform a self-test of the library,it print "100% tests passed, 0 tests failed out of 1",then when I type :musly -N ,a new error come up:"musly: error while loading shared libraries: libmusly.so: cannot open shared object file: No such file or directory"
Sorry to interrupt ,but now,I have another question.Could Musly can output the similarity value of the test song to music collection .Thank you.
First,the system used is ubutun 12.04,the came out the problems mentioned above.
For me, musly compiles and works fine on both 12.04 and 14.04.
when I type :musly -N ,a new error come up:"musly: error while loading shared libraries: libmusly.so: cannot open shared object file: No such file or directory"
This means libmusly.so
is outside the search path for shared libraries. Can you run the musly
binary directly from the build directory (build/musly/musly
if you followed the installation instructions)? If so, how did you install musly? Did you do sudo make install
or did you provide a custom installation prefix to install it in a nonstandard location such as your home directory? In that case, you will need to add the library path to your LD_LIBRARY_PATH
environment variable.
If you still have trouble getting it to run, please answer all the questions one by one!
Could Musly can output the similarity value of the test song to music collection
Not sure I understand your question. Musly can compute the similarity of one song to another. There is no such thing as "the similarity to a collection". The library can compute the similarities of a given song to all other songs in the collection, via musly_jukebox_similarity()
. The command line client currently only provides a way to compute all similarities of all songs compared to all others (i.e., a similarity matrix) via the -m
option, or the X top matches via -k X -p
. In any case, note that the similarity values themselves are not very meaningful. What are you trying to accomplish?
Now ,I can run the tool now.Thank you. I'm trying to find the same song in a big collection of songs which contains duplication. And when I add a new song to the collection ,I want to know whether the new song had already exist in the collection.Now ,I know Musly can output several similar songs(for example,song1.mp3, song2.mp3,song3.mp3) to the given song(named song.mp3),but I want to know the similarity to the given song, ie,the similarity value between song.mp3 and song1.mp3 is 0.98,the similarity between song3.mp3 and song.mp3 is 0.5......... When I try the tool,I found song problems. There are three songs in my collection for test ,namely:Kalimba.mp3 , Sleep.mp3 and Maid.mp3 .When I compute the 5 most similar tracks to Kalimba.mp3 ,it give me wrong results with repeated songs:1,Sleep.mp3,2,Maid.mp3,Sleep.mp3! The Sleep.mp3 shows up twice! The three songs are: Kalimba .mp3 singer:Mr.Scruff ; Maid with the Flaxen Hair.mp3 singer:Richard Stolzman ;Sleep Away singer:Bob Acri.You can check whether I made a mistake when running the tool. Thank you.
The Sleep.mp3 shows up twice!
Oh, thanks. There was indeed a bug when computing a playlist larger than the collection size minus one. Should be fixed now.
And when I add a new song to the collection ,I want to know whether the new song had already exist in the collection.
There may be easier ways to accomplish that, e.g., via audio fingerprinting. But in principle it should work this way. The only problem is that the similarity is not printed right now. You could hack your musly command line client by replacing (in musly/main.cpp
):
// write playlist
std::ostringstream pl;
for (int i = 0; i < k; i++) {
int j = track_idx[i].first;
pl << tracks_files[j] << std::endl;
}
with:
// write playlist (with similarities)
std::ostringstream pl;
for (int i = 0; i < k; i++) {
int j = track_idx[i].first;
pl << track_idx[i].second << ": " << tracks_files[j] << std::endl;
}
Hi,Dr.schnitzer,