gnokii-users
[Top][All Lists]
Advanced

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

RE: gnokii-users Digest, Vol 103, Issue 7


From: ajay.s.kumar
Subject: RE: gnokii-users Digest, Vol 103, Issue 7
Date: Tue, 14 Jun 2011 19:03:34 +0530

Hi,

I have trialed to cross compile with below configure options.

    LIBDIR=/xxxx/arm/sysroot/xxxxxxse/sysroot/usr/lib/ \
    --with-bluetooth="/xxxxxxx/arm/sysroot/base/sysroot/usr/lib/" \
    --disable-smsd     \
    --enable-fulldebug \
    --enable-xdebug    \
    --enable-rlpdebug  \
    --with-x

(Tried with-out LIBDIR=/xxxx/arm/sysroot/xxxxxxse/sysroot/usr/lib/ also.)

Gnokii is unable to cross compile.
Please find attached the fail log.

I have checked to see that object files are generated for arm.
# file ./common/libgnokii_la-gsm-encoding.o
./common/libgnokii_la-gsm-encoding.o: ELF 32-bit LSB relocatable, ARM, version 
1 (SYSV), not stripped

I have observed that it is trying to link with natively installed files...
/usr/lib/libbluetooth.so /usr/lib/libusb.so -lpthread /usr/lib/libical.so

Using similar process we are able to cross-compile other packages.

How to fix this?
Kindly suggest.

Thanks & Regards,
AK

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of address@hidden
Sent: Tuesday, June 07, 2011 7:49 PM
To: address@hidden
Subject: gnokii-users Digest, Vol 103, Issue 7

Send gnokii-users mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.nongnu.org/mailman/listinfo/gnokii-users
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gnokii-users digest..."


Today's Topics:

   1. Re: Problem with gnokii 0.6.31git, smsd segmentation fault
      (Jan Derfinak)
   2. RE: gnokii-users Digest, Vol 103, Issue 6
      (address@hidden)


----------------------------------------------------------------------

Message: 1
Date: Tue, 7 Jun 2011 13:13:45 +0200 (CEST)
From: Jan Derfinak <address@hidden>
To: "Discussion forum for gnokii users." <address@hidden>
Subject: Re: Problem with gnokii 0.6.31git, smsd segmentation fault
Message-ID: <address@hidden>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 7 Jun 2011, Pawel Kot wrote:

> > What you think about such change:
> > GNOKII_API gn_error gn_sms_send(gn_data *data, struct gn_statemachine
> > *state, unsigned int **reference)
> > ...
> 
> Quite frankly it does not look nice to me. Why is it disturbing to
> have it? If you are afraid of proper deallocation, let's introduce
> gn_sms_free().

It is not problem with deallocation but with design. The function does a
hidden modification of input data in such way that they are not usable again.
And there is no reason to do that. I find this as very bad practise and
working with such function is dangerous and can lead as smsd case to
segfaults.
There are two drawbacks of the design:
1. You cannot reuse input data because these are damaged after use
   gn_sms_send.
2. You must explicitly deallocate (unneeded) data allocated (hidden)
   somewhere inside libgnokii.

The design I suggest is common in libc, for exmaple look at strtol function.


Jan


-- 



------------------------------

Message: 2
Date: Tue, 7 Jun 2011 16:52:25 +0530
From: <address@hidden>
To: <address@hidden>
Subject: RE: gnokii-users Digest, Vol 103, Issue 6
Message-ID:
        <address@hidden>
        
Content-Type: text/plain; charset="us-ascii"

Hi Pawel Kot,

Thanks for prompt response.

Please find attached configure output, config.log and include/config.h.

Thanks & Regards,
AK

-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of address@hidden
Sent: Tuesday, June 07, 2011 4:24 PM
To: address@hidden
Subject: gnokii-users Digest, Vol 103, Issue 6

Send gnokii-users mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.nongnu.org/mailman/listinfo/gnokii-users
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gnokii-users digest..."


Today's Topics:

   1. Re: Problem with gnokii 0.6.31git, smsd segmentation fault
      (Pawel Kot)
   2. Re: Problem with gnokii 0.6.31git, smsd segmentation fault
      (Jan Derfinak)
   3. gnokii not compiling for ARM. (address@hidden)
   4. Re: Problem with gnokii 0.6.31git, smsd segmentation fault
      (Pawel Kot)
   5. Re: gnokii not compiling for ARM. (Pawel Kot)


