Discussion:
FLTK + nano-X for newbies - question to installation/cross compiling to my arm9
Wein, Peter (ext)
2007-10-11 17:22:48 UTC
Permalink
Hello all,

I am sorry to bother with such a newbie problem, but maybe I have done
only a little wrong...

I have installed FLTK-1.1.x-r5940 on my UBUNTU Feisty Fawn 7.04. It
works perfectly good. So I can create with FLUID some window and can
create a cxx file. I also can compile and execute that file on UBUNTU.
However: If I want to cross-compile it to my arm9 (linux kernel 2.6.12)
it NEEDS the library -lXext for two or three commands, which are not in
the nxlib. I have build nxlib-0.45. If I compile it with the script
fltk-config (after configuring the path to MWIN and the compiler and my
toolchain, so that the compiler takes my crosscompiled libraries etc!) ,
I get the message from my embedded linux: no newline unexpected.

So I start to compile it "by hand".

arm-linux-gcc mywindow.cxx -o mywindow -L./X11 -lm -lXext
-I../fltk-1.1.x-r5940

but it complains about the lXext, which it cannot find, cause it is not
a part of my embedded system!

Now I have read on the list, that nxlib has been tested with fltk-1.1.4
and then it should not need the libXext. So I wanted to build that
fltk-1.1.4 but I failed. I hope that I do not need libXext anymore.
I cannot install fltk-1.1.4 or .7 on my system (but fltkl.1.1.x-r5940
does), it does not find the X-libs and includes. Following
fltk-documentation, I set my CFLAGS and LDFLAGS to the pathes where the
libs and includes reside. But nothing.

Can anybody help with his experience to get out of this situation?
Has anybody ever installed fltk-1.1.4 or .7 on a UBUNTU 7.04 Feisty Fawn
system ?

Or: Does anybody maybe have a script or tutorial on how he/she did it by
him/herself? Also with the build of nxlib (the resulting X11-Library is
only half as big as the original one), I am not sure this is correct)

Thanks in advance
Peter
Wein, Peter (ext)
2007-10-24 11:04:32 UTC
Permalink
As far as I know, I need the following:

-Nxlib0.45 cross-compiled to replace the xlib in my toolchain (as far as I know, this was done successfully, the resulting size is half a megabyte (so half of the UBUNTU xlibs)
-libfltk.a cross-compiled against my arm-toolchain. This does not work, it does not find some library functions it needed during compiling of fluid. Anybody with related experiences?

After that it should be possible to use fltk-config to compile my sources against my arm-linux-toolchain, or? So then, I make my sources with my UBUNTU-System and then cross compile it against my arm-linux with the fltk-config, right?

Did anybody recall the exact procedure of cross-compiling? Where do I have to start, what should be next? Any help is appreciated...

Thanks in advance
Regards
Peter

-----Ursprüngliche Nachricht-----
Von: Greg Haerr [mailto:greg-o/g02q+***@public.gmane.org]
Gesendet: Mittwoch, 17. Oktober 2007 04:26
An: Wein, Peter (ext); nanogui-***@public.gmane.org
Betreff: Re: [nanogui] FLTK + nano-X for newbies - question to installation/cross compiling to my arm9

My quick comment on this is that NXLIB probably needs to
produce a dummy Xext library, so that existing link commands
don't fail. We threw a few entry points from Xext into the
Xlib that NXLIB creates, but still aren't creating the actual
Xext library. I suggest modifying the Makefile to produce a
dummy library and seeing if that fixes your link problem.

Another way to debug all this is to recompile all of FLTK
and specifying all libraries to be static, including NXLIB,
which forces all symbols to be worked out at link time,
which doesn't always happen in certain cases with
dynamic linking.

Regards,

Greg




I am sorry to bother with such a newbie problem, but maybe I have done
only a little wrong...

I have installed FLTK-1.1.x-r5940 on my UBUNTU Feisty Fawn 7.04. It
works perfectly good. So I can create with FLUID some window and can
create a cxx file. I also can compile and execute that file on UBUNTU.
However: If I want to cross-compile it to my arm9 (linux kernel 2.6.12)
it NEEDS the library -lXext for two or three commands, which are not in
the nxlib. I have build nxlib-0.45. If I compile it with the script
fltk-config (after configuring the path to MWIN and the compiler and my
toolchain, so that the compiler takes my crosscompiled libraries etc!) ,
I get the message from my embedded linux: no newline unexpected.

So I start to compile it "by hand".

arm-linux-gcc mywindow.cxx -o mywindow -L./X11 -lm -lXext
-I../fltk-1.1.x-r5940

but it complains about the lXext, which it cannot find, cause it is not
a part of my embedded system!

Now I have read on the list, that nxlib has been tested with fltk-1.1.4
and then it should not need the libXext. So I wanted to build that
fltk-1.1.4 but I failed. I hope that I do not need libXext anymore.
I cannot install fltk-1.1.4 or .7 on my system (but fltkl.1.1.x-r5940
does), it does not find the X-libs and includes. Following
fltk-documentation, I set my CFLAGS and LDFLAGS to the pathes where the
libs and includes reside. But nothing.

Can anybody help with his experience to get out of this situation?
Has anybody ever installed fltk-1.1.4 or .7 on a UBUNTU 7.04 Feisty Fawn
system ?

Or: Does anybody maybe have a script or tutorial on how he/she did it by
him/herself? Also with the build of nxlib (the resulting X11-Library is
only half as big as the original one), I am not sure this is correct)

