bugGPSD - Bugs: bug #40785, build failure: 'const struct...


bug #40785: build failure: 'const struct gps_type_t' has no member named 'mode_switcher'

Submitted by:  Vicente Olivert Riera <vriera>
Submitted on:  Tue 03 Dec 2013 12:34:18 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 05 Dec 2013 09:59:44 PM UTC, comment #2:

Thould be fixed in the repository head version.

Eric S. Raymond <esr>
Project Administrator
Tue 03 Dec 2013 12:58:41 PM UTC, comment #1:

Another thing I don't understand is, why it doesn't fail to compile on MIPS32? I tested it and RECONFIGURE_ENABLE is not defined, so, the device_type struct should not have the mode_switcher member. Then, why it doesn't fail when session->device_type->mode_switcher is accessed on libgpsd_core.c, line #1236?

Vicente Olivert Riera <vriera>
Tue 03 Dec 2013 12:34:18 PM UTC, original submission:

It fails to compile on some arches, for instance x86, x86_64 and MIPS64. And compiles fine on MIPS32 for instance.

I have used 'reconfigure=no' on all of them.

This is the error:

libgpsd_core.c: In function 'gpsd_poll':
libgpsd_core.c:1236:35: error: 'const struct gps_type_t' has no member named 'mode_switcher'
scons: *** [libgpsd_core.os] Error 1
scons: building terminated because of errors.

In the file libgpsd_core.c, line #1236, it tries to access to session->device_type->mode_switcher. That memeber of device_type struct doesn't exists because in the file gpsd.h, line #651, it start to create 3 members of the struct only if RECONFIGURE_ENABLE is defined.
So, in the libgpsd_core.c, line #1236, the access to session->device_type->mode_switcher should be protected inside a block like this one:


<protected block>


I don't know where the "protected block" should starts.

Vicente Olivert Riera <vriera>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by esr (Posted a comment)
  • -unavailable- added by vriera (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 23 Aug 2014 05:47:22 PM UTCesrOpen/ClosedOpen=>Closed
    Thu 05 Dec 2013 09:59:44 PM UTCesrStatusNone=>Fixed

    Back to the top

    Powered by Savane 3.1-cleanup1