----------------------------------------------------------------------

Message: 1
Date: Tue, 7 Jun 2011 09:35:30 +0200
From: Pawel Kot <address@hidden>
To: "Discussion forum for gnokii users." <address@hidden>
Subject: Re: Problem with gnokii 0.6.31git, smsd segmentation fault
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

On Mon, Jun 6, 2011 at 22:15, Jan Derfinak <address@hidden> wrote:
> On Mon, 6 Jun 2011, Pawel Kot wrote:
>> Yes, that's not compatible with the code above. I agree that not good
>> that we modify the user_data structure -- that makes the app harder to
>> do retries. I think it is ok that we add the reference part (we could
>> do it in the separate structure, but that complicates things).
>
> What is the use of "reference part"?

It allows to correlate sent message with the delivery report.

take care,
-- 
Pawel Kot



------------------------------

Message: 2
Date: Tue, 7 Jun 2011 09:50:59 +0200 (CEST)
From: Jan Derfinak <address@hidden>
To: "Discussion forum for gnokii users." <address@hidden>
Subject: Re: Problem with gnokii 0.6.31git, smsd segmentation fault
Message-ID: <address@hidden>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 6 Jun 2011, Daniele Forsi wrote:

> 2011/6/6 Jan Derfinak:
> 
> > I think that it is not good that gnokii lib modifies gn_sms structure.
> 
> the problem is how to return a reference number for each part that has
> been sent because the code that calls gn_sms_send() doesn't know how
> many parts will be needed

So it is only for returning reference number?

What you think about such change:
GNOKII_API gn_error gn_sms_send(gn_data *data, struct gn_statemachine
*state, unsigned int **reference)
...