Thanks in advance
Peter
Greg Haerr
2007-10-24 15:44:20 UTC
Permalink
Post by Wein, Peter (ext)
Did anybody recall the exact procedure of cross-compiling? Where do I have
to start, what should be next? Any help is appreciated...

Actually, now that I think of it, our open source PIXIL tree
builds for ARM and x86, you might look at the Makefiles in
that tree: www.pixil.org. This builds microwindows, FLTK,
and a number of other libraries for the iPAQ.

Regards,

Greg

Greg Haerr
2007-10-17 02:25:34 UTC
Permalink
My quick comment on this is that NXLIB probably needs to
produce a dummy Xext library, so that existing link commands
don't fail. We threw a few entry points from Xext into the
Xlib that NXLIB creates, but still aren't creating the actual
Xext library. I suggest modifying the Makefile to produce a
dummy library and seeing if that fixes your link problem.

Another way to debug all this is to recompile all of FLTK
and specifying all libraries to be static, including NXLIB,
which forces all symbols to be worked out at link time,
which doesn't always happen in certain cases with
dynamic linking.

Regards,

Greg




I am sorry to bother with such a newbie problem, but maybe I have done
only a little wrong...

I have installed FLTK-1.1.x-r5940 on my UBUNTU Feisty Fawn 7.04. It
works perfectly good. So I can create with FLUID some window and can
create a cxx file. I also can compile and execute that file on UBUNTU.
However: If I want to cross-compile it to my arm9 (linux kernel 2.6.12)
it NEEDS the library -lXext for two or three commands, which are not in
the nxlib. I have build nxlib-0.45. If I compile it with the script
fltk-config (after configuring the path to MWIN and the compiler and my
toolchain, so that the compiler takes my crosscompiled libraries etc!) ,
I get the message from my embedded linux: no newline unexpected.

So I start to compile it "by hand".

arm-linux-gcc mywindow.cxx -o mywindow -L./X11 -lm -lXext
-I../fltk-1.1.x-r5940

but it complains about the lXext, which it cannot find, cause it is not
a part of my embedded system!

Now I have read on the list, that nxlib has been tested with fltk-1.1.4
and then it should not need the libXext. So I wanted to build that
fltk-1.1.4 but I failed. I hope that I do not need libXext anymore.
I cannot install fltk-1.1.4 or .7 on my system (but fltkl.1.1.x-r5940
does), it does not find the X-libs and includes. Following
fltk-documentation, I set my CFLAGS and LDFLAGS to the pathes where the
libs and includes reside. But nothing.

Can anybody help with his experience to get out of this situation?
Has anybody ever installed fltk-1.1.4 or .7 on a UBUNTU 7.04 Feisty Fawn
system ?

Or: Does anybody maybe have a script or tutorial on how he/she did it by
him/herself? Also with the build of nxlib (the resulting X11-Library is
only half as big as the original one), I am not sure this is correct)

Thanks in advance
Peter
Loading...