Forum » Last.fm Client Support

Linux client fails to build

 
  • Linux client fails to build

    When running 'make' for the client version 1.4.1.57486 all runs ok for a while then I get the following lines and the build drops out.

    /usr/bin/ld: cannot find -lsamplerate
    collect2: ld returned 1 exit status
    make[1]: *** [../../bin/libLastFmFingerprint.so.1.0.0] Error 1
    make[1]: Leaving directory `/home/Liam/Desktop/last.fm-1.4.1.57486/src/libFingerprint'
    make: *** Error 2



    Any ideas?

  • What Linux distribution are you using? That error means that you need to install libsamplerate. On Ubuntu and Debian, this is the "libsamplerate0" and "libsamplerate0-dev" packages. Refer to the included README file for a list of required packages.

    Hope this helps you :)
    • RiGo said...
    • User
    • 16 Jan 2008, 02:15

    I have the same problem

    I already installed both those packages but it still does not work.. same error. :S
  • I have the same problem... I'm using openSUSE 10.3. libsamplerate and libsamplerate-devel are installed, but I keep getting this error:

    make[1]: *** [../../bin/libLastFmFingerprint.so.1.0.0] Error 1
    make[1]: Leaving directory `/Data/Software/Linux/sources/last.fm-1.4.2.58240/src/libFingerprint'
    make: *** Error 2

    • RiGo said...
    • User
    • 20 Jan 2008, 19:41
    yeah just got it to compile... try export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib then try to compile this should work, given that you have all the required packages.
  • I have the last version of Ubuntu, I followed your advices but but still i got error:


    collect2: ld returned 1 exit status
    make[1]: *** [../../bin/libLastFmFingerprint.so.1.0.0] Error 1
    make[1]: Leaving directory `/home/zandr/last.fm-1.4.2.58240/src/libFingerprint'
    make: *** Error 2


    can you help me please?

    thank you very much

    Zandr
    • RiGo said...
    • User
    • 21 Jan 2008, 18:28
    it looks like ld is looking for some package you don't have installed.. you should see something like

    /usr/bin/ld: cannot find -l"some package name"

    before the collect2: ld returned 1 exit status

    If you get me that package name maybe I can help further.

    Regards
  • root@zandr-laptop:/home/zandr/last.fm-1.4.2.58240# make
    cd src/libUnicorn/ && make -f Makefile
    make[1]: Entering directory `/home/zandr/last.fm-1.4.2.58240/src/libUnicorn'
    make[1]: Nothing to be done for `first'.
    make[1]: Leaving directory `/home/zandr/last.fm-1.4.2.58240/src/libUnicorn'
    cd src/libMoose/ && make -f Makefile
    make[1]: Entering directory `/home/zandr/last.fm-1.4.2.58240/src/libMoose'
    make[1]: Nothing to be done for `first'.
    make[1]: Leaving directory `/home/zandr/last.fm-1.4.2.58240/src/libMoose'
    cd src/libFingerprint/fplib/pro_qmake/ && make -f Makefile.fplib
    make[1]: Entering directory `/home/zandr/last.fm-1.4.2.58240/src/libFingerprint/fplib/pro_qmake'
    make[1]: Nothing to be done for `first'.
    make[1]: Leaving directory `/home/zandr/last.fm-1.4.2.58240/src/libFingerprint/fplib/pro_qmake'
    cd src/libFingerprint/ && make -f Makefile
    make[1]: Entering directory `/home/zandr/last.fm-1.4.2.58240/src/libFingerprint'
    rm -f libLastFmFingerprint.so.1.0.0 libLastFmFingerprint.so libLastFmFingerprint.so.1 libLastFmFingerprint.so.1.0
    g++ -Wl,--no-undefined -shared -Wl,-soname,libLastFmFingerprint.so.1 -o libLastFmFingerprint.so.1.0.0 ../../build/LastFmFingerprint/release/Sha256File.o ../../build/LastFmFingerprint/release/Sha256.o ../../build/LastFmFingerprint/release/MP3_Source_Qt.o ../../build/LastFmFingerprint/release/Fingerprinter2.o ../../build/LastFmFingerprint/release/FingerprintCollector.o ../../build/LastFmFingerprint/release/FingerprintQueryer.o ../../build/LastFmFingerprint/release/moc_Fingerprinter2.o ../../build/LastFmFingerprint/release/moc_FingerprintCollector.o ../../build/LastFmFingerprint/release/moc_FingerprintQueryer.o -L/home/zandr/last.fm-1.4.2.58240/bin -L/home/zandr/last.fm-1.4.2.58240/build/LastFmFingerprint/../fplib -L/usr/lib -lMoose -L/home/zandr/last.fm-1.4.2.58240/bin -lLastFmTools /home/zandr/last.fm-1.4.2.58240/build/fplib/libfplib.a -lsamplerate -lfftw3f -lQtSql -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::fetchData(QFile&, unsigned char*, int, mad_stream&)':
    MP3_Source_Qt.cpp:(.text+0x15d): undefined reference to `mad_stream_buffer'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::release()':
    MP3_Source_Qt.cpp:(.text+0x1de): undefined reference to `mad_frame_finish'
    MP3_Source_Qt.cpp:(.text+0x1e9): undefined reference to `mad_stream_finish'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::init(QString const&)':
    MP3_Source_Qt.cpp:(.text+0xa18): undefined reference to `mad_stream_init'
    MP3_Source_Qt.cpp:(.text+0xa23): undefined reference to `mad_frame_init'
    MP3_Source_Qt.cpp:(.text+0xa31): undefined reference to `mad_synth_init'
    MP3_Source_Qt.cpp:(.text+0xa37): undefined reference to `mad_timer_zero'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::updateBuffer(short*, unsigned int)':
    MP3_Source_Qt.cpp:(.text+0x15c9): undefined reference to `mad_frame_decode'
    MP3_Source_Qt.cpp:(.text+0x160f): undefined reference to `mad_timer_add'
    MP3_Source_Qt.cpp:(.text+0x1624): undefined reference to `mad_synth_frame'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::skip(int)':
    MP3_Source_Qt.cpp:(.text+0x16ab): undefined reference to `mad_header_init'
    MP3_Source_Qt.cpp:(.text+0x16f1): undefined reference to `mad_header_decode'
    MP3_Source_Qt.cpp:(.text+0x172d): undefined reference to `mad_timer_add'
    MP3_Source_Qt.cpp:(.text+0x174d): undefined reference to `mad_timer_count'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::skipSilence(double)':
    MP3_Source_Qt.cpp:(.text+0x17a6): undefined reference to `mad_frame_init'
    MP3_Source_Qt.cpp:(.text+0x17ae): undefined reference to `mad_synth_init'
    MP3_Source_Qt.cpp:(.text+0x1835): undefined reference to `mad_frame_decode'
    MP3_Source_Qt.cpp:(.text+0x1870): undefined reference to `mad_synth_frame'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::getInfo(QString const&, int&, int&, int&, int&)':
    MP3_Source_Qt.cpp:(.text+0x1a4f): undefined reference to `mad_stream_init'
    MP3_Source_Qt.cpp:(.text+0x1a55): undefined reference to `mad_timer_zero'
    MP3_Source_Qt.cpp:(.text+0x1ab9): undefined reference to `mad_header_decode'
    MP3_Source_Qt.cpp:(.text+0x1aee): undefined reference to `mad_stream_finish'
    MP3_Source_Qt.cpp:(.text+0x1bb5): undefined reference to `mad_timer_add'
    collect2: ld returned 1 exit status
    make[1]: *** [../../bin/libLastFmFingerprint.so.1.0.0] Error 1
    make[1]: Leaving directory `/home/zandr/last.fm-1.4.2.58240/src/libFingerprint'
    make: *** Error 2



    i don't see any other error... I don't know what could be..

    Zandr
    • blizok said...
    • User
    • 19 Feb 2008, 09:41
    RiGo said:
    it looks like ld is looking for some package you don't have installed.. you should see something like

    /usr/bin/ld: cannot find -l"some package name"

    before the collect2: ld returned 1 exit status

    If you get me that package name maybe I can help further.

    Regards


    He Wrote there (top massage)

    /usr/bin/ld: cannot find -lsamplerate

    i've got the same problem, which package is it?

    Thanx.

    • said...
    • User
    • 24 Feb 2008, 21:44
    @blizok: libsamplerate library.
    • said...
    • User
    • 24 Feb 2008, 21:49
    I had the same problem. The missing library seemed to be fftw3, but it was already installed. Then, I found out that I also needed to install fftw3-devel package which includes required files for the installation. So, make sure that "devel" packages are installed in your system.

    currently I am having another library dependency problem I guess :)
  • packages needed

    Gents, the following packages need to be installed on your systems (mandriva 2008 example below)

    libsamplerate-devel-0.1.3-0.pre6.2mdv2008.0
    libsamplerate-progs-0.1.3-0.pre6.2mdv2008.0
    libfftw-devel-3.1.2-7mdv2008.0
    libid3tag0-0.15.1b-6mdv2008.0.i586.rpm
    madplay-0.15.2b-4mdv2008.0.i586.rpm
    libmad0-devel-0.15.1b-4mdv2007.1.i586.rpm
    libgpod2-devel
    libalsa2-devel

    its all in the readme :)

  • @zandrPunker:

    I had the same problem. To compile the last.fm client under Debian I had to modify the following makefiles

    ./src/libFingerprint/Makefile

    add -lmad under libs



  • just reinstall the libsamplerate

    I had the same error as the threadstarter, but after i installed the latest version of libsamplerate manually it worked perfectly fine. (Im using suse10.3 64bit)

    here's where you can find the new version:
    http://www.mega-nerd.com/SRC/download.html

    • fasiko said...
    • User
    • 23 Apr 2008, 00:48

    fsk

    there is a package of lastfm player for OpenSuse 10.3 in packman repository
  • Hardy Heron

    Thanks Spobrockel
    -lmad works !!!

    Also for some reason libFingerprint was compiling in "_debug" mode.First one to complain will be libfplib_debug.a

    edit the file <../src/libFingerprint/Makefile>
    replace "_debug" with ""

    Following are the packages for Hardy

    libqt4-dev
    libmad0-dev
    libsamplerate0-dev
    libfftw3-dev
    libgpod-dev
    libasound2-dev
  • with 'make' I've got nearly everything right, but this is the end of 'make'

    Assembler messages:
    Fatal error: can't create ../../../build/output_alsa/release/alsaplayback.o: Permission denied
    In file included from alsaplayback.cpp:23:
    alsaaudio.h:24:28: error: alsa/asoundlib.h: file does not exist
    In file included from alsaplayback.cpp:23:
    alsaaudio.h:41: error: ‘snd_pcm_format_t’ does not name a type
    alsaaudio.h:50: error: ‘snd_pcm_format_t’ does not name a type
    alsaaudio.h:53: error: ‘SND_PCM_FORMAT_S16_LE’ was not declared in this scope
    alsaaudio.h:54: error: ‘SND_PCM_FORMAT_S16_BE’ was not declared in this scope
    alsaaudio.h:55: error: ‘SND_PCM_FORMAT_S16’ was not declared in this scope
    alsaaudio.h:56: error: ‘SND_PCM_FORMAT_U16_LE’ was not declared in this scope
    alsaaudio.h:57: error: ‘SND_PCM_FORMAT_U16_BE’ was not declared in this scope
    alsaaudio.h:58: error: ‘SND_PCM_FORMAT_U16’ was not declared in this scope
    alsaaudio.h:59: error: ‘SND_PCM_FORMAT_U8’ was not declared in this scope
    alsaaudio.h:60: error: ‘SND_PCM_FORMAT_S8’ was not declared in this scope
    alsaaudio.h:61: error: too many initializers for ‘const<anonymous struct>’
    alsaaudio.h:61: error: too many initializers for ‘const<anonymous struct>’
    alsaaudio.h:61: error: too many initializers for ‘const<anonymous struct>’
    alsaaudio.h:61: error: too many initializers for ‘const<anonymous struct>’
    alsaaudio.h:61: error: too many initializers for ‘const<anonymous struct>’
    alsaaudio.h:61: error: too many initializers for ‘const<anonymous struct>’
    alsaaudio.h:61: error: too many initializers for ‘const<anonymous struct>’
    alsaaudio.h:61: error: too many initializers for ‘const<anonymous struct>’
    alsaaudio.h:73: error: ‘snd_pcm_uframes_t’ has not been declared
    alsaaudio.h:93: error: ISO C++ forbids declaration of ‘snd_output_t’ with no type
    alsaaudio.h:93: error: expected ‘;’ before ‘*’ token
    alsaaudio.h:95: error: ISO C++ forbids declaration of ‘snd_pcm_t’ with no type
    alsaaudio.h:95: error: expected ‘;’ before ‘*’ token
    alsaaudio.h:119: error: ‘snd_pcm_sframes_t’ does not name a type
    alsaaudio.h:123: error: ‘snd_pcm_format_t’ has not been declared
    make[1]: *** [../../../build/output_alsa/release/alsaplayback.o] mistake 2
    make[1]: Map '/home/peerlaan/Downloads/last.fm-1.4.2.58240/src/output/alsa-playback' wordt verlaten
    make: *** mistake 2

    what can I do about it? and if everything will be alright, how can I start lastfm then?

  • does not matter any more, "make clean" was the best option, moreover one could indicate a specific kind of music in the old program, not in this new program, a pity, so I just keep listening directly from the website, my sound card works well anyway.
    • xybre said...
    • Subscriber
    • 3 Jul 2008, 20:39

    Re: Hardy Heron

    bulbuntu said:
    Thanks Spobrockel
    -lmad works !!!

    Also for some reason libFingerprint was compiling in "_debug" mode.First one to complain will be libfplib_debug.a

    edit the file <../src/libFingerprint/Makefile>
    replace "_debug" with ""

    Following are the packages for Hardy

    libqt4-dev
    libmad0-dev
    libsamplerate0-dev
    libfftw3-dev
    libgpod-dev
    libasound2-dev


    I'm on Hardy and had several missing dependancies as well. I should read the README first.

    The source I downloaded didn't have the debug thing set, but I did need to install the alsa headers with libalsa2-dev and alsa-source.

    For the lazy, here's the commands you need on a clean install of Ubuntu Hardy (should work for other Debian-based distros too):


    ## variables
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib

    ## qt
    sudo apt-get install libqt4-dev

    ## misc libs
    sudo apt-get install libmad0-dev libsamplerate0-dev libfftw3-dev libgpod-dev libasound2-dev libid3tag0-dev

    ## alsa
    sudo apt-get install libalsa2-dev alsa-source

    ## I also added -lmad to LIB in ./src/libFingerprint/Makefile


    There might be an extra lib you don't need in that list, but it won't hurt.

    Let me know if there's a missing dependancy and I'll edit this post or make a new one so everyone has a single place to look.
  • Same issues

    Having the same issues as Zandr above - here's my problem:

    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::fetchData(QFile&, unsigned char*, int, mad_stream&)':
    MP3_Source_Qt.cpp:(.text+0x15d): undefined reference to `mad_stream_buffer'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::release()':
    MP3_Source_Qt.cpp:(.text+0x1de): undefined reference to `mad_frame_finish'
    MP3_Source_Qt.cpp:(.text+0x1e9): undefined reference to `mad_stream_finish'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::init(QString const&)':
    MP3_Source_Qt.cpp:(.text+0xa18): undefined reference to `mad_stream_init'
    MP3_Source_Qt.cpp:(.text+0xa23): undefined reference to `mad_frame_init'
    MP3_Source_Qt.cpp:(.text+0xa31): undefined reference to `mad_synth_init'
    MP3_Source_Qt.cpp:(.text+0xa37): undefined reference to `mad_timer_zero'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::updateBuffer(short*, unsigned int)':
    MP3_Source_Qt.cpp:(.text+0x15c9): undefined reference to `mad_frame_decode'
    MP3_Source_Qt.cpp:(.text+0x160f): undefined reference to `mad_timer_add'
    MP3_Source_Qt.cpp:(.text+0x1624): undefined reference to `mad_synth_frame'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::skip(int)':
    MP3_Source_Qt.cpp:(.text+0x16ab): undefined reference to `mad_header_init'
    MP3_Source_Qt.cpp:(.text+0x16f1): undefined reference to `mad_header_decode'
    MP3_Source_Qt.cpp:(.text+0x172d): undefined reference to `mad_timer_add'
    MP3_Source_Qt.cpp:(.text+0x174d): undefined reference to `mad_timer_count'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::skipSilence(double)':
    MP3_Source_Qt.cpp:(.text+0x17a6): undefined reference to `mad_frame_init'
    MP3_Source_Qt.cpp:(.text+0x17ae): undefined reference to `mad_synth_init'
    MP3_Source_Qt.cpp:(.text+0x1835): undefined reference to `mad_frame_decode'
    MP3_Source_Qt.cpp:(.text+0x1870): undefined reference to `mad_synth_frame'
    ../../build/LastFmFingerprint/release/MP3_Source_Qt.o: In function `MP3_Source::getInfo(QString const&, int&, int&, int&, int&)':
    MP3_Source_Qt.cpp:(.text+0x1a4f): undefined reference to `mad_stream_init'
    MP3_Source_Qt.cpp:(.text+0x1a55): undefined reference to `mad_timer_zero'
    MP3_Source_Qt.cpp:(.text+0x1ab9): undefined reference to `mad_header_decode'
    MP3_Source_Qt.cpp:(.text+0x1aee): undefined reference to `mad_stream_finish'
    MP3_Source_Qt.cpp:(.text+0x1bb5): undefined reference to `mad_timer_add'
    collect2: ld returned 1 exit status
    make[1]: *** [../../bin/libLastFmFingerprint.so.1.0.0] Error 1
    make[1]: Leaving directory `/home/fong/last.fm-1.4.2.58240/src/libFingerprint'
    make: *** Error 2


    I have all the required packages and everything going okay up to this point. On Hardy Heron too.

Anonymous users may not post messages. Please log in or create an account to post in the forums.

What’s New

It’s here. Welcome to the new Last.fm! Read all about it on our blog.