static gn_error sms_send_single(gn_data *data, struct gn_statemachine
*state, unsigned int **reference)
{
  ...
        /* We send SMS parts from the first part to last. */
        /* If reference argument is NULL, caller doesn't want to use
           reference */
        if (reference)
        {
                if (!*reference)
                        *reference =  calloc(data->sms->parts, sizeof(unsigned 
int));

                i = 0;
                while (i < data->sms->parts-1 && *reference[i] != 0)
                        i++;
                *reference[i] = data->raw_sms->reference;
        }
  ...


And the calling as follow:
In the case the reference is unneeded:

gn_sms_send (dt, sm, NULL);


In the case the reference is needed:

unsigned int *ref = NULL;
gn_sms_send (dt, sm, &ref);


Jan


-- 



------------------------------

Message: 3
Date: Tue, 7 Jun 2011 16:05:23 +0530
From: <address@hidden>
To: <address@hidden>
Subject: gnokii not compiling for ARM.
Message-ID:
        <address@hidden>
        
Content-Type: text/plain; charset="us-ascii"

Hi,

I am trialing to cross compile gnokii for arm platform.

Following are the configure options:
==========================
    --with-bluetooth="mysysroot/sysroot/usr/lib/ -lbluetooth" \
    --disable-smsd     \
    --enable-fulldebug \
    --enable-xdebug    \
    --enable-rlpdebug  \
    --with-x

Fails with make showing following:
=========================
make[3]: Entering directory 
`/home/xxxx/Downloads/gnokii/gnokiiFormyself/gnokii-0.6.29_NEW/common/phones'
/bin/sh ../../libtool   --tag=CC   --mode=compile 
/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/x86-linux2/arm-none-linux-gnueabi-armv6jel_vfp-xxxxxxxxx-gcc
 -DCOMPILI
NG_LIBGNOKII -I. -I../../include    -I../../include  
-L/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/sysroot/lib/ 
-L/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/sysroot/usr/lib/ -g -mcpu=arm1136jf-s 
-O2 -pipe -ggdb3 -Wall -Wall -Wno-pointer-sign -fvisibility=hidden 
-fno-strict-aliasing  -I/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/sysroot/usr/lib/ 
-lbluetooth/net -I/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/sysroot/usr/lib/ 
-lbluetooth/  -MT libPHONES_la-generic.lo -MD -MP -MF 
.deps/libPHONES_la-generic.Tpo -c -o libPHONES_la-generic.lo `test -f 
'generic.c' || echo './'`generic.c
libtool: compile:  
/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/x86-linux2/arm-none-linux-gnueabi-armv6jel_vfp-xxxxxxxxx-gcc
 -DCOMPILING_LIBGNOKII -I. -I../../include -I../../include 
-L/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/sysroot/lib/ 
-L/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/sysroot/usr/lib/ -g -mcpu=arm1136jf-s 
-O2 -pipe -ggdb3 -Wall -Wall -Wno-pointer-sign -fvisibility=hidden 
-fno-strict-aliasing -I/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/sysroot/usr/lib/ 
-lbluetooth/net -I/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/sysroot/usr/lib/ 
-lbluetooth/ -MT libPHONES_la-generic.lo -MD -MP -MF 
.deps/libPHONES_la-generic.Tpo -c generic.c  -fPIC -DPIC -o 
.libs/libPHONES_la-generic.o
In file included from ../../include/gnokii-internal.h:38,
                 from generic.c:39:
../../include/compat.h:147: error: expected identifier or '(' before 
'__extension__'
../../include/compat.h:191: error: conflicting types for 'gettimeofday'
/XXXX/arm/sysroot/xxxxxxxxxxxxxxxxxx/x86-linux2/../sysroot/usr/include/sys/time.h:73:
 note: previous declaration of 'gettimeofday' was here
../../include/compat.h:195: error: expected identifier or '(' before 
'__extension__'
../../include/compat.h:195: error: expected identifier or '(' before ')' token
make[3]: *** [libPHONES_la-generic.lo] Error 1

Kindly suggest to resolve this issue.

Thanks & Regards,
AK

________________________________
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </archive/html/gnokii-users/attachments/20110607/9c458e2f/attachment.html>

------------------------------

Message: 4
Date: Tue, 7 Jun 2011 12:49:59 +0200
From: Pawel Kot <address@hidden>
To: "Discussion forum for gnokii users." <address@hidden>
Subject: Re: Problem with gnokii 0.6.31git, smsd segmentation fault
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

On Tue, Jun 7, 2011 at 09:50, Jan Derfinak <address@hidden> wrote:
> On Mon, 6 Jun 2011, Daniele Forsi wrote:
>
>> 2011/6/6 Jan Derfinak:
>>
>> > I think that it is not good that gnokii lib modifies gn_sms structure.
>>
>> the problem is how to return a reference number for each part that has
>> been sent because the code that calls gn_sms_send() doesn't know how
>> many parts will be needed
>
> So it is only for returning reference number?

I thought so, but it's not. I'm rewriting the text of the user_data
(as stated in previous message). But I'll fix that for the next
release.

> What you think about such change:
> GNOKII_API gn_error gn_sms_send(gn_data *data, struct gn_statemachine
> *state, unsigned int **reference)
> ...

Quite frankly it does not look nice to me. Why is it disturbing to
have it? If you are afraid of proper deallocation, let's introduce
gn_sms_free().

take care,
-- 
Pawel Kot



------------------------------

Message: 5
Date: Tue, 7 Jun 2011 12:53:48 +0200
From: Pawel Kot <address@hidden>
To: "Discussion forum for gnokii users." <address@hidden>
Subject: Re: gnokii not compiling for ARM.
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

On Tue, Jun 7, 2011 at 12:35,  <address@hidden> wrote:
> I am trialing to cross compile gnokii for arm platform.

Can you please show the output of configure, config.log and include/config.h?

thanks,
-- 
Pawel Kot



------------------------------

_______________________________________________
gnokii-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/gnokii-users


End of gnokii-users Digest, Vol 103, Issue 6
********************************************

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config.h
URL: </archive/html/gnokii-users/attachments/20110607/8c81f308/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 315663 bytes
Desc: config.log
URL: </archive/html/gnokii-users/attachments/20110607/8c81f308/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.output.tst
Type: application/octet-stream
Size: 20261 bytes
Desc: configure.output.tst
URL: 
</archive/html/gnokii-users/attachments/20110607/8c81f308/attachment-0001.obj>

------------------------------

_______________________________________________
gnokii-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/gnokii-users


End of gnokii-users Digest, Vol 103, Issue 7
********************************************

Attachment: gnokiiNotCrossCompiling.tst
Description: gnokiiNotCrossCompiling.tst


reply via email to

[Prev in Thread] Current Thread [Next in Thread]