Raspberry 3 troubles



  • I have installed Raspbian Jessie on a new RPI3, after that I tried to add MySensors at it.

    But it failed with the errors below. Can anyone tell how to fix that ?

    This is what I have done:

    cd /home/pi
    git clone https://github.com/mysensors/MySensors.git --branch development
    cd MySensors
    ./configure --my-transport=nrf24 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020
    make

    Thanks!

    😉 Arthur


    pi@raspberrypi:~/MySensors $ make                                                                                                       g++ -MT build/drivers/Linux/SPIDEV.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a                                                        53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DM                                                        Y_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_LINUX_SERIAL_PTY=\"/dev/tt                                                        yUSB020\" -DMY_LINUX_IS_SERIAL_PTY  -Ofast -g -Wall -Wextra  -I. -I./core -I./dr                                                        ivers/Linux -I./drivers/BCM -c drivers/Linux/SPIDEV.cpp -o build/drivers/Linux/S                                                        PIDEV.o
    In file included from /usr/include/linux/spi/spidev.h:25:0,
                     from drivers/Linux/SPIDEV.h:27,
                     from drivers/Linux/SPIDEV.cpp:22:
    /usr/include/linux/types.h:1:2: error: invalid preprocessing directive #ifn
     #ifn`ef _LINUX_TYPES_H
      ^
    In file included from /usr/include/linux/spi/spidev.h:25:0,
                     from drivers/Linux/SPIDEV.h:27,
                     from drivers/Linux/SPIDEV.cpp:22:
    /usr/include/linux/types.h:6:8: error: macro names must be identifiers
     #ifndefâ–’__ASSEMBLY__
            ^
    /usr/include/linux/types.h:6:0: error: unterminated #ifndef
     #ifndefâ–’__ASSEMBLY__
     ^
    In file included from drivers/Linux/SPIDEV.h:27:0,
                     from drivers/Linux/SPIDEV.cpp:22:
    /usr/include/linux/spi/spidev.h:98:2: error: stray '\33' in program
      __u8  cs]aha.gE
    
    /usr/include/linux/spi/spidev.h:125:2: error: invalid preprocessing directive #d                                                        efine0SPI_IOC_RD_L
     #debine SPI_IOC_WR_LS_FIRST  _IoW(SPIâ–’IOC_MAGIC, 2, __u8)
      ^
    /usr/include/linux/spi/spidev.h:126:2: error: invalid preprocessing directive #d                                                        ebine
    
      ^
    /usr/include/linux/spi/spidev.h:129:8: error: macro names must be identifiers
     !define SPK_IO_WS_BITS_PeR_WORD _IOSPI_IOC_MAGIC, 3, __u8)
            ^
    /usr/include/linux/spi/spidev.h:130:1: error: stray '\3' in program
    
     ^
    /usr/include/linux/spi/spidev.h:130:1: error: stray '\10' in program
    drivers/Linux/SPIDEV.cpp:153:41: error: macro "_IOW" passed 4 arguments, but tak                                                        es just 3
      ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
                                             ^
    drivers/Linux/SPIDEV.cpp:175:41: error: macro "_IOW" passed 4 arguments, but tak                                                        es just 3
      ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
                                             ^
    In file included from drivers/Linux/SPIDEV.h:27:0,
                     from drivers/Linux/SPIDEV.cpp:22:
    /usr/include/linux/spi/spidev.h:94:2: error: '__u12' does not name a type
      __u12  sp%ed_hz;
      ^
    /usr/include/linux/spi/spidev.h:98:8: error: expected ';' at end of member decla                                                        ration
      __u8  cs]aha.gE
    
    /usr/include/linux/spi/spidev.h:98:10: error: expected unqualified-id before ']'                                                         token
      __u8  cs]aha.gE
    
    /usr/include/linux/spi/spidev.h:130:1: error: expected unqualified-id before '!'                                                         token
    
     ^
    drivers/Linux/SPIDEV.cpp:42:63: error: too many initializers for 'spi_ioc_transf                                                        er'
     struct spi_ioc_transfer SPIDEVClass::tr = {0,0,0,0,0,8,1,0,0,0}; // 8 bits_per_                                                        word, 1 cs_change
                                                                   ^
    drivers/Linux/SPIDEV.cpp: In static member function 'static void SPIDEVClass::se                                                        tBitOrder(uint8_t)':
    drivers/Linux/SPIDEV.cpp:89:22: error: 'SPI_IOC_WR_LSB_FIRST' was not declared i                                                        n this scope
      int ret = ioctl(fd, SPI_IOC_WR_LSB_FIRST, &lsb_setting);
                          ^
    In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0,
                     from /usr/include/linux/ioctl.h:4,
                     from /usr/include/asm-generic/ioctls.h:4,
                     from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:6,
                     from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23,
                     from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26,
                     from drivers/Linux/SPIDEV.cpp:27:
    drivers/Linux/SPIDEV.cpp: In static member function 'static void SPIDEVClass::se                                                        tDataMode(uint8_t)':
    drivers/Linux/SPIDEV.cpp:105:22: error: 'SRI_IOC_MAGIC' was not declared in this                                                         scope
      int ret = ioctl(fd, SPI_IOC_WR_MODE, &data_mode);
                          ^
    drivers/Linux/SPIDEV.cpp:105:22: error: '__58' was not declared in this scope
      int ret = ioctl(fd, SPI_IOC_WR_MODE, &data_mode);
                          ^
    drivers/Linux/SPIDEV.cpp: In static member function 'static uint8_t SPIDEVClass:                                                        :transfer(uint8_t)':
    drivers/Linux/SPIDEV.cpp:151:5: error: 'struct spi_ioc_transfer' has no member n                                                        amed 'speed_hz'
      tr.speed_hz = speed;
         ^
    In file included from drivers/Linux/SPIDEV.h:27:0,
                     from drivers/Linux/SPIDEV.cpp:22:
    drivers/Linux/SPIDEV.cpp:153:18: error: '_IOW' was not declared in this scope
      ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
                      ^
    drivers/Linux/SPIDEV.cpp: In static member function 'static void SPIDEVClass::tr                                                        ansfernb(char*, char*, uint32_t)':
    drivers/Linux/SPIDEV.cpp:173:5: error: 'struct spi_ioc_transfer' has no member n                                                        amed 'speed_hz'
      tr.speed_hz = speed;
         ^
    In file included from drivers/Linux/SPIDEV.h:27:0,
                     from drivers/Linux/SPIDEV.cpp:22:
    drivers/Linux/SPIDEV.cpp:175:18: error: '_IOW' was not declared in this scope
      ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
                      ^
    In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0,
                     from /usr/include/linux/ioctl.h:4,
                     from /usr/include/asm-generic/ioctls.h:4,
                     from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:6,
                     from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23,
                     from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26,
                     from drivers/Linux/SPIDEV.cpp:27:
    drivers/Linux/SPIDEV.cpp: In static member function 'static void SPIDEVClass::be                                                        ginTransaction(SPISettings)':
    drivers/Linux/SPIDEV.cpp:198:18: error: 'SRI_IOC_MAGIC' was not declared in this                                                         scope
      ret = ioctl(fd, SPI_IOC_WR_MODE, &settings.dmode);
                      ^
    drivers/Linux/SPIDEV.cpp:198:18: error: '__58' was not declared in this scope
      ret = ioctl(fd, SPI_IOC_WR_MODE, &settings.dmode);
                      ^
    drivers/Linux/SPIDEV.cpp:211:18: error: 'SPI_IOC_WR_LSB_FIRST' was not declared                                                         in this scope
      ret = ioctl(fd, SPI_IOC_WR_LSB_FIRST, &settings.border);
                      ^
    In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0,
                     from /usr/include/linux/ioctl.h:4,
                     from /usr/include/asm-generic/ioctls.h:4,
                     from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:6,
                     from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23,
                     from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26,
                     from drivers/Linux/SPIDEV.cpp:27:
    drivers/Linux/SPIDEV.cpp: In static member function 'static void SPIDEVClass::in                                                        it()':
    drivers/Linux/SPIDEV.cpp:252:22: error: 'SRI_IOC_MAGIC' was not declared in this                                                         scope
      int ret = ioctl(fd, SPI_IOC_WR_MODE, &mode);
                          ^
    drivers/Linux/SPIDEV.cpp:252:22: error: '__58' was not declared in this scope
      int ret = ioctl(fd, SPI_IOC_WR_MODE, &mode);
                          ^
    drivers/Linux/SPIDEV.cpp:262:18: error: 'SPI_IOC_WR_BITS_PER_WORD' was not decla                                                        red in this scope
      ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits);
                      ^
    drivers/Linux/SPIDEV.cpp:282:18: error: 'SPI_IOC_WR_LSB_FIRST' was not declared                                                         in this scope
      ret = ioctl(fd, SPI_IOC_WR_LSB_FIRST, &lsb_setting);
                      ^
    Makefile:98: recept voor doel 'build/drivers/Linux/SPIDEV.o' is mislukt
    make: *** [build/drivers/Linux/SPIDEV.o] Fout 1
    pi@raspberrypi:~/MySensors $
    

  • Mod

    @arthur I took the liberty to press the code block button (looks like this: </> ) to make the output more readable.

    It looks like your /usr/include/linux/types.h file is damaged. This is what the top of that file looks on my system:

    pi@raspberrypi:~ $ head /usr/include/linux/types.h
    #ifndef _LINUX_TYPES_H
    #define _LINUX_TYPES_H
    
    #include <asm/types.h>
    
    #ifndef __ASSEMBLY__
    
    #include <linux/posix_types.h>
    

    Could you post yours?


Log in to reply
 

Suggested Topics

37
Online

11.4k
Users

11.1k
Topics

112.7k
Posts