[SOLVED] Attract-Mode Frontend - Compiling issues

Very powerful gaming console solution based on Debian
tipoto
Posts: 134
Joined: Tue Dec 15, 2015 6:45 pm
languages_spoken: French, English & Spanish
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

[SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by tipoto » Sat Jan 09, 2016 5:33 am

-----------------------------




EDIT: This tutorial doesn't work anymore, but an updated tutorial is available on the Attract-Mode forums:
http://forum.attractmode.org/index.php? ... 71#msg3671







-----------------------------
Hi,

It's been 2 weeks now that we (I'm not alone) are trying to compile Attract-Mode on Xu3/Xu4, but even if we did some good progress, we are now stuck. We managed to compiled the program, but get an error when we launch it.
In case you don't know what Attract-Mode is, it's an amazing frontend specialized in gaming emulation, similar to Hyperspin but compatible with arm hardware. To give you an idea, here is a video I did using a Raspberry Pi 2, before switching to the Xu4, at 1 min you can see a NeoGeo layout I created... There a tons of possibilities to do things completely different:
https://www.youtube.com/watch?v=ZNVuFV9mfZA

Here is were we are in the compiling process:
(I'm using the meveric's OGST image, logged as ROOT.)

Create a build environment:

Code: Select all

cd ~
mkdir develop

