Re: Cairo cross compile
On Sun, Sep 12, 2010 at 4:33 AM, Giriprasad Deviprasad wrote: > export > LD_LIBRARY_PATH=/opt/asdlab/fontconfig/lib/:opt/asdlab/freetype/lib/:/opt/asdlab/atk/lib/:/opt/asdlab/glib/lib/:/opt/asdlab/pixman/lib/:/opt/asdlab/libxml2/lib/ > > Giri > > > How are you trying to compile Cairo? It looks like fontconfig and freetype > are both in a /opt/ directory, did you add these to your $LD_LIBRARY_PATH or > are you passing in the directories with the -L option to the gcc compiler? > > Danny G > > > Hmm... are you using pkg-config? What are the outputs of pkg-config --libs freetype2 pkg-config --libs fontconfig This is the program that the configure script uses to find out if the installed needed programs are the correct versions and where exactly they reside. This can be overridden by passing arguments into the configure script, but pkg-config is intended to make it a lot easier. It looks like you're installing packages into /opt/asdlab/ in their own subdirectory, so you'll probably have to modify the $PKG_CONFIG_PATH environment variable to point to each package's lib directory. Let me know if this helps at all Danny G
Re: Cairo cross compile
On Sat, Sep 11, 2010 at 5:08 AM, Giriprasad Deviprasad wrote: > Hi All, > > I am trying to cross compile GTK+ in hawkboard (www.hawkboard.org). I > have already cross compiled the following successfully for hawkboard: > atk fontconfig freetype glib libxml2 pixman > > Now when I try to cross compile cairo, configure gives the following error: > configure: error: Cairo requires at least one font backend. > Please install freetype and fontconfig, then try again: > > But, I have already installed both freetype and fontconfig for this > architecture. > > ls -l /opt/asdlab/freetype/lib > total 2640 > -rw-r--r-- 1 root root 2688158 2010-09-03 20:08 libfreetype.a > -rwxr-xr-x 1 root root 764 2010-09-03 20:08 libfreetype.la > drwxr-xr-x 2 root root4096 2010-09-03 20:08 pkgconfig > > [r...@localhost cairo-1.6.4]# ls -l /opt/asdlab/freetype/include > total 8 > drwxr-xr-x 3 root root 4096 2010-09-03 20:08 freetype2 > -rw-r--r-- 1 root root 3890 2010-09-03 20:08 ft2build.h > > ls -l /opt/asdlab/fontconfig/lib/ > total 776 > -rw-r--r-- 1 root root 778546 2010-09-04 19:28 libfontconfig.a > -rwxr-xr-x 1 root root922 2010-09-04 19:28 libfontconfig.la > drwxr-xr-x 2 root root 4096 2010-09-04 19:28 pkgconfig > > Any ideas why cairo is not cross compiling? > > Thanks & Regards, > D.Giriprasad > How are you trying to compile Cairo? It looks like fontconfig and freetype are both in a /opt/ directory, did you add these to your $LD_LIBRARY_PATH or are you passing in the directories with the -L option to the gcc compiler? Danny G
Re: Integer Division on 32 Bit Machines
On Wed, Sep 8, 2010 at 12:51 AM, Bond wrote: > > > On Tue, Sep 7, 2010 at 11:14 PM, Bond wrote: > >> >> >> On Tue, Sep 7, 2010 at 3:32 PM, Andreas Leppert wrote: >> >>> Hello, >>> >>> I have encountered a problem on my 32 bit machine. Here some code >>> snippets: >>> >>> typedef signed long s64; >>> >> Ok here is an article which cleared my doubts > > http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/ELJonlineBRWriting-Portable-Device-Drivers/ > but I am not clear with meaning of signed and unsigned. > Quick explanation/example: With 8 bits you can represent (2 ** 8) -1 possible numbers. Unsigned numbers mean that the number cannot be negative so the numbers go from 0 -> 255 (0b -> 0b ) Signed numbers _can_ be negative so they represent the numbers in the range -128 -> 127 (0b1000 -> 0b0111 ) The same thing applies to 32 bit integers. Both signed and unsigned use the same number of bits, but they represent different ranges of numbers. If your number is never expected to be negative, unsigned numbers give you a higher positive range. To understand the negative numbering: http://en.wikipedia.org/wiki/Twos_complement
Re: Integer Division on 32 Bit Machines
On Wed, Sep 8, 2010 at 8:40 AM, DG wrote: > > > On Wed, Sep 8, 2010 at 12:51 AM, Bond wrote: > >> >> >> On Tue, Sep 7, 2010 at 11:14 PM, Bond wrote: >> >>> >>> >>> On Tue, Sep 7, 2010 at 3:32 PM, Andreas Leppert wrote: >>> >>>> Hello, >>>> >>>> I have encountered a problem on my 32 bit machine. Here some code >>>> snippets: >>>> >>>> typedef signed long s64; >>>> >>> Ok here is an article which cleared my doubts >> >> http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/ELJonlineBRWriting-Portable-Device-Drivers/ >> but I am not clear with meaning of signed and unsigned. >> > > Quick explanation/example: > > With 8 bits you can represent (2 ** 8) -1 possible numbers. Unsigned > numbers mean that the number cannot be negative so the numbers go from 0 -> > 255 (0b -> 0b ) Signed numbers _can_ be negative so they > represent the numbers in the range -128 -> 127 (0b1000 -> 0b0111 ) > > The same thing applies to 32 bit integers. Both signed and unsigned use > the same number of bits, but they represent different ranges of numbers. If > your number is never expected to be negative, unsigned numbers give you a > higher positive range. > > To understand the negative numbering: > http://en.wikipedia.org/wiki/Twos_complement > > > Whoops, I meant to say: with 8 bits you can represent 2 ** 8 (256) different numbers. Unsigned numbers go from 0 -> (2 ** 8) -1