Re: Pango cross-compile failure (ARM)



On 12/14/2009 09:00 PM, William To wrote:
Dear Behdad,

In the case where we cannot actually work around the compiler limitation
(its ARM-GCC) is it possible that we can #undef the static asserts and
the library still builds and runs correctly?

No. It would build, but not run correctly. There is a reason why the asserts are there. Better fix the compiler.

behdad

Thanks very much and Best Regards

William To



On Tue, Dec 15, 2009 at 9:43 AM, Behdad Esfahbod <behdad behdad org
<mailto:behdad behdad org>> wrote:

    On 12/14/2009 08:36 PM, William To wrote:

        Dear Behdad,

        I have found out that the compiler automatically aligns the data to
        double word alignment,


    Sure.  But does it do that to every member of a struct?  That
    doesn't make sense.


      and that means its screwing up the static asserts

        because the assumed sizes are no longer valid. Have tried
        adding __attribute__((packed)) to the affected structures, but still
        there are places still not working. Is there any other way of
        working
        around it?


    Not that I know of.  You may want to investigate why
    __attribute__((packed)) is not working.

    behdad

        Thanks very much and Best Regards

        William To



        On Wed, Dec 9, 2009 at 4:16 PM, Behdad Esfahbod
        <behdad behdad org <mailto:behdad behdad org>
        <mailto:behdad behdad org <mailto:behdad behdad org>>> wrote:

            On 12/09/2009 01:32 AM, William To wrote:

                Dear All,

                First of all, I am new to the world of Pango and
        gtk-i18n, so
                excuse my
                lack of knowledge.


            Welcome.



                This is a problem I am facing right now with
        pango-1.26.1 when
                cross-compiling to arm-hardfloat-linux-gnu:

            [...]

                I tracked down to the source and it seems that a static
                assertion on the
                size of the USHORT/SHORT failed (too small or too large,
        I don't
                know)


            That's a deal breaker.  It's basically this struct:

            struct USHORT {
              char v[2];
            }

            So if the size is not 2 bytes, you need to debug and see why
        your
            compiler is doing that.  And possibly find a solution.  I
        can't help
            much with that.

            behdad


                has failed and the build is stuck here. It is possible
        to remove the
                ASSERT_SIZE in the header file, but then it won't build
        either.

                Here are my environmental variables:

                export

          CC_PATH=/opt/crosstool/gcc-4.3.2-glibc-2.6.1/hardfloat/arm-hardfloat-linux-gnu/bin
                export COMPILER=$CC_PATH/arm-hardfloat-linux-gnu-gcc
                export CC=$CC_PATH/arm-hardfloat-linux-gnu-gcc
                export CPP=$CC_PATH/arm-hardfloat-linux-gnu-cpp
                export CXX=$CC_PATH/arm-hardfloat-linux-gnu-g++
                export AR=$CC_PATH/arm-hardfloat-linux-gnu-ar
                export RANLIB=$CC_PATH/arm-hardfloat-linux-gnu-ranlib
                export AS=$CC_PATH/arm-hardfloat-linux-gnu-as
                export LD=$CC_PATH/arm-hardfloat-linux-gnu-ld
                export NM=$CC_PATH/arm-hardfloat-linux-gnu-nm
                export PREFIX=/home/william/1234/libraries/prefix/webapps/
                export EXEC_PREFIX=/home/william/1234/libraries/mnt/webapps/
                export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

                I use the ubuntu gcc 4.3.2 compiler to build and there
        is no such
                problem. Previous versions of pango compiles normally
        with the same
                cross compiler. I wonder has anybody had hit the same
        problem as me.

                Thanks very much and Best Regards

                William To



                _______________________________________________
                gtk-i18n-list mailing list
        gtk-i18n-list gnome org <mailto:gtk-i18n-list gnome org>
        <mailto:gtk-i18n-list gnome org <mailto:gtk-i18n-list gnome org>>

        http://mail.gnome.org/mailman/listinfo/gtk-i18n-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]