apt-get install cmake libx11-dev libx11-xcb-dev libflac-dev libogg-dev libvorbis-dev libopenal-dev libjpeg62-turbo-dev libfreetype6-dev libxcb-randr0-dev libxcb-image0-dev libxcb-util0-dev libxcb-ewmh-dev libxcb-keysyms1-dev libxcb-icccm4-dev libudev-dev libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavresample-dev libfontconfig1-dev
(Attract-Mode was originally using libjpeg8-dev, but on debian it's been replaced by libjpeg62-turbo-dev)

Download and build SFML:
The program uses the SFML library, but to make it compiled properly, it needs a few modifications:

Code: Select all

cd ~/develop
git clone https://github.com/SFML/SFML sfml
We need to add:

Code: Select all

#include <X11/Xutil.h>
to these 3 files:
/home/odroid/develop/sfml/src/SFML/Window/EglContext.cpp
/home/odroid/develop/sfml/src/SFML/Window/EglContext.hpp
/home/odroid/develop/sfml/src/SFML/Window/GlContext.cpp

...also we need to modify this other file:
src/SFML/Window/CMakeLists.txt

...and insert these lines to it (insert them at line #213, after " include_directories(${EGL_INCLUDE_DIR} ${GLES_INCLUDE_DIR}) "):

Code: Select all

find_package(XCB COMPONENTS xlib_xcb icccm image randr util REQUIRED)
if(NOT LIBXCB_FOUND)
message(FATAL_ERROR "Xcb library not found")
endif()
include_directories(${LIBXCB_INCLUDE_DIRS})
then

Code: Select all

mkdir sfml/build;cd sfml/build
cmake -DSFML_OPENGL_ES=1 ..
make install
ldconfig
Build Attract-Mode:

Code: Select all

cd ~/develop
git clone --depth 1 https://github.com/mickelson/attract attract
cd attract
make
make install
To run attract-mode, type attract in the console, it will first copy over the files to home/odroid/.attract

With these steps, it fully compiles, but when we try to launch the frontend, the window never fully appears and we get an endless stream of the following:
"Failed to create texture, invalid size: (0x0)"

If anybody is interested to install it as well and help to solve the problem, it would be awesome! ^^

Here are some links that can help:
- Issue ticket created on Attract-Mode github:
https://github.com/mickelson/attract/issues/169

- Steps to install AM on the Raspberry Pi:
https://github.com/mickelson/attract/wi ... -Wheezy%29

- Modifications done on some specific files to get the SFML library and AM compiled properly on the Rpi:
https://github.com/mickelson/SFML/commi ... b53016c633

- Attract-Mode website
http://attractmode.org/

Thank you in advance!
Last edited by tipoto on Tue Nov 15, 2016 2:18 pm, edited 3 times in total.

User avatar
AreaScout
Posts: 850
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 2 times
Been thanked: 6 times
Contact:

Re: Attract-Mode Frontend - Compiling issues

Unread post by AreaScout » Mon Jan 11, 2016 10:38 pm

well this is easy to fix:

Code: Select all

cd ~/attract
wget -O patch.txt http://pastebin.com/raw/fybsi5FT
patch -p0 < patch.txt
note this fix is quick and dirty !

RG

tipoto
Posts: 134
Joined: Tue Dec 15, 2015 6:45 pm
languages_spoken: French, English & Spanish
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Attract-Mode Frontend - Compiling issues

Unread post by tipoto » Tue Jan 12, 2016 3:17 am

Arrrgh!.. I'm not at home right now. I will have to wait until tonight to test it! :)
Thank you very much for your patch!!! I'll let you know if it worked on my XU4, as soon as I tried it.
I took a look at the file, even though I'm not completely noob, it's above what I can understand unfortunately ^^, I can't even see that it's "dirty" :lol:

tipoto
Posts: 134
Joined: Tue Dec 15, 2015 6:45 pm
languages_spoken: French, English & Spanish
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Attract-Mode Frontend - Compiling issues

Unread post by tipoto » Tue Jan 12, 2016 2:47 pm

AWESOME!!! It works!!! :D
Thank you so much for your help! I will be able to migrate all my work done on the frontend from my pi2 to the xu4, it means hours of work saved!

I will pass the trick onto the Attract-Mode forums (and give you credit for your fix of course). ;)
Thanks again!

EDIT: How do we add [SOLVED] on the title?

User avatar
odroid
Site Admin
Posts: 30321
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 4 times
Been thanked: 29 times
Contact:

Re: Attract-Mode Frontend - Compiling issues

Unread post by odroid » Tue Jan 12, 2016 2:58 pm

Edit the OP and modify the title.

efraimsangil
Posts: 71
Joined: Wed Jan 27, 2016 1:07 am
languages_spoken: english, spanish
ODROIDs: XU4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by efraimsangil » Tue May 31, 2016 11:12 pm

I try it but I have this message:

Code: Select all

file /dev/mali0 is not of a compatible version (user 10.1, kernel 8.0)
ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
The DDK was built for 0x620 r0p1 status range [0..15], but none of the GPUs matched:
file /dev/mali0 is not of a compatible version (user 10.1, kernel 8.0)
Any idea?

Regards

Edit: I run apt-get dist-upgrade and now it's working :)

efraimsangil
Posts: 71
Joined: Wed Jan 27, 2016 1:07 am
languages_spoken: english, spanish
ODROIDs: XU4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by efraimsangil » Wed Jun 01, 2016 12:49 am

Hi!

I am trying robospin-betanew but I can't show video (snap) but I can hear it!! :D

Anyone has check this?

Thanks

Danfozzy85
Posts: 5
Joined: Tue Nov 15, 2016 1:05 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by Danfozzy85 » Tue Nov 15, 2016 4:13 am

this method no longer working? im getting this error when running cmake -DSFML_OPENGL_ES=1 ..

Code: Select all

root@gamestation-turbo:/home/odroid/develop/sfml/build# cmake -DSFML_OPENGL_ES=1 ..
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/arm-linux-gnueabihf/libX11.so
CMake Error at src/SFML/Window/CMakeLists.txt:214 (find_package):
  By not providing "FindXCB.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "XCB", but
  CMake did not find one.

  Could not find a package configuration file provided by "XCB" with any of
  the following names:

    XCBConfig.cmake
    xcb-config.cmake

  Add the installation prefix of "XCB" to CMAKE_PREFIX_PATH or set "XCB_DIR"
  to a directory containing one of the above files.  If "XCB" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "/home/odroid/develop/sfml/build/CMakeFiles/CMakeOutput.log".
root@gamestation-turbo:/home/odroid/develop/sfml/build# make install
make: *** No rule to make target 'install'.  Stop.
my edited CMakeList.txt reads (from line 213):

Code: Select all

include_directories(${EGL_INCLUDE_DIR} ${GLES_INCLUDE_DIR})
    find_package(XCB COMPONENTS xlib_xcb icccm image randr util REQUIRED)
    if(NOT LIBXCB_FOUND)
    message(FATAL_ERROR "Xcb library not found")
    endif()
    include_directories(${LIBXCB_INCLUDE_DIRS})
    endif()
    include_directories(${UDEV_INCLUDE_DIR})
endif()

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Tue Nov 15, 2016 7:00 am

Danfozzy85 wrote:this method no longer working? im getting this error when running cmake -DSFML_OPENGL_ES=1 ..
If you are using one of my Debian images, Debian Jessie, or OGST then you can simply install libsfml-odroid which is already build for OpenGL ES.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

tipoto
Posts: 134
Joined: Tue Dec 15, 2015 6:45 pm
languages_spoken: French, English & Spanish
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by tipoto » Tue Nov 15, 2016 2:18 pm

I updated the tutorial on the Attract-Mode forums:
http://forum.attractmode.org/index.php? ... 71#msg3671

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Tue Jan 08, 2019 8:05 am

Hi,

Any chance someone can help me get Attract Mode running on the ORA build based on Retropie? There's a large demand for it but yet no one has been able to pull it off.

http://odroidarena.com/downloads/

Cheers :)

