• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Building Strawberry in VS Code on OpenSUSE Leap 15.5

    Scheduled Pinned Locked Moved
    Development
    2
    14
    838
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • athoopenA
      athoopen
      last edited by

      All,
      I am trying to update the code to have more ¨radio" stations. The first problem I hit is that I cannot compile. I am using Visual Studio Code. Solved a lot of dependencies but now get stuck.
      This is the output I get:

      [proc] Executing command: cmake --version
      [proc] Executing command: cmake -E capabilities
      [variant] Loaded new set of variants
      [kit] Successfully loaded 0 kits from /home/arjan/.local/share/CMakeTools/cmake-tools-kits.json
      [proc] Executing command: /usr/bin/cmake --version
      [proc] Executing command: /usr/bin/cmake -E capabilities
      [proc] Executing command: /usr/bin/cmake -S/home/arjan/OneDrive/git/strawberry -B/home/arjan/OneDrive/git/strawberry/build -G Ninja
      [proc] The command: /usr/bin/cmake -S/home/arjan/OneDrive/git/strawberry -B/home/arjan/OneDrive/git/strawberry/build -G Ninja exited with code: 1
      [main] Configuring project: strawberry 
      [proc] Executing command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S/home/arjan/OneDrive/git/strawberry -B/home/arjan/OneDrive/git/strawberry/build -G Ninja
      [cmake] Not searching for unused variables given on the command line.
      [cmake] -- Strawberry Version:
      [cmake] -- Display:  1.0.23-19-g42d6c797
      [cmake] -- Package:  1.0.23.19.g42d6c797
      [cmake] -- RPM:      1.0.23-2.19.g42d6c797
      [cmake] -- PAC:      1.0.23.r19.g42d6c797-1
      [cmake] -- Found the following ICU libraries:
      [cmake] --   uc (required)
      [cmake] --   i18n (required)
      [cmake] -- Could NOT find Protobuf (missing: Protobuf_DIR)
      [cmake] -- Checking for module 'libvlc'
      [cmake] --   No package 'libvlc' found
      [cmake] -- Checking for module 'libchromaprint>=1.4'
      [cmake] --   No package 'libchromaprint' found
      [cmake] -- Checking for module 'libgpod-1.0>=0.7.92'
      [cmake] --   No package 'libgpod-1.0' found
      [cmake] -- Checking for module 'libmtp>=1.0'
      [cmake] --   No package 'libmtp' found
      [cmake] FFTW3 lib not found. Set FFTW3_DIR to find it.
      [cmake] -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
      [cmake] -- QT_VERSION_MAJOR, BUILD_WITH_QT5 or BUILD_WITH_QT6 not set, detecting Qt version...
      [cmake] -- Could NOT find Qt6Core (missing: Qt6Core_DIR)
      [cmake] -- Configuring incomplete, errors occurred!
      [cmake] See also "/home/arjan/OneDrive/git/strawberry/build/CMakeFiles/CMakeOutput.log".
      [cmake] See also "/home/arjan/OneDrive/git/strawberry/build/CMakeFiles/CMakeError.log".
      [cmake] CMake Error at CMakeLists.txt:198 (find_package):
      [cmake]   Found package configuration file:
      [cmake] 
      [cmake]     /usr/lib64/cmake/Qt6/Qt6Config.cmake
      [cmake] 
      [cmake]   but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
      [cmake]   FOUND.  Reason given by package:
      [cmake] 
      [cmake]   Failed to find required Qt component "Core".
      [cmake] 
      [cmake]   Expected Config file at "/usr/lib64/cmake/Qt6Core/Qt6CoreConfig.cmake" does
      [cmake]   NOT exist
      [cmake] 
      [cmake]   
      [cmake] 
      [cmake]   Configuring with -DCMAKE_FIND_DEBUG_MODE=TRUE might reveal details why the
      [cmake]   package was not found.
      [cmake] 
      [cmake]   Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
      [cmake]   of the path variables that find_package uses to try and find the package.
      [cmake] 
      [cmake] 
      [cmake] 
      [proc] The command: /usr/bin/cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S/home/arjan/OneDrive/git/strawberry -B/home/arjan/OneDrive/git/strawberry/build -G Ninja exited with code: 1
      

      All help/tips/trics to get me going are appreciated!

      Cheers,
      Arjan

      jonasJ 1 Reply Last reply Reply Quote 0
      • jonasJ
        jonas @athoopen
        last edited by jonas

        @athoopen
        Isn't the message clear about what's missing here?
        According to the message you are missing Qt 6 Core, protobuf, chromaprint, fftw.

        Do you have all the relevant devel packages?
        Does /usr/lib64/cmake/Qt6Core/Qt6CoreConfig.cmake exist?

        It's documented on https://wiki.strawberrymusicplayer.org/wiki/Compile_openSUSE what packages are needed on openSUSE.

        If it doesn't work I suggest that you delete the CMakeCache.txt file and run cmake again.

        1 Reply Last reply Reply Quote 0
        • athoopenA
          athoopen
          last edited by athoopen

          Thanks jonas, that kind of help I was looking for. Feel ashamed that I didn't find it myself in the wiki.

          Sadly enough on Leap 15.5 there is no kdsingleapplication-qt6-devel. Thatś where it ends for me. I cannot change to tumbleweed. Will try a virtual machine (soon).

          jonasJ 1 Reply Last reply Reply Quote 0
          • jonasJ
            jonas @athoopen
            last edited by

            @athoopen
            kdsingleapplication is available as a git submodule
            do: git submodule update --init --recursive

            1 Reply Last reply Reply Quote 0
            • athoopenA
              athoopen
              last edited by

              @jonas Thanks for the suggestion, however I just finished setting up thumbelweed virtual machine. Used the wiki to get all packages and the did the clone (as suggested) followed by the build instructions.
              However this gives an error related to TagLib:

              ...
              ... previous lines deleted
              ...
              -- Performing Test HAVE_QX11APPLICATION
              -- Performing Test HAVE_QX11APPLICATION - Success
              CMake Warning at CMakeLists.txt:274 (find_package):
                By not providing "FindTagLib.cmake" in CMAKE_MODULE_PATH this project has
                asked CMake to find a package configuration file provided by "TagLib", but
                CMake did not find one.
              
                Could not find a package configuration file provided by "TagLib" (requested
                version 2.0) with any of the following names:
              
                  TagLibConfig.cmake
                  taglib-config.cmake
              
                Add the installation prefix of "TagLib" to CMAKE_PREFIX_PATH or set
                "TagLib_DIR" to a directory containing one of the above files.  If "TagLib"
                provides a separate development package or SDK, be sure it has been
                installed.
              
              
              -- Checking for module 'taglib>=1.11.1'
              --   Package 'taglib', required by 'virtual:world', not found
              CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:619 (message):
                The following required packages were not found:
              
                 - taglib>=1.11.1
              
              Call Stack (most recent call first):
                /usr/share/cmake/Modules/FindPkgConfig.cmake:841 (_pkg_check_modules_internal)
                CMakeLists.txt:281 (pkg_check_modules)
              
              
              -- Configuring incomplete, errors occurred!
              
              

              Any tips and trics to overcome this ...
              Cheers,
              Arjan

              jonasJ 1 Reply Last reply Reply Quote 0
              • jonasJ
                jonas @athoopen
                last edited by

                @athoopen said in Building Strawberry in VS Code on OpenSUSE Leap 15.5:

                taglib

                Install libtag-devel

                1 Reply Last reply Reply Quote 0
                • athoopenA
                  athoopen
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • athoopenA
                    athoopen
                    last edited by

                    @jonas I could do with some help, I have added radio stations, it compiles with no error and the UI behaves as expected. However, if I want to listen to one of my stations it gives the error File not Found:

                    ../ext/soup/gstsouphttpsrc.c(1687): gst_soup_http_src_parse_status (): /GstPlayBin3:pipeline-1-pipeline/GstURIDecodeBin3:uridecodebin3/GstURISourceBin:urisourcebin0/GstSoupHTTPSrc:souphttpsrc0: File Not Found (404), URL: https://icecast.omroep.nl/radio1-bb-mp3/, Redirect to: (NULL)
                    

                    Please note the ending / in the url. I have not added this in the code:

                    << RadioChannel(source_, "NPO Radio 1", QUrl("https://icecast.omroep.nl/radio1-bb-mp3"))
                    

                    So somewhere strawberry adds a / to the url (at least that is my conclusion). But I just can´t find it 😠
                    Can you shine a light on this and help me finding the location where the / gets added to the url?

                    TIA,
                    Arjan

                    jonasJ 1 Reply Last reply Reply Quote 0
                    • jonasJ
                      jonas @athoopen
                      last edited by

                      @athoopen said in Building Strawberry in VS Code on OpenSUSE Leap 15.5:

                      QUrl("https://icecast.omroep.nl/radio1-bb-mp3"

                      I don't know. Does the same thing happen with Radio Paradise?
                      I suggest to debug it, check if QUrl does it, if so it's a Qt bug.
                      Check the radio_channels table if it's saved like that too.
                      There is a function here that converts the URL: https://github.com/strawberrymusicplayer/strawberry/blob/dd6b9bb38d1ffe620ee938b44aefefc9e7938f38/src/engine/gstengine.cpp#L705
                      Check if the URL is passed to GStreamer like that here: https://github.com/strawberrymusicplayer/strawberry/blob/dd6b9bb38d1ffe620ee938b44aefefc9e7938f38/src/engine/gstenginepipeline.cpp#L363

                      Anyway, I don't think hard-coding radio streams in the source code like this is a good idea. Only API's like Soma.fm should be a "service", and radio paradise and some others could be part of a dataset that is included.
                      It would be better to implement a future where users can add/remove channels in the radio view. We might have some channels available, but that could be a resource file in json format or similar if there isn't a web service to retrieve them from.

                      1 Reply Last reply Reply Quote 0
                      • athoopenA
                        athoopen
                        last edited by

                        Thanks @jonas ! My skills at C++ are not that great so debugging will probably become hard. The strange thing is radio paradise does not suffer from this.
                        With having hard-coded radio streams inside strawberry being a bad idea is something I fully agree on. However, looking how "Radio" is currently implemented, I just followed this way of implementing. I took Radio Paradise as an example/template.

                        It would be much better if strawberry would give the user a possibility to import (via a .m3u or .pls file???) radio station streams where strawberry would store them in its database and show them under "Radio".

                        I'll see if I can fix it, but don't count on it. If it fails, I'll (ab)use playlist to get my favorite radio stations into strawberry.

                        Thanks for your time and effort on this!
                        Arjan

                        jonasJ 1 Reply Last reply Reply Quote 0
                        • jonasJ
                          jonas @athoopen
                          last edited by

                          @athoopen
                          Radio Paradise is fixed so it uses the API now: https://github.com/strawberrymusicplayer/strawberry/commit/05381096aa47b04117254f09d5954c0b2ab801ff

                          1 Reply Last reply Reply Quote 1
                          • athoopenA
                            athoopen
                            last edited by

                            There is nothing wrong with the code, after I removed the db and restarted strawberry the radio stations where all working.

                            I cannot explain this since, in my opinion, the stations are hard coded in the code so why should the (also) be in the db.

                            Nevertheless, got it working now 👍

                            1 Reply Last reply Reply Quote 0
                            • athoopenA
                              athoopen
                              last edited by

                              @jonas I am currently digging into the code of radio streams. There is one function I do not understand, or better, what the use of it is. In src/core/song.cpp there is a function called "SourceFromURL" (app. at line 850).
                              What is the use of this? What goes "wrong" if the return value is incorrect?

                              Could you elaborate a little bit about this function?

                              I also for see a challenge. There are many stations/streams who use a CDN (example: streamtheworld.com). To distinguish between stations, you can't use the url (it's always streamtheworld.com). The difference is within the path.

                              Any thoughts about this?

                              TIA,
                              Arjan

                              jonasJ 1 Reply Last reply Reply Quote 0
                              • jonasJ
                                jonas @athoopen
                                last edited by

                                @athoopen said in Building Strawberry in VS Code on OpenSUSE Leap 15.5:

                                SourceFromURL

                                The SourceFromURL function is used to determine source from URL when importing playlists.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Powered by NodeBB | Contributors