AW: [Dillo-dev] Crosscompiling Dillo2 for uClinux on Blackfin

Heiser Michael heisermi at hs-albsig.de
Fri Aug 14 15:38:35 CEST 2009


Hey guys,

I got it! Dillo2 is running on our Blackfin device and I'll send you a little manual as attachment for implementing it to uClinux!

Regards Michael!!!

-----Ursprüngliche Nachricht-----
Von: dillo-dev-bounces at dillo.org [mailto:dillo-dev-bounces at dillo.org] Im Auftrag von Heiser Michael
Gesendet: Freitag, 14. August 2009 13:18
An: dillo-devel-list (dillo-dev at dillo.org)
Betreff: AW: [Dillo-dev] Crosscompiling Dillo2 for uClinux on Blackfin

LibXi is part of nxlib and nxlib maps XInputs to nano-X lib. So I had to replace libXi. By the way I handled the compiling for Blackfin!! I will give you soon an advice how to make it :) It's now only on testing dillo on our device.....

That seems to be tricky

-----Ursprüngliche Nachricht-----
Von: dillo-dev-bounces at dillo.org [mailto:dillo-dev-bounces at dillo.org] Im Auftrag von Michal Nowak
Gesendet: Freitag, 14. August 2009 12:36
An: dillo-dev at dillo.org
Betreff: Re: [Dillo-dev] Crosscompiling Dillo2 for uClinux on Blackfin

On Fri, Aug 14, 2009 at 9:00 AM, Heiser Michael<heisermi at hs-albsig.de> wrote:
> Hey guys,
>  I think I'm near on getting dillo2 working on blackfin uClinux. My concurrent problem is, that there are some Errors linking the project. Undefined reference .....
> I'll give you my compile log:
>
> make[3]: Für das Ziel »all« ist nichts zu tun.
> make[3]: Leaving directory `/home/mheiser/dillo-2.1.1/src/IO'
> make[3]: Entering directory `/home/mheiser/dillo-2.1.1/src'
> bfin-linux-uclibc-g++ -I.. 
> bfin-linux-uclibc-g++ -I/home/mheiser/uClinux/uClinux/uclinux-dist/sta
> bfin-linux-uclibc-g++ ging/usr/include/libpng12 
> bfin-linux-uclibc-g++ -I/home/mheiser/fltk-2.0.x-r6841 
> bfin-linux-uclibc-g++ -I/home/mheiser/uClinux/uclinux-dist/staging/usr
> bfin-linux-uclibc-g++ /include/freetype2 
> bfin-linux-uclibc-g++ -I/home/mheiser/uClinux/uclinux-dist/user/microw
> bfin-linux-uclibc-g++ in/nxlib/nxlib-0.45/X11/include 
> bfin-linux-uclibc-g++ -Wno-non-virtual-dtor -O2 -pipe -isystem 
> bfin-linux-uclibc-g++ /home/mheiser/uClinux/uclinux-dist/staging/usr/i
> bfin-linux-uclibc-g++ nclude -Wall -W -Wno-unused-parameter -fno-rtti 
> bfin-linux-uclibc-g++ -fno-exceptions  
> bfin-linux-uclibc-g++ -L/home/mheiser/uClinux/uclinux-dist/staging/usr
> bfin-linux-uclibc-g++ /lib -o dillo  dillo.o paths.o ui.o uicmd.o bw.o 
> bfin-linux-uclibc-g++ cookies.o auth.o colors.o misc.o history.o 
> bfin-linux-uclibc-g++ prefs.o prefsparser.o keys.o url.o bitvec.o 
> bfin-linux-uclibc-g++ klist.o chain.o utf8.o timeout.o dialog.o web.o 
> bfin-linux-uclibc-g++ nav.o cache.o decode.o dicache.o capi.o css.o 
> bfin-linux-uclibc-g++ cssparser.o styleengine.o plain.o html.o form.o 
> bfin-linux-uclibc-g++ table.o bookmark.o dns.o gif.o jpeg.o png.o 
> bfin-linux-uclibc-g++ imgbuf.o image.o menu.o dpiapi.o findbar.o 
> bfin-linux-uclibc-g++ xembed.o ../dlib/libDlib.a ../dpip/libDpip.a 
> bfin-linux-uclibc-g++ IO/libDiof.a ../dw/libDw-widgets.a 
> bfin-linux-uclibc-g++ ../dw/libDw-fltk.a ../dw/libDw-core.a 
> bfin-linux-uclibc-g++ ../lout/liblout.a -ljpeg -lpng12 
> bfin-linux-uclibc-g++ -L/home/mheiser/fltk-2.0.x-r6841/lib 
> bfin-linux-uclibc-g++ -Wl,-rpath,/home/mheiser/bfin-fltk2/lib 
> bfin-linux-uclibc-g++ -lfltk2_images -lpng -lfltk2_images -ljpeg -lz 
> bfin-linux-uclibc-g++ -lfltk2 
> bfin-linux-uclibc-g++ -L/home/mheiser/uClinux/uclinux-dist/user/microw
> bfin-linux-uclibc-g++ in/nxlib/nxlib-0.45 
> bfin-linux-uclibc-g++ -L/home/mheiser/uClinux/uclinux-dist/user/microw
> bfin-linux-uclibc-g++ in/src/lib 
> bfin-linux-uclibc-g++ -L/home/mheiser/uClinux/uclinux-dist/staging/usr
> bfin-linux-uclibc-g++ /lib -lX11 -lpthread -lm -lnano-X -lsupc++ -lz 
> bfin-linux-uclibc-g++ -liconv
> /home/mheiser/fltk-2.0.x-r6841/lib/libfltk2.so: undefined reference to `_Xutf8LookupString'
> /home/mheiser/fltk-2.0.x-r6841/lib/libfltk2.so: undefined reference to `_XFreeDeviceList'
> /home/mheiser/fltk-2.0.x-r6841/lib/libfltk2.so: undefined reference to `_wcstombs'
> /home/mheiser/fltk-2.0.x-r6841/lib/libfltk2.so: undefined reference to `_mbstowcs'
> /home/mheiser/fltk-2.0.x-r6841/lib/libfltk2.so: undefined reference to `_XOpenDevice'
> /home/mheiser/fltk-2.0.x-r6841/lib/libfltk2.so: undefined reference to `_XGetExtensionVersion'
> /home/mheiser/fltk-2.0.x-r6841/lib/libfltk2.so: undefined reference to `_XListInputDevices'
> /home/mheiser/fltk-2.0.x-r6841/lib/libfltk2.so: undefined reference to `_XSelectExtensionEvent'