Carl

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Tue Jan 08, 2019 8:14 am

funny though as ORA team was claiming for a long time it's "impossible due to lack of 32bit support" while there were plenty of 32bit systems RPi and ODROID that were already using it for years at that time ;)
Even their current statement, that attract mode is done by the developer from Supreme Odroid is wrong, as he simply uses my build of attract mode...

You could recompile libSFML against OpenGL ES and then compile attract mode in GLES mode. Not very hard, I've done that many times.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Tue Jan 08, 2019 6:20 pm

meveric wrote:
Tue Jan 08, 2019 8:14 am
funny though as ORA team was claiming for a long time it's "impossible due to lack of 32bit support" while there were plenty of 32bit systems RPi and ODROID that were already using it for years at that time ;)
Even their current statement, that attract mode is done by the developer from Supreme Odroid is wrong, as he simply uses my build of attract mode...

You could recompile libSFML against OpenGL ES and then compile attract mode in GLES mode. Not very hard, I've done that many times.
Yeah, I never quite understood the claims about missing 32 bit support. I think the ORA team have to much on their plate and simply don't want to support another app, which is fine.

Would be awesome if you can share the commands for compiling lifSFML agasinst OpenGL.

Thanks,
Carl

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Tue Jan 08, 2019 6:28 pm

calle81 wrote:
Tue Jan 08, 2019 6:20 pm
Yeah, I never quite understood the claims about missing 32 bit support. I think the ORA team have to much on their plate and simply don't want to support another app, which is fine.
It more sounds like they simply don't know what they do.
Sounds to me, the only thing they do is "Scripting" putting together the work of other people into a nice Layout, and adding a few scripts to make things run.
I highly doubt they have any clue how to compile software themselves and rely solely on work of other developers to assist them.
calle81 wrote:
Tue Jan 08, 2019 6:20 pm
Would be awesome if you can share the commands for compiling lifSFML agasinst OpenGL.
Apparently you didn't understand me.
There is a difference between OpenGL and OpenGL ES.
libSFML is already compiled against OpenGL by default.
Also you already posted on the attract mode forum in the exact part of the forum mentioned here is this section.. and it's clearly described how to compile SFML for OpenGL ES.
It's really not that hard.. It's one single command and already in that forum. How hard can it be to follow that?
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Tue Jan 08, 2019 7:49 pm

Sorry, meant OpenGL ES of course.

That single line does not work.

I followed the guide and modified the files mentioned manually as well, since the provided files in the thread are outdated, but it didn't work.

I'm also unable to install these packages mentioned in the thread which I believe I need.

E: Unable to locate package libjpeg62-turbo-dev
E: Unable to locate package libxcb-image0-dev
E: Unable to locate package libxcb-util0-dev
E: Unable to locate package libxcb-ewmh-dev
E: Unable to locate package libxcb-keysyms1-dev
E: Unable to locate package libxcb-icccm4-dev
E: Unable to locate package libavfilter-dev
E: Unable to locate package libavresample-dev

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Tue Jan 08, 2019 7:57 pm

these are old packages required for Debian Jessie, they do not exist on Debian Stretch or Ubuntu.
Just do an apt-get builddep libsfml-dev and it should install all dependencies that you need to build it.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Tue Jan 08, 2019 8:37 pm

Ok thanks! However now when I try to compile (I started fresh with unmodified sfml files) I get this:

root@odroid:~/develop/sfml/build# cmake -DSFML_OPENGL_ES=1 ..
-- The C compiler identification is GNU 5.4.1
-- The CXX compiler identification is GNU 5.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so
-- Looking for XOpenDisplay in /usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/arm-linux-gnueabihf/libX11.so
-- Found EGL: /usr/lib/arm-linux-gnueabihf/libEGL.so
-- Found GLES: /usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so
-- libudev stable: 1
-- Found UDev: /usr/lib/arm-linux-gnueabihf/libudev.so
-- include: /usr/include
CMake Error at cmake/Macros.cmake:279 (message):
Target 'EGL' is already defined
Call Stack (most recent call first):
src/SFML/Graphics/CMakeLists.txt:117 (sfml_find_package)


-- Configuring incomplete, errors occurred!
See also "/root/develop/sfml/build/CMakeFiles/CMakeOutput.log".

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Tue Jan 08, 2019 9:01 pm

Here is the CMakeOutput.log

https://pastebin.com/pYEFtp8A

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Tue Jan 08, 2019 10:42 pm

no clue what's the issue.
Complaining that EGL is already defined, is very unusual.
Maybe you have the wrong Header files, can't say. The CMakeOutput.log doesn't show any errors at all.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Wed Jan 09, 2019 12:36 am

OK, thanks for your help Meveric. I have posted the error message in the SFML forum so hopefully someone there can shed some light.

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Wed Jan 09, 2019 1:48 am

you should check what cmake/Macros.cmake:279 actually is all about, maybe they check for EGL twice or something and you can solve it by simply removing one check.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Wed Jan 09, 2019 2:25 am

Hmm, yeah this is where it fails: message(FATAL_ERROR "Target '${target}' is already defined")

Code: Select all

# Find the requested package and make an INTERFACE library from it
# Usage: sfml_find_package(wanted_target_name
#                          [INCLUDE "OPENGL_INCLUDE_DIR"]
#                          [LINK "OPENGL_gl_LIBRARY"])
function(sfml_find_package)
    set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/")
    list(GET ARGN 0 target)
    list(REMOVE_AT ARGN 0)

	if (TARGET ${target})
        message(FATAL_ERROR "Target '${target}' is already defined")
    	endif()

    cmake_parse_arguments(THIS "" "" "INCLUDE;LINK" ${ARGN})
    if (THIS_UNPARSED_ARGUMENTS)
        message(FATAL_ERROR "Unknown arguments when calling sfml_import_library: ${THIS_UNPARSED_ARGUMENTS}")
    endif()

    if (SFML_OS_IOS)
        find_host_package(${target} REQUIRED)
    else()
        find_package(${target} REQUIRED)
    endif()

    add_library(${target} INTERFACE)

    if (THIS_INCLUDE)
        foreach(include_dir IN LISTS "${THIS_INCLUDE}")
            if (NOT include_dir)
                message(FATAL_ERROR "No path given for include dir ${THIS_INCLUDE}")
            endif()
            target_include_directories(${target} INTERFACE "$<BUILD_INTERFACE:${include_dir}>")
        endforeach()
    endif()

    if (THIS_LINK)
        foreach(link_item IN LISTS ${THIS_LINK})
            if (NOT link_item)
                message(FATAL_ERROR "Missing item in ${THIS_LINK}")
            endif()
            target_link_libraries(${target} INTERFACE "$<BUILD_INTERFACE:${link_item}>")
        endforeach()
    endif()
    install(TARGETS ${target} EXPORT SFMLConfigExport)
endfunction()

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Wed Jan 09, 2019 2:29 am

And when i comment out that check I get this:

root@odroid:~/develop/sfml/build# cmake -DSFML_OPENGL_ES=1 ..
-- libudev stable: 1
-- Found UDev: /usr/lib/arm-linux-gnueabihf/libudev.so
-- include: /usr/include
CMake Error at cmake/Macros.cmake:293 (add_library):
add_library cannot create target "EGL" because another target with the same
name already exists. The existing target is an interface library created
in source directory "/root/develop/sfml/src/SFML/Window". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
src/SFML/Graphics/CMakeLists.txt:117 (sfml_find_package)


CMake Error at cmake/Macros.cmake:293 (add_library):
add_library cannot create target "GLES" because another target with the
same name already exists. The existing target is an interface library
created in source directory "/root/develop/sfml/src/SFML/Window". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
src/SFML/Graphics/CMakeLists.txt:118 (sfml_find_package)


-- Found OpenAL: /usr/lib/arm-linux-gnueabihf/libopenal.so
-- Found VORBIS: /usr/lib/arm-linux-gnueabihf/libvorbisenc.so;/usr/lib/arm-linux-gnueabihf/libvorbisfile.so;/usr/lib/arm-linux-gnueabihf/libvorbis.so;/usr/lib/arm-linux-gnueabihf/libogg.so
-- Found FLAC: /usr/lib/arm-linux-gnueabihf/libFLAC.so
-- Configuring incomplete, errors occurred!
See also "/root/develop/sfml/build/CMakeFiles/CMakeOutput.log".
root@odroid:~/develop/sfml/build#

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Wed Jan 09, 2019 3:41 am

https://en.sfml-dev.org/forums/index.php?topic=25001.0

I don't understand what he wants me to do :roll:

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Wed Jan 09, 2019 4:04 am

are you using git, or the packages from Ubuntu to compile SFML?
Means are you using latest version of SFML or just the one that comes from Ubuntu 16.04? I'll check the Macro file to see if I can see what he means, but I need to know which version you're using.

