Re: Build Error on Raspberry Pi



On Wed, 2015-03-25 at 08:32 -0400, Jordan Messina wrote:
Hey Dan,

Thanks for the quick response. Here are the compile errors adding those
lines in nm-ppp-manager.c:

Ok, does it build if you move the #include "nm-platform.h" above the
if_ppp.h include?

Dan

    In file included from ppp-manager/nm-ppp-manager.c:42:0:
    /usr/include/linux/if_ppp.h:103:16: error: field 'b' has incomplete type
      struct ifreq  b;
                    ^
    /usr/include/linux/if_ppp.h:108:21: error: field 'b' has incomplete type
      struct ifreq       b;
                         ^
    ppp-manager/nm-ppp-manager.c:52:1: error: expected identifier or '('
before numeric constant
     linux if has been included!
     ^
    In file included from ../libnm-core/nm-core-internal.h:39:0,
                     from ppp-manager/nm-ppp-manager.c:54:
    ../libnm-core/nm-setting-8021x.h:51:3: error: data definition has no
type or storage class [-Werror]
     } NMSetting8021xCKFormat;
       ^
    ../libnm-core/nm-setting-8021x.h:51:3: error: type defaults to 'int' in
declaration of 'NMSetting8021xCKFormat' [-Werror=implicit-int]
    ../libnm-core/nm-setting-8021x.h:173:71: error: expected declaration
specifiers or '...' before 'NMSetting8021xCKFormat'

 NMSetting8021xCKFormat *out_format,
                                                                           ^
    ../libnm-core/nm-setting-8021x.h:195:71: error: expected declaration
specifiers or '...' before 'NMSetting8021xCKFormat'

 NMSetting8021xCKFormat *out_format,
                                                                           ^
    ../libnm-core/nm-setting-8021x.h:214:71: error: expected declaration
specifiers or '...' before 'NMSetting8021xCKFormat'

 NMSetting8021xCKFormat *out_format,
                                                                           ^
    ../libnm-core/nm-setting-8021x.h:236:75: error: expected declaration
specifiers or '...' before 'NMSetting8021xCKFormat'

   NMSetting8021xCKFormat *out_format,

   ^
    ../libnm-core/nm-setting-8021x.h:254:75: error: expected declaration
specifiers or '...' before 'NMSetting8021xCKFormat'

   NMSetting8021xCKFormat *out_format,

   ^
    ../libnm-core/nm-setting-8021x.h:259:1: error: unknown type name
'NMSetting8021xCKFormat'
     NMSetting8021xCKFormat nm_setting_802_1x_get_private_key_format
   (NMSetting8021x *setting);
     ^
    ../libnm-core/nm-setting-8021x.h:268:75: error: expected declaration
specifiers or '...' before 'NMSetting8021xCKFormat'

   NMSetting8021xCKFormat *out_format,

   ^
    ../libnm-core/nm-setting-8021x.h:273:1: error: unknown type name
'NMSetting8021xCKFormat'
     NMSetting8021xCKFormat nm_setting_802_1x_get_phase2_private_key_format
  (NMSetting8021x *setting);
     ^
    cc1: all warnings being treated as errors
    Makefile:1499: recipe for target 'nm-ppp-manager.lo' failed
    make[4]: *** [nm-ppp-manager.lo] Error 1
    make[4]: Leaving directory '/home/pi/NetworkManager-1.0.0/src'
    Makefile:2001: recipe for target 'all-recursive' failed
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory '/home/pi/NetworkManager-1.0.0/src'
    Makefile:1051: recipe for target 'all' failed
    make[2]: *** [all] Error 2
    make[2]: Leaving directory '/home/pi/NetworkManager-1.0.0/src'
    Makefile:608: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/home/pi/NetworkManager-1.0.0'
    Makefile:502: recipe for target 'all' failed
    make: *** [all] Error 2


Here are my compiler flags:

*CFLAGS =* -Wall -std=gnu89 -Wshadow -Wmissing-declarations
-Wmissing-prototypes -Wdeclaration-after-statement -Wformat-security
-Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -Wstrict-prototypes
-fno-strict-aliasing -Wno-unused-but-set-variable -Wundef
-Wimplicit-function-declaration -Wpointer-arith -Winit-self
-Wmissing-include-dirs -Werror -g -O2

Thank you,
Jordan Messina

On Tue, Mar 24, 2015 at 5:05 PM, Dan Williams <dcbw redhat com> wrote:

On Tue, 2015-03-24 at 13:53 -0400, Jordan Messina wrote:
I'm trying to build Network Manager 1.0 from source on a Raspberry Pi
running RASPBIAN Debian Wheezy. I'm using gcc4.8. Getting the following
error:

Interesting; <linux/if.h> should get pulled in from the #include
"nm-platform.h" in nm-ppp-manager.c. Can you do something like:

 #include "nm-platform.h"
+#ifdef _LINUX_IF_H
+linux if has been included!
+#endif
 #include "nm-core-internal.h"

in nm-ppp-manager.c and see if the compiler errors on that?  If so we
know linux/if.h has been found by the preprocessor.

Also, what compiler flags are being used?  This should tell you:

grep "^CFLAGS =" src/ppp-manager/Makefile

Dan


In file included from
ppp-manager/nm-ppp-manager.c:42:0:/usr/include/linux/if_ppp.h:103:16:
error: field 'b' has incomplete type
  struct ifreq  b;
                ^/usr/include/linux/if_ppp.h:108:21: error: field 'b'
has incomplete type
  struct ifreq       b;
                     ^Makefile:1499: recipe for target
'nm-ppp-manager.lo' failed
make[4]: *** [nm-ppp-manager.lo] Error 1
make[4]: Leaving directory
'/home/pi/NetworkManager-1.0.0/src'Makefile:2001: recipe for target
'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
'/home/pi/NetworkManager-1.0.0/src'Makefile:1051: recipe for target
'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory
'/home/pi/NetworkManager-1.0.0/src'Makefile:608: recipe for target
'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
'/home/pi/NetworkManager-1.0.0'Makefile:502: recipe for target 'all'
failed
make: *** [all] Error 2



Not sure why this is happening. Is it using the wrong PPP headers?
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list







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