Skip to content
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

build on Pi4 #94

Open
Exarkuniv opened this issue Dec 10, 2021 · 9 comments
Open

build on Pi4 #94

Exarkuniv opened this issue Dec 10, 2021 · 9 comments

Comments

@Exarkuniv
Copy link

im trying to build on my Pi4 and i very lost on how to get that done.
Im running Retropie so i dont have a desktop. i have to do everthing through the command line.

i have some very basic understanding of cmake. but i cant figure out the correct options to get it to go

sorry im if i sound like a idiot im trying to learn the best i can with this stuff so i can stop asking silly question like this

@dashodanger
Copy link
Contributor

Assuming you have the right libraries needed to build the program, the following commands should get you there. You'll want to run them from the EDGE folder (assuming you didn't change the name when you cloned it):

  1. git submodule init
  2. git submodule update
  3. cmake -B build
  4. cmake --build build -j6 (I use -j6 on my Pi 4 and it performs well)

If it works, the EDGE executable should be in the build folder. I use Ubuntu Mate 20.04 on my Pi, so your mileage may vary.

@Exarkuniv
Copy link
Author

@dashodanger
thanks for that, by following what you posted i was able to start building it. i did end up getting a error a little ways into it

[ 24%] Building CXX object CMakeFiles/EDGE.dir/ddf/level.cc.o
In file included from /home/pi/EDGE/ddf/../src/system/i_defs_gl.h:33,
                 from /home/pi/EDGE/ddf/font.cc:23:
/usr/include/GL/glext.h:469:25: error: conflicting declaration ‘typedef khronos_ssize_t GLsizeiptr’
 typedef khronos_ssize_t GLsizeiptr;
                         ^~~~~~~~~~
In file included from /home/pi/EDGE/ddf/../src/system/i_defs_gl.h:29,
                 from /home/pi/EDGE/ddf/font.cc:23:
/home/pi/EDGE/ddf/../src/system/GL/gl_load.h:90:21: note: previous declaration as ‘typedef ptrdiff_t GLsizeiptr’
   typedef ptrdiff_t GLsizeiptr;
                     ^~~~~~~~~~
In file included from /home/pi/EDGE/ddf/../src/system/i_defs_gl.h:33,
                 from /home/pi/EDGE/ddf/font.cc:23:
/usr/include/GL/glext.h:470:26: error: conflicting declaration ‘typedef khronos_intptr_t GLintptr’
 typedef khronos_intptr_t GLintptr;
                          ^~~~~~~~
In file included from /home/pi/EDGE/ddf/../src/system/i_defs_gl.h:29,
                 from /home/pi/EDGE/ddf/font.cc:23:
/home/pi/EDGE/ddf/../src/system/GL/gl_load.h:89:21: note: previous declaration as ‘typedef ptrdiff_t GLintptr’
   typedef ptrdiff_t GLintptr;
                     ^~~~~~~~
In file included from /home/pi/EDGE/ddf/../src/system/i_defs_gl.h:33,
                 from /home/pi/EDGE/ddf/font.cc:23:
/usr/include/GL/glext.h:4699:25: error: conflicting declaration ‘typedef khronos_ssize_t GLsizeiptrARB’
 typedef khronos_ssize_t GLsizeiptrARB;
                         ^~~~~~~~~~~~~
In file included from /home/pi/EDGE/ddf/../src/system/i_defs_gl.h:29,
                 from /home/pi/EDGE/ddf/font.cc:23:
/home/pi/EDGE/ddf/../src/system/GL/gl_load.h:94:21: note: previous declaration as ‘typedef ptrdiff_t GLsizeiptrARB’
   typedef ptrdiff_t GLsizeiptrARB;
                     ^~~~~~~~~~~~~
In file included from /home/pi/EDGE/ddf/../src/system/i_defs_gl.h:33,
                 from /home/pi/EDGE/ddf/font.cc:23:
/usr/include/GL/glext.h:4700:26: error: conflicting declaration ‘typedef khronos_intptr_t GLintptrARB’
 typedef khronos_intptr_t GLintptrARB;
                          ^~~~~~~~~~~
In file included from /home/pi/EDGE/ddf/../src/system/i_defs_gl.h:29,
                 from /home/pi/EDGE/ddf/font.cc:23:
/home/pi/EDGE/ddf/../src/system/GL/gl_load.h:93:21: note: previous declaration as ‘typedef ptrdiff_t GLintptrARB’
   typedef ptrdiff_t GLintptrARB;
                     ^~~~~~~~~~~
[ 24%] Building CXX object CMakeFiles/EDGE.dir/ddf/line.cc.o
[ 25%] Building CXX object CMakeFiles/EDGE.dir/ddf/main.cc.o
[ 25%] Building CXX object CMakeFiles/EDGE.dir/ddf/playlist.cc.o
make[2]: *** [CMakeFiles/EDGE.dir/build.make:154: CMakeFiles/EDGE.dir/ddf/font.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:246: CMakeFiles/EDGE.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

cant tell if im missing a libraries or what from that error

@Corbachu
Copy link
Contributor

Hmm, it seems to be some cyclic dependency with GL headers somewhere. One of the things we really need to do is clean up the header include pathing for CMake…

@dashodanger do you encounter the conflicting ARB pointer when building for Pi4?

From the looks of this log, it is running into an issue with that pointer from two different GL headers. I’m not sure if GLEXT.h is also required for PI4, or if it’s simply an issue with the Extension handling for that platform via r_main . . . My Pi4 is sadly not on hand (packed away in some box currently and won’t be available until late January due to an impending move), so I can’t test the compilation..

@dashodanger
Copy link
Contributor

I have built both Classic and 2.x on my Pi 4, and haven't had this compilation error. I went ahead and built it again just to be sure. I don't know much about RetroPie, but if it is based off of Debian/Rasperry Pi OS, it could be a 32-bit operating system despite being on an ARM64 platform. I don't know if this would affect anything.

@Exarkuniv
Copy link
Author

yes they are running buster 32bit on Retropie
if there is anything you can think of you want me to find or try. im always willing to do so

@dashodanger
Copy link
Contributor

I'm flashing a spare SD with Retropie to see if I can poke at it.

@dashodanger
Copy link
Contributor

dashodanger commented Dec 13, 2021

So, I made it further into compilation, but there's a roadblock with sse2neon which I'm not sure can be resolved. So far:
-I had to comment out lines 31-34 of src/system/i_defs_gl.h, as I believe those lines are causing the GL conflicts
-I had to add an #ifdef __arm__ after line 71 of src/version.h to add a 32-bit arm entry for EDGEPLATFORM/EDGEPRINTBIT/E_TITLE

Now, sse2neon.h fails saying that it is not a supported platform. I'm not sure if the NEON instructions are available when the Pi 4 is running a 32-bit OS.

@Exarkuniv
Copy link
Author

Ahh ok. so more or less its the issue with the OS being 32bit at this moment.
I know they are working on having a build on a 64bit but there is no ETA for it.

least we have a better understanding on whats the reason.
thanks for looking into this

@dashodanger
Copy link
Contributor

It's only a guess...there could be a compiler directive or something I'm not aware of that exposes the NEON instructions properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants