[ERROR] Trying to compile AMLGX with latest version

Hey,
I am trying to compile with the following:

PROJECT=Amlogic DEVICE=AMLGX ARCH=aarch64 DISTRO=EmuELEC make image | grep error

And no matter what I do it comes up with errors. I have tried re-installing the required packages but it still comes up with the damn error. Any ideas?
ld.gold: error: cannot find -lGL <------ THIS IS THE ERROR.

[325/486] [FAIL] install vlc:target

The following log for this failure is available:
  /home/joslan/Documents/EmuELEC/build.EmuELEC-AMLGX.aarch64-4/.threads/logs/235.log

checking whether C compiler accepts -Werror=unknown-warning-option... no
checking whether C compiler accepts -Werror=invalid-command-line-argument... no
checking whether C compiler accepts -Werror=unknown-warning-option... (cached) no
checking whether C compiler accepts -Werror=invalid-command-line-argument... (cached) no
checking whether C compiler accepts -Werror-implicit-function-declaration... yes
**/home/joslan/Documents/EmuELEC/build.EmuELEC-AMLGX.aarch64-4/toolchain/lib/gcc/aarch64-libreelec-linux-gnueabi/10.3.0/../../../../aarch64-libreelec-linux-gnueabi/bin/ld.gold: error: cannot find -lGL <------ THIS IS THE ERROR.**
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glEnable'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glEnable'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glDepthMask'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glMatrixMode'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glFrustum'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glMatrixMode'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glTranslatef'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glEnable'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glColorMaterial'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glEnable'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glLightfv'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glLightfv'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glShadeModel'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glBlendFunc'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glClear'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glPushMatrix'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glRotatef'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glPushMatrix'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glTranslatef'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glEnableClientState'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glEnableClientState'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glPushMatrix'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glScalef'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glColor4f'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glVertexPointer'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glNormalPointer'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glDrawArrays'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glPopMatrix'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glTranslatef'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glDisableClientState'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glDisableClientState'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glPopMatrix'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glPopMatrix'
visualization/.libs/glspectrum.o:glspectrum.c:function Thread: error: undefined reference to 'glViewport'
collect2: error: ld returned 1 exit status
Parallel build failure - see log for details. Time of failure: Sun Jan 30 19:53:53 AEDT 2022
make: *** [Makefile:12: image] Error 1

PROJECT=Amlogic-ce DEVICE=Amlogic-ng

AMLGX is not a supported project/device in EmuELEC that comes from upstream (LibreELEC)

Whats the command for making the project for older chips?

@EmuELEC

I need to compile a release for:

  • EmuELEC-Amlogic.aarch64-x.x.x-generic.img.gz is for S905 (and variants, S905x, S905y, S905w, etc)

Uhuhuhu T-T this error was driving me insane. Please god show me the way haha.

edit:
Still stuck, I cant set the project to plain Amlogic and Generic.

$ PROJECT=Amlogic ARCH=aarch64 DISTRO=EmuELEC make image
./scripts/image mkimage

 =================================================================================
 ERROR: Specify a valid device for the Amlogic project
 =================================================================================

 Valid devices for project: Amlogic
 - AMLGX
*********** FAILED COMMAND ***********
. config/options ""
**************************************
make: *** [Makefile:12: image] Error 1

If you compile the current dev with

PROJECT=Amlogic-ce DEVICE=Amlogic-ng ARCH=aarch64 DISTRO=EmuELEC make image

you get several images and tar-files (for updating) in the directory “target”, including those you are looking for.

But also keep this in mind:

* IMPORTANT: S905 (GXBB, p201) for the moment is no longer supported. If you have one of those devices (s905 no letter after the 5) DO NOT UPDATE, stay in 4.3.
1 Like

Sorry, i was wrong. You get a generic image for Amlogic-ng, which is not what you want.

I guess you have to go back to 4.3 (with the old build system) for this.

This is no longer available for v4.4, you can still use the master branch (not for long) and the old dev4.3 branch.

Amlogic-ng is the only one available now, and it will work with the same devices, except S905 (GXBB, p201) as that one is no longer supported.

@miwasp You were correct, the image he needs is Amlogic-ng generic.

Just FYI, if building for Amlogic-ng you can just type make image the variables are set by default. But other device still need the variables (e.g OdroidGoAdvance or GameForce)

@EmuELEC
I found a bug when trying to compile 4-3 with the Amlogic project. Pugixml appends to the CXXFLAGS variable “-std=gnu++11” by default which basically breaks emuelec-emulationstation from compiling because they use “-std=c++14” to compile instead.
The solution is to change the pugixml make file too “cxxstd=any” instead so it doesn’t append to the CXXFLAGS variable and break emulationstation.
This is the fix:

If you fix this I think emulation-stations pugixml depency would have to point to a fork of it with the fix applied.

Here is a clean change:

Patch:
https://github.com/Langerz82/pugixml/commit/9e2c94b478ce1757ec957859d87b6ff5709cd158.diff

I don’t think Amlogic project is going to produce a working EmuELEC image, the only project supported is the Amlogic-ce (for Amlogic devices) so not sure this fix would be needed.

@EmuELEC
It might cause problems down the road when compiling for some people, as the same version is used. Hey can you make patches for submodules and include them in EmuELEC? I can make a proper one up if we can.

Sorry, but I don’t think this patch is needed, in case someone does need it, they can apply it locally, but I rather not just put patches for the sake of it in case it is rarely needed down the road. Its just one more patch to maintain.

Ok I understand. I don’t think many will be trying to compile 4.3 with the latest ES anyway haha, and the info is here if needed.

I’m trying to update the v4.4-TEST-02152022 on 905w4 2gb ram tv box p281 via .tar but It displays the following error


Note: I have tested the december Release v4.4-TEST-12242021 · EmuELEC/EmuELEC-tests · GitHub with compiled image EmuELEC-Amlogic-ng.aarch64-4.4-TEST-12242021-Generic.img.gz and gxl_p281_2g.dtb and works ok

You can’t update “Amlogic” to “Amlogic-ng”

So, It’s the S905w definitely not supported in this test?