maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9) (https://talk.maemo.org/showthread.php?t=84987)

qwazix 2012-07-05 19:17

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
Status report:

libhildon, libmatchbox2 (with a hack), gnome-menus, gnome-vfs, gnome-mime-data all built successfully, but I hit another brick wall which now seems insurmountable.

Harmattan does not support xrandr. Due to performance issues Nokia decided not to rely on xrandr for orientation changes, but they did not stay to that decision, they crippled xrandr. Trying to compile xrandr from debian or meego results in a infinite-loopish configure error

Code:

No package 'xrandr' found
which probably means "there is no such functionality built into x-server"

What do I do now?


Installing libxrandr-dev solved the problem. Don't know how the crippled xrandr will affect actual operation (no rotation?), we'll see.

Now I've got to solve the problem that h-d is trying to use pango from harmattan and not the one I compiled from fremantle (which is in /usr/local/lib instead of /usr/lib)

Also I get the following error during linking

Code:

/usr/local/lib/libclutter-eglx-0.8.so: undefined reference to `glMultMatrix'
I suspect that I have to declare somewhere that I want to use egl instead of regular opengl

misiak 2012-07-06 07:17

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
Quote:

Originally Posted by qwazix (Post 1232548)
Also I get the following error during linking

Code:

/usr/local/lib/libclutter-eglx-0.8.so: undefined reference to `glMultMatrix'
I suspect that I have to declare somewhere that I want to use egl instead of regular opengl

Hava you tried adding
Code:

--with-gles=1.1
option to ./configure or even
Code:

--with-flavour=eglnative --with-gles=1.1
? (Or similar but with 2.0 instead of 1.1 - if it's supported by this version of clutter)

qwazix 2012-07-06 18:08

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
Code:

configure: WARNING: unrecognized options: --with-flavour, --with-gles
and still can't force it to use pango from /usr/local

Code:

CFLAGS="-I/usr/local/include/" LDFLAGS="-L/usr/share/local/lib/" ./configure
but I still get

Code:

/usr/lib/libpangocairo-1.0.so: undefined reference to `pango_fc_font_create_base_metrics_for_context'


got that with

Code:

HD_LIBS="/usr/local/lib/libpangocairo-1.0.so" ./configure
now on to solve the gl problem. I think we're getting close
================================


Wishful thinking, I had compiled clutter with the wrong flags. I think I have to start over in a clean scratchbox...

getting a truckload of undefined references in clutter.

By the way, misiak, thanks very much for the insightful comments, if it wasn't for your posts I'd still be in the beginning.

Estel 2012-07-06 20:52

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
You can't imagine how I'm keeping my thumbs for that project :)

qwazix 2012-07-07 14:04

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
1 Attachment(s)
Status report:

I haven't had any progress since yesterday but I will write a report here as detailed as possible so that I can then reach out for help to all possible channels and refer to this post.

Packages built and configured successfully

atk-1.29.2
clutter 0.8 from cordia github (--with-flavor=eglx -with-gles=1.1)
glib from cordia github (latest)
gnome-menus-svn2.23.3-2maemo+0m5 from maemo.org
gnome-mime-data-2.18.0 from gnome.org
gnome-vfs-2.24.4 from meego.com
gtk latest from cordia github
libhildon from cssu gitorious (cordia package was asking for gtk3)
libhildondesktop from cssu gitorious (cordia package was asking for gtk3)
libmatchbox2 from cordia github
pango1.0_1.24.2-0maemo4+0m5 from maemo.org (harmattan pango not compatible)

Now I am stuck to compiling hildon-desktop

First I cannot force it to use fremantle pango instead of harmattan pango and if I just do ./configure i get this error

Code:

/usr/lib/libpangocairo-1.0.so: undefined reference to `pango_fc_font_create_base_metrics_for_context'
/usr/local/lib/libclutter-eglx-0.8.so: undefined reference to `glMultMatrix'

After trying with
Code:

HD_LIBS="/usr/local/lib/libpangocairo-1.0.so" ./configure
I got the glMultMatrix error only, but I cannot reproduce this behaviour

I tried recompiling clutter with
Code:

--with-flavor=eglx -with-gles=1.1
and I got undefined reference errors for about every clutter function (see attachment)

If I do a simple configure I get back to the previous two errors.

Studying the code a little has revealed that glMultMatrix is a vanilla OpenGL function and not an OpenGL ES one so I assume I should somehow tell hildon-desktop to build with OpenGL ES. I cannot find relevant configure flags like those in clutter.

I suppose the many errors I get while building with HD_LIBS set is because the linker cannot find other libs except the one I specify (pangocairo). How can I force use of a specific library and let the system use other libraries freely?

misiak 2012-07-07 18:56

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
Quote:

Originally Posted by qwazix (Post 1233060)
By the way, misiak, thanks very much for the insightful comments, if it wasn't for your posts I'd still be in the beginning.

Nice to hear that, it's always nice to know someone appreciates my help :)

Quote:

Originally Posted by qwazix (Post 1233395)
I got the glMultMatrix error only, but I cannot reproduce this behaviour

I tried recompiling clutter with
Code:

--with-flavor=eglx -with-gles=1.1
and I got undefined reference errors for about every clutter function (see attachment)

If I do a simple configure I get back to the previous two errors.

Studying the code a little has revealed that glMultMatrix is a vanilla OpenGL function and not an OpenGL ES one so I assume I should somehow tell hildon-desktop to build with OpenGL ES. I cannot find relevant configure flags like those in clutter.

Few notes on this:

1. For clutter configuration options, you can read http://developer.gnome.org/clutter/1...g-clutter.html , e.g. part "Platform specific instructions" -> "Linux", there are these two options:
Quote:

Originally Posted by http://developer.gnome.org/clutter/1.8/building-clutter.html
--with-flavour=[glx/eglx/eglnative/win32/osx/cex100] : Select the Clutter backend; default=glx.

so we need to set it to e.g. eglx unless maemo version has this already changed and
Quote:

Originally Posted by http://developer.gnome.org/clutter/1.8/building-clutter.html
--with-gles=[1.1/2.0] : Select the version of GLES to support in COGL; default is 1.1.

So you may want to set it to 2.0 (as both Fremantle and Harmattan have these libs), but remember to install -dev packages of it (and maybe of GLES 1, it won't do harm I guess).

2. As you already wrote you have problem with paths - maybe it looks for opengles in wrong places? It's not default in N900 sdk afaik (example opengl es 1.1 codes need to have include paths changed, maybe there's a problem with directories here, to?) EDIT: I'm not sure how it would work later in a chroot in Harmattan - if it's linked somehow with opengl es libraries from Fremntle and then you would try to run it on Harmattan - these libs should be at the same location and in abi-compatible versions, can we be sure this is possible? As these libs are closed source and ~2 years passed between them, it is not obvious to me. Maybe someone with both N900 and N9 can check that and in the meanwhile, please look at third option ;)

3. If you are really blocked now, maybe try compiling clutter with software rendering only (to get things going and just leave this on TODO list and go back later maybe)? See http://talk.maemo.org/showthread.php?t=83442 , "For developer" part, "step #2". You may also want to ping AapoRantalainen as he seems to know more about compiling clutter (he also had some compilation errors and had to correct one of source files), maybe he can help you with this issue.

qwazix 2012-07-08 13:07

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
Quote:

Originally Posted by misiak (Post 1233561)
Nice to hear that, it's always nice to know someone appreciates my help :)



Few notes on this:

1. For clutter configuration options, you can read http://developer.gnome.org/clutter/1...g-clutter.html , e.g. part "Platform specific instructions" -> "Linux", there are these two options: so we need to set it to e.g. eglx unless maemo version has this already changed and So you may want to set it to 2.0 (as both Fremantle and Harmattan have these libs), but remember to install -dev packages of it (and maybe of GLES 1, it won't do harm I guess).

If I configure with GLES 2.0 I get the following error very early during the build so I assumed that the code is not compatible with GLES 2.0

Code:

In file included from cogl-pvr-texture-gl.c:30:
/usr/include/GLES/gl.h:756: error: conflicting types for 'glTexImage2D'
/usr/include/GLES2/gl2.h:609: note: previous declaration of 'glTexImage2D' was here

Relevant google result: http://lists.linuxtogo.org/pipermail...ne/021223.html (which I don't understand)

With some help from the cordia-dev mailing list I downloaded the correct hildon-desktop branch but I still hit that glMultMatrix error.

Quote:

Originally Posted by misiak (Post 1233561)
2. As you already wrote you have problem with paths - maybe it looks for opengles in wrong places? It's not default in N900 sdk afaik (example opengl es 1.1 codes need to have include paths changed, maybe there's a problem with directories here, to?) EDIT: I'm not sure how it would work later in a chroot in Harmattan - if it's linked somehow with opengl es libraries from Fremntle and then you would try to run it on Harmattan - these libs should be at the same location and in abi-compatible versions, can we be sure this is possible? As these libs are closed source and ~2 years passed between them, it is not obvious to me. Maybe someone with both N900 and N9 can check that and in the meanwhile, please look at third option ;)

The idea (a bit perverted I agree) is to run hildon-desktop outside the chroot, as a window manager in xephyr, and run the applications from the chroot inside the hildon-desktop display. Eventually, more things can be done, like switching window managers natively in harmattan or, just rebuild all extras applications with the new COBS with a harmattan target and a depencency for hildon-desktop. The possibilities are endless :)

Quote:

Originally Posted by misiak (Post 1233561)
3. If you are really blocked now, maybe try compiling clutter with software rendering only (to get things going and just leave this on TODO list and go back later maybe)? See http://talk.maemo.org/showthread.php?t=83442 , "For developer" part, "step #2". You may also want to ping AapoRantalainen as he seems to know more about compiling clutter (he also had some compilation errors and had to correct one of source files), maybe he can help you with this issue.

The thing is that clutter compiles fine, it's hildon-desktop I can't build...

Kabouik 2012-07-09 20:09

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
Quote:

Originally Posted by Estel (Post 1233116)
You can't imagine how I'm keeping my thumbs for that project :)

Same here. Keep up the great work guys.

Kabouik 2012-08-10 17:27

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
Any progress with the current issues Qwazix? I hope you'll find a way to overcome them.

qwazix 2012-08-10 17:32

Re: [Development - see post #1] Fremantle in a chroot (Run N900 applications on the N9)
 
This project is currently on hold until I finish my vacation, and coding competition projects. I am still interested in it though.


All times are GMT. The time now is 04:08.

vBulletin® Version 3.8.8