Edit:
nvm found it.

Edit:

Code: Select all

diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake
index 21ffb545..99926a78 100644
--- a/cmake/Macros.cmake
+++ b/cmake/Macros.cmake
@@ -276,7 +276,7 @@ function(sfml_find_package)
     list(REMOVE_AT ARGN 0)
 
     if (TARGET ${target})
-        message(FATAL_ERROR "Target '${target}' is already defined")
+        return()
     endif()
 
     cmake_parse_arguments(THIS "" "" "INCLUDE;LINK" ${ARGN})
You can take it quite literally what he said.
And yes this seems to work, although you might encounter other issues later on during compiling.

I also created a pull request for the change so it can be used by others as well.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Wed Jan 09, 2019 6:19 am

Thanks! With that change cmake can complete.

However, when I run "make install" I get this error:

Code: Select all

[ 33%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o
In file included from /usr/include/X11/Xlib.h:44:0,
                 from /usr/include/EGL/eglplatform.h:99,
                 from /usr/include/EGL/egl.h:39,
                 from /root/develop/sfml/src/SFML/Window/EGLCheck.hpp:32,
                 from /root/develop/sfml/src/SFML/Window/EglContext.hpp:33,
                 from /root/develop/sfml/src/SFML/Window/EglContext.cpp:29:
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected identifier before numeric constant
         None       = 0,      ///< No border / title bar (this flag and all othe
         ^
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected ‘}’ before numeric constant
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected unqualified-id before numeric constant
In file included from /root/develop/sfml/src/SFML/Window/Unix/CursorImpl.hpp:34:0,
                 from /root/develop/sfml/src/SFML/Window/CursorImpl.hpp:39,
                 from /root/develop/sfml/src/SFML/Window/WindowImpl.hpp:35,
                 from /root/develop/sfml/src/SFML/Window/EglContext.cpp:30:
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:50:1: error: expected declaration before ‘}’ token
 } // namespace sf
 ^
src/SFML/Window/CMakeFiles/sfml-window.dir/build.make:470: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o' failed
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o] Error1
CMakeFiles/Makefile2:170: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
root@odroid:~/develop/sfml/build# make install

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Wed Jan 09, 2019 7:02 am

yep I imagined something like that.
I know how to fix that, but it will compile against X11, and ORA doesn't use X11, they use fbdev drivers instead.
So I don't think that will help you.
Are you using the ORA image to compile this driver, or are you using something else like Ubuntu Mate Desktop image or so?
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Wed Jan 09, 2019 7:16 am

Ok, I'm using the ORA image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Wed Jan 09, 2019 7:17 am

Maybe we could use https://github.com/mickelson/sfml-pi which have no x dependencies? A developer, Oomek, is working on bringing sfml-pi up to speed with the latest sfml changes.

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Wed Jan 09, 2019 7:32 am

I think you only need to remove: https://github.com/SFML/SFML/blob/maste ... pp#L39-L41
and make sure your have the correct EGL headers, so EGLDisplay display is a fbdev display and not an X11 display.

I wouldn't use the RPi SFML version, as RPi often uses bcm_host and other RPi specific libraries that work no where else.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Wed Jan 09, 2019 8:21 am

Ok thanks, after i removed those line I get stuck here and sorry but I don't know what you mean with having the correct EGL headers:

[ 33%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o
In file included from /usr/include/X11/Xlib.h:44:0,
from /usr/include/EGL/eglplatform.h:99,
from /usr/include/EGL/egl.h:39,
from /root/develop/sfml/src/SFML/Window/EGLCheck.hpp:32,
from /root/develop/sfml/src/SFML/Window/EglContext.hpp:33,
from /root/develop/sfml/src/SFML/Window/EglContext.cpp:29:
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected identifier before numeric constant
None = 0, ///< No border / title bar (this flag and all others are mutually exclusive)
^
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected ‘}’ before numeric constant
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected unqualified-id before numeric constant
In file included from /root/develop/sfml/src/SFML/Window/Unix/CursorImpl.hpp:34:0,
from /root/develop/sfml/src/SFML/Window/CursorImpl.hpp:39,
from /root/develop/sfml/src/SFML/Window/WindowImpl.hpp:35,
from /root/develop/sfml/src/SFML/Window/EglContext.cpp:30:
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:50:1: error: expected declaration before ‘}’ token
} // namespace sf
^
src/SFML/Window/CMakeFiles/sfml-window.dir/build.make:470: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o' failed
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o] Error 1
CMakeFiles/Makefile2:170: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
root@odroid:~/develop/sfml/build#

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Wed Jan 09, 2019 9:58 am