Aren't you missing libXi-devel?

Regards,
Michal

> collect2: ld gab 1 als Ende-Status zurück
> make[3]: *** [dillo] Fehler 1
> make[3]: Leaving directory `/home/mheiser/dillo-2.1.1/src'
> make[2]: *** [all-recursive] Fehler 1
> make[2]: Leaving directory `/home/mheiser/dillo-2.1.1/src'
> make[1]: *** [all-recursive] Fehler 1
> make[1]: Leaving directory `/home/mheiser/dillo-2.1.1'
> make: *** [all] Fehler 2
>
> Can you give me an advice? I don't know exactly where I should begin searching for advice....
>
> Regards
>
> Michael
>
> -----Ursprüngliche Nachricht-----
> Von: corvid [mailto:corvid at lavabit.com]
> Gesendet: Donnerstag, 13. August 2009 02:10
> An: Heiser Michael
> Betreff: Re: [Dillo-dev] Crosscompiling Dillo2 for uClinux on Blackfin
>
> If you get it working from that document mentioned on the uclinux 
> forum, let us know so that I can add to Compatibility.html :)
>
>
>
> Von AVG überprüft - www.avg.de
> Version: 8.5.386 / Virendatenbank: 270.13.53/2299 - Ausgabedatum: 
> 08/12/09 18:12:00
>
> _______________________________________________
> Dillo-dev mailing list
> Dillo-dev at dillo.org
> http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
>

_______________________________________________
Dillo-dev mailing list
Dillo-dev at dillo.org
http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev

Eingehende eMail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 8.5.392 / Virendatenbank: 270.13.55/2301 - Ausgabedatum: 08/13/09 18:16:00 

Eingehende eMail ist virenfrei.
Von AVG überprüft - www.avg.de
Version: 8.5.392 / Virendatenbank: 270.13.55/2301 - Ausgabedatum: 08/13/09 18:16:00 
-------------- next part --------------
Manual for implementing dillo2 with fltk2 library in uClinux
============================================================

you need the sources for dillo2.1.1 (http://www.dillo.org) and the latest version of fltk2 (http://www.fltk.org) and a working uClinux development platform (http://blackfin.uclinux.org), cause you need libraries of the distro

First step:
===========
Compiling uClinux with following libs activated by xconfig: libiconv, libpng12, libz, libjpeg6b, nxlib und nano-X/microwindows

Before you compile uClinux you have to change stub.c in /path/to/microwin/nxlib/nxlib-0.45. Add following code to it:

int Xutf8LookupString(){ printf("XutfLookupString called\n"); return 0; }
int XFreeDeviceList(){ printf("XFreeDeviceList called\n"); return 0; }
int XOpenDevice(){ printf("XOpenDevice called\n"); return 0; }
int XGetExtensionVersion(){ printf("XGetExtensionVersion called\n"); return 0; }
int XListInputDevices(){ printf("XListInputDevices called\n"); return 0; }
int XSelectExtensionEvent(){ printf("XSelectExtensionEvent called\n"); return 0; }

This Add prevents flkt2 from crashing at linking the lib!

Second step:
============
Compiling fltk2

cd path/to/fltk2

type following into youre terminal
CFLAGS='-O2 -pipe -isystem /path/to/staging/usr/include' CXXFLAGS='-O2 -pipe -isystem /path/to/staging/usr/include -I/path/to/microwin/nxlib/nxlib-0.45/X11/include' LDFLAGS='-L/path/to/staging/usr/lib -L/path/to/microwin/nxlib/nxlib-0.45/X11/include -L/path/to/microwin/src/lib' CXX=bfin-linux-uclibc-g++  CC=bfin-linux-uclibc-gcc AR=bfin-linux-uclibc-ar ./configure --host=bfin-linux-uclibc --target=bfin-linux-uclibc --prefix=/path/to/installDIR --enable-shared --with-x --disable-gl --disable-cygwin --x-includes=/path/to/microwin/nxlib/nxlib-0.45/X11/include --x-libraries=/path/to/microwin/nxlib/nxlib-0.45/X11/include --cache-file=/dev/null

When configure has ended you have to check all necessary options and Compilerflags in makeinclude. Espacially you have to change following options -lXi and -lxext to -lX11 and -lnano-X

then you have to change src/utf.c. Change all wchar_t * to char * and comment if-else statements including the functions wcstombs() and mbstowcs().

make; make install

Third step:
===========
Compiling Dillo2

cd path/to/dillo

first you have to patch configure.in of dillo
--- configure.in.orig	2009-07-01 19:55:34.000000000 +0200
+++ configure.in	2009-08-12 12:10:44.000000000 +0200

@@ -145,12 +145,18 @@
 dnl ----------------------
 dnl
 dnl For debugging and to be user friendly
+
+dnl Check if the user hasn't set the variable $FLTK2_CONFIG
+  if test -z "$FLTK2_CONFIG"; then
+    PNG_CONFIG=`which fltk2-config`
+  fi
+
 AC_MSG_CHECKING([FLTK2])
 if sh -c "fltk2-config --version" >/dev/null 2>&1
 then AC_MSG_RESULT(yes)
-     LIBFLTK_CXXFLAGS=`fltk2-config --cxxflags`
-     LIBFLTK_CFLAGS=`fltk2-config --cflags`
-     LIBFLTK_LIBS=`fltk2-config --use-images --ldflags`
+     LIBFLTK_CXXFLAGS=`$FLTK2_CONFIG --cxxflags`
+     LIBFLTK_CFLAGS=`$FLTK2_CONFIG --cflags`
+     LIBFLTK_LIBS=`$FLTK2_CONFIG --use-images --ldflags`
 else AC_MSG_RESULT(no)
      AC_ERROR(FLTK2 must be installed!)
 fi

type following into your terminal
FLTK2_CONFIG=path/to/fltk2-config CFLAGS='-O2 -pipe -isystem /path/to/staging/usr/include' CXXFLAGS='-O2 -pipe -isystem /path/to/staging/usr/include -I/path/to/microwin/nxlib/nxlib-0.45/X11/include' LDFLAGS='-L/path/to/staging/usr/lib -L/path/to/microwin/nxlib/nxlib-0.45/X11/include -L/path/to/microwin/src/lib' CC=bfin-linux-uclibc-gcc CXX=bfin-linux-uclibc-g++ AR=bfin-linux-uclibc-ar ./configure --host=bfin-linux-uclibc --target=bfin-linux-uclibc --cache-file=/dev/null

when configure has ended you have to check ALL makefiles for -p compiler-flags and get rid of it! Else it would crash at linking the app!

Then you have to check one more time ALL makefiles for correct include and lib paths! If necessary change the values by hand.

make

Fourth step:
============
Running the browser

the binary of dillo can be found in dillo2.1.1/src/

The necessary libraries have to be persistent and correctly linked on your target system: libX11.so.6, libfltk2.so, libfltk2_images.so, libibconv.so.2 and libpng12.so

nano-X has to be installed

copy dillorc to /usr/local/etc/dillo/dillorc on your target

dillorc is the file where you make all settings for dillo

Have Fun!!!


More information about the Dillo-dev mailing list