mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

Error after last update to sfml 2.5.1 #658

Closed jhdgghost closed 3 years ago

jhdgghost commented 3 years ago

Hello just update sfml to 2.5.1 and attract with last commits in last official retropie 4.6.8 in my rpi4 and get this message

Attract-Mode v2.6.1 (Linux, SFML 2.5.1 +FontConfig +SWF +Curl) avcodec 58.90.100 / avformat 58.44.100 / swscale 5.6.101 / avutil 56.50.100 / swresample 3.6.100

Config: /home/pi/.attract/attract.cfg

*** Initializing display: 'RetroPie'

I complied using these instructions that work fine before today

mkdir code cd code sudo apt-get install -y cmake libflac-dev libogg-dev libvorbis-dev libopenal-dev libjpeg8-dev libfreetype6-dev libudev-dev libdrm-dev libgbm-dev libegl1-mesa-dev

git clone --depth 1 https://github.com/mickelson/sfml-pi sfml-pi mkdir sfml-pi/build; cd sfml-pi/build cmake .. -DSFML_DRM=1 sudo make install sudo ldconfig

sudo apt-get install -y cmake libflac-dev libogg-dev libvorbis-dev libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavresample-dev libopenal-dev libfreetype6-dev libudev-dev libjpeg-dev libudev-dev libfontconfig1-dev libglu1-mesa-dev libxinerama-dev libcurl4-openssl-dev

cd .. cd ..

git clone --depth 1 https://github.com/mickelson/attract attract cd attract make USE_DRM=1 USE_MMAL=1 sudo make install USE_DRM=1 USE_MMAL=1

cd ~;rm -rf ./code/attract && rm -rf ./code/ffmpeg && rm -rf ./code/sfml-pi sudo reboot now

Am I doing something wrong? Was working right before.

Thanks a lot for the work

oomek commented 3 years ago

Can you provide a debug log?

jhdgghost commented 3 years ago

I get this after attract --loglevel debug it is enough or i need do something else

putty.log

oomek commented 3 years ago

Would you please remove that log from the post and drag a log file onto it instead?

jhdgghost commented 3 years ago

Done

oomek commented 3 years ago

The log did not give me any additional clues unfortunately. Give me a moment, I'm gonna try clean on my pi4

jhdgghost commented 3 years ago

Sure take your time. Thanks for looking into it.

oomek commented 3 years ago

I've tried your build script and AM is launching normally. Does the error appear when you type attract in the terminal? Attract is installed in /usr/local/bin make sure this location is called on boot.

jhdgghost commented 3 years ago

The error appear also when i start retropie as attract is configured in autostart.sh as attract #auto. The error is the same in both cases. Failed to open X11 display.

I will retry to upload retropie, sfml and attract. Everything was working fine still these last updates.

In /usr/local/bin i see attract (2.3 MB), ffmpef, ffplay and ffprobe

oomek commented 3 years ago

Run it directly from the terminal instead relying on autostart. Maybe the boot script is launching an old attract, or with a bash that initializes x11 first

jhdgghost commented 3 years ago

I try directly from terminal but same error. I am rerunning now the updating script. I see in my home directory was a code an attract folder and not sure if there was the new or old ones. So i get sure of delete both directories and rerunning now the updating script.

oomek commented 3 years ago

Aah if you've built over an existing folder you will almost certainly get issues.

jhdgghost commented 3 years ago

I rerun the script and nothing same mistake again so seems is not a problem of old existing folder.

Before the problem just update retropie to last version 4.6.8 maybe there is some incompatibility with that last version. I am gonna reupdate retropie again as maybe something was not updated properly. Not sure if this commit from retropie can have some effect for example attractmode - added missing dependency libglu1-mesa-dev for kms targets https://github.com/RetroPie/RetroPie-Setup/commit/b618fd207945639beef315a4dff9dd228325829c

oomek commented 3 years ago

Send me a link to the img that you're using, and explain how you're updating AM, through that inbuilt script, or with terminal commands?

jhdgghost commented 3 years ago

Hi,

I re-update everything and rerun the script and nothing still the same. Even i delete the attract from /usr/local/bin before build again to be sure that was a new one but nothing.

I am using the official image for rpi4 https://github.com/RetroPie/RetroPie-Setup/releases/download/4.6/retropie-buster-4.6-rpi4.img.gz and write the sd with balenaEtcher. I am updating retropie through inbuilt script in retropie-setup menu. Now i am in 4.6.8. Apart from install attract-mode, sfml-pi with all dependencies and some extra emulators the image is clean.

After DRM/KMS was made available for rpi4 was working for me still today.

oomek commented 3 years ago

Flashed the img, updated retropie, installed attract from source in the experimental packages menu and it's running fine here.

oomek commented 3 years ago

Not sure though how to switch es to attract on boot. I see es and kodi only in settings

Nevermind, there was an option to manually edit autostart.sh I've just put attract there

oomek commented 3 years ago

There is a script called attract in /usr/bin that is launching attract mode from /opt/retropie/supplementary/attractmode/bin/attract

I believe this is what you're launching instead of your binary installed in /usr/local/bin

oomek commented 3 years ago

Just use install from source in experimental packages and you should be fine

jhdgghost commented 3 years ago

Just use install from source in experimental packages and you should be fine

Just try but same result. I install but show some errors at the end. I attach the log of retropie setup. rps_2020-09-27_000517.log.gz

So not sure what is happening. I will have to use emulationstation if not want to make a clean install and setup all emulators again

oomek commented 3 years ago

When you search in mc for libsfml and attract what do you get? It should look like this: 188485B0-030E-404D-8EBD-2A2A39D74E9F C16A5D37-8509-4943-AF8B-0C25E7B9E798

jhdgghost commented 3 years ago

Here the results. Atracct search looks the same but libsfml no

Screen Shot 2020-09-27 at 10 37 02 AM Screen Shot 2020-09-27 at 10 43 03 AM Screen Shot 2020-09-27 at 10 43 42 AM Screen Shot 2020-09-27 at 10 44 04 AM
jhdgghost commented 3 years ago

In usr/local/bin i see there is 2.4 or 2.4.1 files, maybe old files? The opt/retropie/supplementary/attracmode/sfml/sfml/lib looks the same and updated

I think the problem is a bad calling of the libraries or the libraries are not updated properly. Maybe the problem can no be replicated because i already install sfml and attract previously and there is a conflict between new 2.5.1 sfml-pi and previous version. As you start from a clean version you can not replicate the problem.

oomek commented 3 years ago

You can try wiping those libs. Check if usr/bin/attract is a script, not a bin. Rerun the update from source in experimental packages

jhdgghost commented 3 years ago

OK finally works again :). But sure not sure how I fixed it. I delete all the libsfml files and rerun the update from source in experimental packages but then an error that the libraries are not present. Here the files at that moment.

Screen Shot 2020-09-27 at 12 26 27 PM

So then i rerun from terminal my update script for sfml and all dependencies. And the usr/local/bin files appear

Screen Shot 2020-09-27 at 12 54 17 PM

And is working again :). So clearly something odd and probably conflict with previous installation of the libraries.

Thank you for the help i hope in later updates i do not have same problems but at least i know some tricks to fix it even not sure why.

oomek commented 3 years ago

You should have cleaned all the sfml libs and attract binaries and do sudo ldconfig before launching the update script in experimental packages. There should be no need to type it manually. I'm glad it worked though. Closing the issue.