Code: Select all

diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt
index f25ebb83..11c3a2a5 100644
--- a/src/SFML/Window/CMakeLists.txt
+++ b/src/SFML/Window/CMakeLists.txt
@@ -94,8 +94,8 @@ elseif(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD)
         ${SRCROOT}/Unix/SensorImpl.cpp
         ${SRCROOT}/Unix/SensorImpl.hpp
         ${SRCROOT}/Unix/VideoModeImpl.cpp
-        ${SRCROOT}/Unix/WindowImplX11.cpp
-        ${SRCROOT}/Unix/WindowImplX11.hpp
+#        ${SRCROOT}/Unix/WindowImplX11.cpp
+#        ${SRCROOT}/Unix/WindowImplX11.hpp
     )
     if(NOT SFML_OPENGL_ES)
         set(PLATFORM_SRC
diff --git a/src/SFML/Window/EglContext.cpp b/src/SFML/Window/EglContext.cpp
index 90b58522..1b2cf093 100644
--- a/src/SFML/Window/EglContext.cpp
+++ b/src/SFML/Window/EglContext.cpp
@@ -36,9 +36,9 @@
 #ifdef SFML_SYSTEM_ANDROID
     #include <SFML/System/Android/Activity.hpp>
 #endif
-#ifdef SFML_SYSTEM_LINUX
-    #include <X11/Xlib.h>
-#endif
+//#ifdef SFML_SYSTEM_LINUX
+//    #include <X11/Xlib.h>
+//#endif
 
 namespace
 {
@@ -289,6 +289,7 @@ void EglContext::updateSettings()
 }
 
 
+#if 0
 #ifdef SFML_SYSTEM_LINUX
 ////////////////////////////////////////////////////////////
 XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsPerPixel, const ContextSettings& settings)
@@ -336,7 +337,7 @@ XVisualInfo EglContext::selectBestVisual(::Display* XDisplay, unsigned int bitsP
     return bestVisual;
 }
 #endif
-
+#endif
 } // namespace priv
 
 } // namespace sf
diff --git a/src/SFML/Window/EglContext.hpp b/src/SFML/Window/EglContext.hpp
index a889c3ac..8fac203a 100644
--- a/src/SFML/Window/EglContext.hpp
+++ b/src/SFML/Window/EglContext.hpp
@@ -162,7 +162,7 @@ public:
     /// \return The best visual
     ///
     ////////////////////////////////////////////////////////////
-    static XVisualInfo selectBestVisual(::Display* display, unsigned int bitsPerPixel, const ContextSettings& settings);
+//    static XVisualInfo selectBestVisual(::Display* display, unsigned int bitsPerPixel, const ContextSettings& settings);
 #endif
 
 private:
This way it will compile and ignore all the X11 stuff, but I have no clue if it will actually run, as I don't use fbdev I can't test it.

You still need to compile attract mode for GLES after that as well.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Thu Jan 10, 2019 3:20 am

Hi,
Sorry, I'm finding it hard to follow what I need to change in EglContext.cpp. Can you post the entire b/src/SFML/Window/EglContext.hpp on pastebin?

Thanks,
Carl

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Thu Jan 10, 2019 7:18 am

/src/SFML/Window/EglContext.hpp is the smallest change of them all.. just outcomment the line that starts with static XVisualInfo selectBestVisual
The changes in the other files are all more complicated than this little change.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Thu Jan 10, 2019 7:38 am

argh, sorry I meant for EglContext.cpp not .hpp

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Thu Jan 10, 2019 8:02 am

Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Thu Jan 10, 2019 8:24 am

Sorry but it still doesn't seem to work:


[ 32%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/EGLCheck.cpp.o
[ 33%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o
In file included from /usr/include/X11/Xlib.h:44:0,
from /usr/include/EGL/eglplatform.h:99,
from /usr/include/EGL/egl.h:39,
from /root/develop/sfml/src/SFML/Window/EGLCheck.hpp:32,
from /root/develop/sfml/src/SFML/Window/EglContext.hpp:33,
from /root/develop/sfml/src/SFML/Window/EglContext.cpp:29:
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected identifier before numeric constant
None = 0, ///< No border / title bar (this flag and all others are mutually
^
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected ‘}’ before numeric constant
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:40:9: error: expected unqualified-id before numeric constant
In file included from /root/develop/sfml/src/SFML/Window/Unix/CursorImpl.hpp:34:0,
from /root/develop/sfml/src/SFML/Window/CursorImpl.hpp:39,
from /root/develop/sfml/src/SFML/Window/WindowImpl.hpp:35,
from /root/develop/sfml/src/SFML/Window/EglContext.cpp:30:
/root/develop/sfml/include/SFML/Window/WindowStyle.hpp:50:1: error: expected declaration before ‘}’ token
} // namespace sf
^
src/SFML/Window/CMakeFiles/sfml-window.dir/build.make:470: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o' failed
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o] Error 1
CMakeFiles/Makefile2:170: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
root@odroid:~/develop/sfml/build#

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Thu Jan 10, 2019 8:30 am

