-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL2 compilation error on Rocky 8 #105
Comments
Thank you so much for your inquiry. I very much appreciate the detailed info, it helps quite a bit. I tried installing Rocky Linux 8 on a vm but was unable to make the configuration work. However, it seems from your description that you have been able to install the dependencies. There is an environment variable that sets the install directory of SDL2 which is SDL2_INSTALL_DIR. You could try setting that prior to compilation and see if it works, I'd wager about 50/50 chances of success. Update: I went back and tried again, but was not able to configure the environment needed for onvif-gui to work. The major stumbling block is installing the ffmpeg development libraries, for which I wasn't able to find an installer. There were also some issues with compiling liblivemedia, so I ended up throwing in the towel. I went and double checked the Fedora instructions, which seem to still be working. This is unfortunate, but the application needs these complex dependencies which may not be available on all platforms. Thank you so much for your interest in the project. |
I had been able to install ffmpeg-devel after installing epel before the rpmfusion packages using the following commands:
And after some more fiddling with the CMakeLists.txt in libavio, I got it to compile by changing SDL2::SDL2 to just SDL2 and specifying the path for the SDL2 include library in target_include_directories:
After following the rest of the instructions, I found I also needed to install these two rpms to get the gui to run correctly:
Just in case anyone wants to use a Rocky or RHEL system, these couple changes should make it function :) |
Hello, Thank you so much for the feedback. I am wondering how you were able to get libsdl2-devel installed. I tried it by compiling from source since there doesn't seem to be a dnf package. Even though SDL2 compiles and installs into /usr/local/lib64 and I added that directory to the path, I'm still getting this error message when I try to install ffmpeg-devel
Best Regards, Stephen |
Continuing in this thread, the following commands were helpful. Please note that this is being done for Rocky Linux 8. Install available libraries
From the previous post (I was missing the /usr/bin/crb enable)
This will install the ffmpeg development libraries, but it only includes the runtime SDL2, so you need to get the sdl2 source and compile it for the development includes
The next hurdle was getting Python development libraries, which seem unavailable on this version of Linux, so compile from source
Then add the path
and create a virtual environment
You also need the libxml2-devel libraries
To compile liblivemedia, it is necessary to edit the libonvif/liblivemedia/CMakeLists.txt file by appending the CMAKE_CXX_FLAGS. The -DNO_STD_LIB=1 is to get around the C++20 requirement
The compilation should now work
To get over the xcb issues, I ran the command
I noticed while running this in a VM on proxmox that the broadcast discovery didn't seem to work, although I have had success with other VMs on the same server. Adding the camera using the manual add on the discover tab worked, but uncovered a bug. You need to change the name of the camera by right clicking on the list and typing in a new name to avoid a null ptr bug when restarting the app, oops. This will be fixed soon. I was able to get the discovery working by disabling the firewall. I'm sure there's better way to do it, but opening the udp port 3702 was not working. I also noticed that it was necessary to change the Audio Driver on the Settings->General panel to dummy to get cameras with audio running. |
I am trying to compile this code on a Rocky 8 VM and have been following the Fedora instructions. When trying to install onvif-gui, I get this error when I try to run onvif-gui:
AttributeError: module 'avio' has no attribute 'Player'
I then tried to see if it would give me more information when compiling and building from the source code. libavio does not compile correctly and prints out this error:
I had followed all of the install dependencies instructions, and SDL2 is installed on my VM and has the correct sdl2-config.cmake file. Is there something else I have to do to get this to compile for RHEL?
The text was updated successfully, but these errors were encountered: