Gmenu2x Svn Compilation Problem


puxbunny

Still Fresh
Joined
May 9, 2008
Messages
7
I just tried to compile last SVN version (115) of Gmenu2x (because the prebuilt 0.9 doesn't give the battery state with my F200) but it has not been able to go through. I stopped to:
CODE
~/gmenu2x/build$ make
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/gmenu2x.o -c ../src/gmenu2x.cpp
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/surface.o -c ../src/surface.cpp
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/surfacecollection.o -c ../src/surfacecollection.cpp

(...)

/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/button.o -c ../src/button.cpp
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/iconbutton.o -c ../src/iconbutton.cpp
make: *** Pas de règle pour fabriquer la cible « ../objs/gp2x/listview.o », nécessaire pour « static ». Arrêt.



make: *** No rules to build target « ../objs/gp2x/listview.o », necessary to « static ». Stop.

And then I don't know wha't to do. Seems like something missing in the SVN.

Any idea ?
 
puxbunny said:
I just tried to compile last SVN version (115) of Gmenu2x (because the prebuilt 0.9 doesn't give the battery state with my F200) but it has not been able to go through. I stopped to:
CODE
~/gmenu2x/build$ make
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/gmenu2x.o -c ../src/gmenu2x.cpp
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/surface.o -c ../src/surface.cpp
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/surfacecollection.o -c ../src/surfacecollection.cpp

(...)

/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/button.o -c ../src/button.cpp
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/iconbutton.o -c ../src/iconbutton.cpp
make: *** Pas de règle pour fabriquer la cible « ../objs/gp2x/listview.o », nécessaire pour « static ». Arrêt.
make: *** No rules to build target « ../objs/gp2x/listview.o », necessary to « static ». Stop.

And then I don't know wha't to do. Seems like something missing in the SVN.

Any idea ?


Your Makefile has a dependency with no instructions on how to resolve it. See a listview.c anywhere? Remove the reference to listview.o and see if it will link without it.
 
Last edited by a moderator:
I removed (commented) listview.o from the objs list in the makefile which gives me:
CODE
CHAINPREFIX=$(GP2XDEV)
#CROSS_COMPILE=$(CHAINPREFIX)/bin/arm-open2x-linux-
CROSS_COMPILE=/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-

CC= $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
STRIP = $(CROSS_COMPILE)strip

CFLAGS = -I"$(CHAINPREFIX)/include" `$(CHAINPREFIX)/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops
CXXFLAGS = $(CFLAGS)
LDFLAGS = -L$(CHAINPREFIX)/lib `$(CHAINPREFIX)/bin/sdl-config --libs` -lfreetype -lSDL_image -lSDL_gfx -ljpeg -lpng12 -lSDL -lz -ldl

TARGET = gmenu2x
OBJS = ../objs/gp2x/gmenu2x.o ../objs/gp2x/surface.o ../objs/gp2x/surfacecollection.o ../objs/gp2x/link.o ../objs/gp2x/linkapp.o ../objs/gp2x/linkaction.o ../objs/gp2x/asfont.o ../objs/gp2x/sfontplus.o ../objs/gp2x/joystick.o ../objs/gp2x/touchscreen.o ../objs/gp2x/menu.o ../objs/gp2x/utilities.o ../objs/gp2x/dirdialog.o ../objs/gp2x/filedialog.o ../objs/gp2x/imagedialog.o ../objs/gp2x/inputdialog.o ../objs/gp2x/settingsdialog.o ../objs/gp2x/textdialog.o ../objs/gp2x/textmanualdialog.o ../objs/gp2x/wallpaperdialog.o ../objs/gp2x/menusetting.o ../objs/gp2x/menusettingint.o ../objs/gp2x/menusettingbool.o ../objs/gp2x/menusettingrgba.o ../objs/gp2x/menusettingstring.o ../objs/gp2x/menusettingmultistring.o ../objs/gp2x/menusettingfile.o ../objs/gp2x/menusettingimage.o ../objs/gp2x/menusettingdir.o ../objs/gp2x/selector.o ../objs/gp2x/filelister.o ../objs/gp2x/messagebox.o ../objs/gp2x/translator.o ../objs/gp2x/button.o ../objs/gp2x/iconbutton.o

../objs/gp2x/%.o: ../src/%.cpp
$(CXX) $(CFLAGS) -o $@ -c $<

../objs/gp2x/%.o: ../src/%.c
$(CC) $(CFLAGS) -o $@ -c $<

all: dir static

dir:
@if [ ! -d ../objs/gp2x ]; then mkdir -p ../objs/gp2x; fi

static: $(OBJS)
@echo "Linking $(TARGET)..."
$(CXX) -o $(TARGET) $(OBJS) -static $(LDFLAGS)
$(STRIP) $(TARGET)

shared: $(OBJS)
@echo "Linking $(TARGET)..."
$(CXX) -o $(TARGET) $(OBJS) $(LDFLAGS)
$(STRIP) $(TARGET)

clean:
-rm -f ../objs/gp2x/*.o $(TARGET)


But it returns me:
CODE
/gmenu2x/build$ make
(.......)
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/translator.o -c ../src/translator.cpp
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/button.o -c ../src/button.cpp
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -I"/usr/include" `/usr/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops -o ../objs/gp2x/iconbutton.o -c ../src/iconbutton.cpp
Linking gmenu2x...
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/arm-open2x-linux-g++ -o gmenu2x ../objs/gp2x/gmenu2x.o ../objs/gp2x/surface.o ../objs/gp2x/surfacecollection.o ../objs/gp2x/link.o ../objs/gp2x/linkapp.o ../objs/gp2x/linkaction.o ../objs/gp2x/asfont.o ../objs/gp2x/sfontplus.o ../objs/gp2x/joystick.o ../objs/gp2x/touchscreen.o ../objs/gp2x/menu.o ../objs/gp2x/utilities.o ../objs/gp2x/dirdialog.o ../objs/gp2x/filedialog.o ../objs/gp2x/imagedialog.o ../objs/gp2x/inputdialog.o ../objs/gp2x/settingsdialog.o ../objs/gp2x/textdialog.o ../objs/gp2x/textmanualdialog.o ../objs/gp2x/wallpaperdialog.o ../objs/gp2x/menusetting.o ../objs/gp2x/menusettingint.o ../objs/gp2x/menusettingbool.o ../objs/gp2x/menusettingrgba.o ../objs/gp2x/menusettingstring.o ../objs/gp2x/menusettingmultistring.o ../objs/gp2x/menusettingfile.o ../objs/gp2x/menusettingimage.o ../objs/gp2x/menusettingdir.o ../objs/gp2x/selector.o ../objs/gp2x/filelister.o ../objs/gp2x/messagebox.o ../objs/gp2x/translator.o ../objs/gp2x/button.o ../objs/gp2x/iconbutton.o -static -L/usr/lib `/usr/bin/sdl-config --libs` -lfreetype -lSDL_image -lSDL_gfx -ljpeg -lpng12 -lSDL -lz -ldl
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/../lib/gcc/arm-open2x-linux/3.4.4/../../../../arm-open2x-linux/bin/ld: skipping incompatible /usr/lib/libSDL.a when searching for -lSDL
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/../lib/gcc/arm-open2x-linux/3.4.4/../../../../arm-open2x-linux/bin/ld: skipping incompatible /usr/lib/libSDL.a when searching for -lSDL
/opt/open2x/gcc-3.4.4-glibc-2.3.6/bin/../lib/gcc/arm-open2x-linux/3.4.4/../../../../arm-open2x-linux/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
make: *** [static] Erreur 1



Nobody tried to compile this great menu recently from the SVN ? The actual revision is two months old :/
 
The error you're getting now looks like you don't have SDL setup for your toolchain. It's trying to pull in you PC version. Now for the really bad news...I've attempted this also since subversion has preliminary touchscreen support. Yes, you have to remove a couple of things from the Makefile...I'm not sure if the file have been removed and are no longer needed or never committed... But the code doesn't seem to actually use them anywhere...anyway, I've got it to compile, but it never ran stably for me. For one, there are some additional resources being used that aren't present in subversion, that cause an immediate crash. Even after sorting that, I had stability issues. It would lockup on me coming out of the config screen. Anyway, I don't think anything recent in subversion is stable right now...
 
Nevermind I'll keep using gmenu2x in its actual (0.9) version because it's really really more efficient than the original frontend.
The only thing that is annoying me is the battery status, but it seems I've got nothing more to do waiting for Rio to achieve this version.

PS: let me know if my English doesn"t make any sense :p
 
Strange, I've been using the SVN GMenu2x for a while and have had no problems. I'll have to update my copy of the tree and see if anything has changed since I last built it.
 
Orkie: If you manage to compile the last SVN version, would you please post it here (if it's possible) or mail it to me at quentin_georges at aliceadsl dot fr. And if you could just explain me how did you do ;) It would be nice
 
Check out from SVN
CODE
svn co https://gmenu2x.svn.sourceforge.net/svnroot/gmenu2x gmenu2x


Edit Makefile for Open2x toolchain
CODE

CHAINPREFIX=/opt/open2x/gcc-4.1.1-glibc-2.3.6/
CROSS_COMPILE=$(CHAINPREFIX)/bin/arm-open2x-linux-

CC= $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
STRIP = $(CROSS_COMPILE)strip

CFLAGS = -I"$(CHAINPREFIX)/include" `$(CHAINPREFIX)/bin/sdl-config --cflags` -DTARGET_GP2X -O3 -msoft-float -fomit-frame-pointer -ffast-math -funroll-loops
CXXFLAGS = $(CFLAGS)
LDFLAGS = -L$(CHAINPREFIX)/lib `$(CHAINPREFIX)/bin/sdl-config --libs` -lfreetype -lSDL_image -lSDL_gfx -ljpeg -lpng12 -lSDL -lz -ldl

TARGET = gmenu2x
OBJS = ../objs/gp2x/gmenu2x.o ../objs/gp2x/surface.o ../objs/gp2x/surfacecollection.o ../objs/gp2x/link.o ../objs/gp2x/linkapp.o ../objs/gp2x/linkaction.o ../objs/gp2x/asfont.o ../objs/gp2x/sfontplus.o ../objs/gp2x/joystick.o ../objs/gp2x/touchscreen.o ../objs/gp2x/menu.o ../objs/gp2x/utilities.o ../objs/gp2x/dirdialog.o ../objs/gp2x/filedialog.o ../objs/gp2x/imagedialog.o ../objs/gp2x/inputdialog.o ../objs/gp2x/settingsdialog.o ../objs/gp2x/textdialog.o ../objs/gp2x/textmanualdialog.o ../objs/gp2x/wallpaperdialog.o ../objs/gp2x/menusetting.o ../objs/gp2x/menusettingint.o ../objs/gp2x/menusettingbool.o ../objs/gp2x/menusettingrgba.o ../objs/gp2x/menusettingstring.o ../objs/gp2x/menusettingmultistring.o ../objs/gp2x/menusettingfile.o ../objs/gp2x/menusettingimage.o ../objs/gp2x/menusettingdir.o ../objs/gp2x/selector.o ../objs/gp2x/filelister.o ../objs/gp2x/messagebox.o ../objs/gp2x/translator.o ../objs/gp2x/button.o ../objs/gp2x/iconbutton.o ../objs/gp2x/listview.o ../objs/gp2x/listviewitem.o

../objs/gp2x/%.o: ../src/%.cpp
$(CXX) $(CFLAGS) -o $@ -c $<

../objs/gp2x/%.o: ../src/%.c
$(CC) $(CFLAGS) -o $@ -c $<

all: dir static

dir:
@if [ ! -d ../objs/gp2x ]; then mkdir -p ../objs/gp2x; fi

static: $(OBJS)
@echo "Linking $(TARGET)..."
$(CXX) -o $(TARGET) $(OBJS) -static $(LDFLAGS)
$(STRIP) $(TARGET)

shared: $(OBJS)
@echo "Linking $(TARGET)..."
$(CXX) -o $(TARGET) $(OBJS) $(LDFLAGS)
$(STRIP) $(TARGET)

clean:
-rm -f ../objs/gp2x/*.o $(TARGET)



Compile
CODE

cd build
make



Copy build/gmenu2x over an existing installation. Done!
 
It keep saying me:
CODE
/gmenu2x/build$ make
Linking gmenu2x...
/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/arm-open2x-linux-g++ -o gmenu2x ../objs/gp2x/gmenu2x.o ../objs/gp2x/surface.o ../objs/gp2x/surfacecollection.o ../objs/gp2x/link.o ../objs/gp2x/linkapp.o ../objs/gp2x/linkaction.o ../objs/gp2x/asfont.o ../objs/gp2x/sfontplus.o ../objs/gp2x/joystick.o ../objs/gp2x/touchscreen.o ../objs/gp2x/menu.o ../objs/gp2x/utilities.o ../objs/gp2x/dirdialog.o ../objs/gp2x/filedialog.o ../objs/gp2x/imagedialog.o ../objs/gp2x/inputdialog.o ../objs/gp2x/settingsdialog.o ../objs/gp2x/textdialog.o ../objs/gp2x/textmanualdialog.o ../objs/gp2x/wallpaperdialog.o ../objs/gp2x/menusetting.o ../objs/gp2x/menusettingint.o ../objs/gp2x/menusettingbool.o ../objs/gp2x/menusettingrgba.o ../objs/gp2x/menusettingstring.o ../objs/gp2x/menusettingmultistring.o ../objs/gp2x/menusettingfile.o ../objs/gp2x/menusettingimage.o ../objs/gp2x/menusettingdir.o ../objs/gp2x/selector.o ../objs/gp2x/filelister.o ../objs/gp2x/messagebox.o ../objs/gp2x/translator.o ../objs/gp2x/button.o ../objs/gp2x/iconbutton.o ../objs/gp2x/listview.o ../objs/gp2x/listviewitem.o -static -L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib `/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config --libs` -lfreetype -lSDL_image -lSDL_gfx -ljpeg -lpng12 -lSDL -lz -ldl
/bin/sh: /opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config: not found
/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/../lib/gcc/arm-open2x-linux/4.1.1/../../../../arm-open2x-linux/bin/ld: cannot find -lfreetype
collect2: ld returned 1 exit status
make: *** [static] Erreur 1



And there's no sdl-config in my /opt/open2x/gcc-4.1.1-glibc-2.3.6/bin :/
Revision number 116
 
Ok it now compile. In fact, I was missing the prebuilt librairies from open2x, I had only the Toolchain.

But it does not work on the GP2X :/


Allright, it now works but I had to copy it over my previous installation of Gmenu2x and to overwrite new files. It seems strange to me. But it works.
 
puxbunny said:
Ok it now compile. In fact, I was missing the prebuilt librairies from open2x, I had only the Toolchain.

But it does not work on the GP2X :/


Allright, it now works but I had to copy it over my previous installation of Gmenu2x and to overwrite new files. It seems strange to me. But it works.
And is it stable for you on an f200 thusfar? Maybe I need to give it another try...I don't remember if I ever copied it over an old install or not...

Anyway, glad you got it working. Sorry if I steered you wrong before...
 
Last edited by a moderator:
Yeah it seems stable. I've been able to launch 2xquake, pocketsnes, enefi, going into normal frontend settings from gmenu2x and coming back to gmenu2x without any problem (I have to do that because the USB File Storage function of gmenu2x doesn't seem to work).
But touchscreen doesn't seem to work (or at least I've not been able to make it work) and gmenu2x's explorer stand on a black screen but let me return to gmenu2x by clicking start (home).

So it doesn't seem to bring a lot of (functionnal) improvement but now the battery status reports good information ;)

PS: this is on a F200. And as I said in my preview post I had to copy it over an existing installation (grabbed from archive.gp2x.de).
 
puxbunny said:
Yeah it seems stable. I've been able to launch 2xquake, pocketsnes, enefi, going into normal frontend settings from gmenu2x and coming back to gmenu2x without any problem (I have to do that because the USB File Storage function of gmenu2x doesn't seem to work).
But touchscreen doesn't seem to work (or at least I've not been able to make it work) and gmenu2x's explorer stand on a black screen but let me return to gmenu2x by clicking start (home).

So it doesn't seem to bring a lot of (functionnal) improvement but now the battery status reports good information ;)

PS: this is on a F200. And as I said in my preview post I had to copy it over an existing installation (grabbed from archive.gp2x.de).
Just FYI, you'll have to increase the "Clock for Gmenu2x" to >160 or so in the Settings screen for the touchscreen to register touches.

I'll have to give it another go at some point...
 
Last edited by a moderator:
Back
Top