calle81 wrote:
Thu Jan 10, 2019 8:24 am
Sorry but it still doesn't seem to work:


[ 32%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/EGLCheck.cpp.o
[ 33%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/EglContext.cpp.o
In file included from /usr/include/X11/Xlib.h:44:0,
You're obviously doing something wrong.
X11/Xlib.h was removed from the code but for you it's still included, so it seems you have not made all the changes.
As explained in the commit.
You can simply copy my entire code tag and make a patch out of it to patch your files, rather than trying to fix it by hand.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Fri Jan 11, 2019 2:58 am

I have not missed anything. I went over it all again and I get the same message

CMakeLists.txt
https://pastebin.com/WM3cc66B

EglContext.hpp
https://pastebin.com/wxU6nXeG

EglContext.cpp
https://pastebin.com/kfvVz4TA

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Fri Jan 11, 2019 3:05 am

Maybe your EGL headers are bogus and try to import X11 can you post /use/include/EGL/egl.h and /use/include/EGL/eglplatform.h
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Fri Jan 11, 2019 3:15 am


User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Fri Jan 11, 2019 4:01 am

yep, the eglplatform.h is not the correct one for fbdev platforms, and not for Mali GPUs.
here's an excerpt from your eglplatform.h

Code: Select all

#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
 
typedef int   EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;
 
#elif defined(__ANDROID__) || defined(ANDROID)
 
#include <android/native_window.h>
 
struct egl_native_pixmap_t;
 
typedef struct ANativeWindow*           EGLNativeWindowType;
typedef struct egl_native_pixmap_t*     EGLNativePixmapType;
typedef void*                           EGLNativeDisplayType;
 
#elif defined(__unix__)
 
/* X11 (tentative)  */
#include <X11/Xlib.h>
#include <X11/Xutil.h>
 
typedef Display *EGLNativeDisplayType;
typedef Pixmap   EGLNativePixmapType;
typedef Window   EGLNativeWindowType;
 
#else
#error "Platform not recognized"
#endif
and here's the section of the eglplatform.h I currently use:

Code: Select all

#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */

typedef int   EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;

#elif defined(__arm__) && defined(__gnu_linux__)  /* ARM Linux Mali */
#include <EGL/fbdev_window.h>

typedef void*         EGLNativeDisplayType;
typedef void*         EGLNativePixmapType;
typedef fbdev_window* EGLNativeWindowType;

#elif defined(__unix__)

/* X11 (tentative)  */
#include <X11/Xlib.h>
#include <X11/Xutil.h>

typedef Display *EGLNativeDisplayType;
typedef Pixmap   EGLNativePixmapType;
typedef Window   EGLNativeWindowType;

#else
#error "Platform not recognized"
#endif
Mine version checks for EGL/fbdev_window.h which is able to create a egl only window without the use of X11.
There are other versions out there as well which might work, but your's is not correct to compile fbdev applications.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Fri Jan 11, 2019 5:18 am

OK, I don't even have that file...

fatal error: EGL/fbdev_window.h: No such file or directory

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Sat Jan 12, 2019 8:16 am

I tried using these headers: https://github.com/mdrjr/c2_mali/blob/m ... platform.h
But I still get the same error. Any idea where I can find headers that might work Meveric?

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Sat Jan 12, 2019 8:48 am

calle81 wrote:
Sat Jan 12, 2019 8:16 am
I tried using these headers: https://github.com/mdrjr/c2_mali/blob/m ... platform.h
But I still get the same error. Any idea where I can find headers that might work Meveric?
ok, you DO understand, that we were talking about the difference between fbdev and X11 and that it should NOT include X11 headers, right?
So why would the "X11" headers for Mali be the one that you want to use for "fbdev" when just one folder above there is a "fbdev" folder with headers as well?

Maybe you want to try something like this: https://github.com/mdrjr/c1_mali_libs/t ... eaders/EGL
once again there are different versions of it available.. you probably have to find one that works for you.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Sat Jan 12, 2019 9:05 am

Please bear with me. I'm a complete noob when it comes to this stuff. Super grateful for your help. It actually compiled now. Used the header you linked and also downloaded the EGL/fbdev_window.h file :o

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Sat Jan 12, 2019 9:35 am

So close, but still no cigar. When I run this:
root@odroid:~/develop/attract/attract# make USE_GLES=1

it fails with the following error:

Archiving obj/libaudio.a...
Creating executable: attract
//usr/local/lib/libsfml-window.so: undefined reference to `sf::priv::WindowImplX11::WindowImplX11(sf::VideoMode, sf::String const&, unsigned long, sf::ContextSettings const&)'
//usr/local/lib/libsfml-window.so: undefined reference to `sf::priv::WindowImplX11::WindowImplX11(unsigned long)'
collect2: error: ld returned 1 exit status
Makefile:458: recipe for target 'attract' failed
make: *** [attract] Error 1
root@odroid:~/develop/attract/attract#

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Sat Jan 12, 2019 5:44 pm

yes it seems you have to alter libSFML on more places...

Code: Select all

diff --git a/src/SFML/Window/WindowImpl.cpp b/src/SFML/Window/WindowImpl.cpp
index 928493f5..8e0cd3a9 100644
--- a/src/SFML/Window/WindowImpl.cpp
+++ b/src/SFML/Window/WindowImpl.cpp
@@ -40,8 +40,8 @@
 
 #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD)
 
-    #include <SFML/Window/Unix/WindowImplX11.hpp>
-    typedef sf::priv::WindowImplX11 WindowImplType;
+//    #include <SFML/Window/Unix/WindowImplX11.hpp>
+//    typedef sf::priv::WindowImplX11 WindowImplType;
 
 #elif defined(SFML_SYSTEM_MACOS)
Not sure if that's enough.. there might come up more places.

CursorImpl.hpp and GlxContext.cpp are also candidates where it might have to be removed.

BTW there's no guarantee this will work at all.
It was made to run on X11 I'm not sure it will ever run under fbdev.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

calle81
Posts: 25
Joined: Tue Jan 08, 2019 8:00 am
languages_spoken: english
ODROIDs: 1
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by calle81 » Sat Jan 12, 2019 6:47 pm

Big thanks but now it fails here:

[ 31%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/WindowImpl.cpp.o
/root/develop/sfml/src/SFML/Window/WindowImpl.cpp: In static member function ‘static sf::priv::WindowImpl* sf::priv::WindowImpl::create(sf::VideoMode, const sf::String&, sf::Uint32, const sf::ContextSettings&)’:
/root/develop/sfml/src/SFML/Window/WindowImpl.cpp:71:16: error: expected type-specifier before ‘WindowImplType’
return new WindowImplType(mode, title, style, settings);
^
/root/develop/sfml/src/SFML/Window/WindowImpl.cpp:71:16: error: expected ‘;’ before ‘WindowImplType’
/root/develop/sfml/src/SFML/Window/WindowImpl.cpp:71:59: error: ‘WindowImplType’ was not declared in this scope
return new WindowImplType(mode, title, style, settings);
^
/root/develop/sfml/src/SFML/Window/WindowImpl.cpp: In static member function ‘static sf::priv::WindowImpl* sf::priv::WindowImpl::create(sf::WindowHandle)’:
/root/develop/sfml/src/SFML/Window/WindowImpl.cpp:78:16: error: expected type-specifier before ‘WindowImplType’
return new WindowImplType(handle);
^
/root/develop/sfml/src/SFML/Window/WindowImpl.cpp:78:16: error: expected ‘;’ before ‘WindowImplType’
/root/develop/sfml/src/SFML/Window/WindowImpl.cpp:78:37: error: ‘WindowImplType’ was not declared in this scope
return new WindowImplType(handle);
^
src/SFML/Window/CMakeFiles/sfml-window.dir/build.make:422: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/WindowImpl.cpp.o' failed
make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/WindowImpl.cpp.o] Error 1
CMakeFiles/Makefile2:170: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
root@odroid:~/develop/sfml/build# ^C
root@odroid:~/develop/sfml/build#

User avatar
meveric
Posts: 9964
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 3 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Attract-Mode Frontend - Compiling issues

Unread post by meveric » Sat Jan 12, 2019 9:31 pm

well I checked the code again, and as it is right now, it can't be compiled against fbdev. Only against X11.
Even there it requires two patches to work with the current version. So I don't think your scenario is going to work, unless you want to run Attract Mode in X11 mode
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Post Reply

Return to “OGST-XU4”

Who is online

Users browsing this forum: No registered users and 0 guests