Issues to build GNSS sample while using SUPL server for A-GNSS

Hi DevZone community,
I have an error while building GNSS sample while using SUPL server A-GNSS, please see below the error I get and help me if you know where the issue may come from
-- Configuring incomplete, errors occurred!
See also "C:/ncs/v2.6.1/nrf/samples/cellular/gnss/build/CMakeFiles/CMakeOutput.log".
See also "C:/ncs/v2.6.1/nrf/samples/cellular/gnss/build/CMakeFiles/CMakeError.log".
FAILED: build.ninja C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe
--regenerate-during-build -SC:\ncs\v2.6.1\nrf\samples\cellular\gnss
-BC:\ncs\v2.6.1\nrf\samples\cellular\gnss\build ninja: error: rebuilding 'build.ninja': subcommand failed
FATAL ERROR: command exited with status 1:
'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE'
--build 'c:\ncs\v2.6.1\nrf\samples\cellular\gnss\build'
Thanks,
Saad

  • Hi Saad,

    Could you describe the changes you made to the gnss sample and share the whole building log including the building commands used?

    Best regards,

    Charlie

  • Hi Charlie,

    Thanks for your reply,

    the only change I did is to configure assitance data to SUPL server as shown:

    In matter of building I don't have to run any command visual studio do it for me:


    Thanks,
    Best regards,
    Saad

  • Hi Saad,

    I did a try then successfully build the GNSS sample with SUPL. Here are the steps.

    1) Referring to docs.nordicsemi.com/.../README.html

    Downloading and installing

    You can download the SUPL client library from the nRF9160 DK product page.

    Download the nRF9160 SiP SUPL client library zip file and extract it into the nrf/ext/lib/bin/ folder. Make sure to maintain the folder structure that is used in the zip file.

    2) Set building configuration, adding overlay-supl.conf. I also added "CONFIG_GNSS_SAMPLE_SUPL_HOSTNAME="supl.google.com"" as you did.

    Here is the building log:

     *  Executing task: nRF Connect: Build [pristine]: gnss/build (active) 
    
    Building gnss
    C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/NCS/v2.6.1/nrf/samples/cellular/gnss/build c:/NCS/v2.6.1/nrf/samples/cellular/gnss --pristine --board nrf9160dk_nrf9160_ns -- -DNCS_TOOLCHAIN_VERSION=NONE -DEXTRA_CONF_FILE=overlay-supl.conf  
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/NCS/v2.6.1/nrf/samples/cellular/gnss
    -- CMake version: 3.21.0
    -- Found Python3: C:/NCS/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/NCS/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (C:/NCS/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 0.14.0
    -- Found host-tools: zephyr 0.16.5 (C:/NCS/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/NCS/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: C:/NCS/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/NCS/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Found devicetree overlay: C:/NCS/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_0_14_0.overlay
    -- Generated zephyr.dts: C:/NCS/v2.6.1/nrf/samples/cellular/gnss/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/NCS/v2.6.1/nrf/samples/cellular/gnss/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/NCS/v2.6.1/nrf/samples/cellular/gnss/build/zephyr/dts.cmake
    
    warning: The choice symbol PICOLIBC_IO_FLOAT (defined at lib/libc\picolibc/Kconfig:42) was selected
    (set =y), but no symbol ended up as the choice selection. See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_PICOLIBC_IO_FLOAT and/or look up
    PICOLIBC_IO_FLOAT in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.
    
    Parsing C:/NCS/v2.6.1/nrf/samples/cellular/gnss/Kconfig
    Loaded configuration 'C:/NCS/v2.6.1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
    Merged configuration 'C:/NCS/v2.6.1/nrf/samples/cellular/gnss/prj.conf'
    Merged configuration 'C:/NCS/v2.6.1/nrf/samples/cellular/gnss/overlay-supl.conf'
    Configuration saved to 'C:/NCS/v2.6.1/nrf/samples/cellular/gnss/build/zephyr/.config'
    Kconfig header saved to 'C:/NCS/v2.6.1/nrf/samples/cellular/gnss/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/NCS/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    Dropping partition 'nrf_modem_lib_trace' since its size is 0.
    Dropping partition 'nonsecure_storage' since it is empty.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/NCS/v2.6.1/nrf/samples/cellular/gnss/build
    -- west build: building application
    [2/270] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (C:/NCS/v2.6.1/zephyr), build: v3.5.99-ncs1-1-4-ga681edb8d456
    [7/270] Generating ../../tfm/CMakeCache.txt
    CMake Warning at cmake/version.cmake:22 (message):
      Actual TF-M version is not available from Git repository.  Settled to
      v2.0.0
    Call Stack (most recent call first):
      CMakeLists.txt:22 (include)
    
    
    -- Found Git: C:/NCS/toolchains/cf2149caf2/mingw64/bin/git.exe (found version "2.37.3.windows.1") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/NCS/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Found Python3: C:/NCS/toolchains/cf2149caf2/opt/bin/python.exe (found version "3.9.13") found components: Interpreter 
    CMake Deprecation Warning at C:/NCS/v2.6.1/zephyr/cmake/modules/FindDeprecated.cmake:121 (message):
      'PYTHON_PREFER' variable is deprecated.  Please use Python3_EXECUTABLE
      instead.
    Call Stack (most recent call first):
      C:/NCS/v2.6.1/zephyr/cmake/modules/python.cmake:16 (find_package)
      C:/NCS/v2.6.1/zephyr/cmake/modules/user_cache.cmake:30 (include)
      C:/NCS/v2.6.1/zephyr/cmake/modules/extensions.cmake:5 (include)
      C:/NCS/v2.6.1/nrf/subsys/nrf_security/tfm/CMakeLists.txt:38 (include)
    
    
    -- Found Python3: C:/NCS/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/NCS/v2.6.1/zephyr/.cache
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CRYPTO_RNG_MODULE_ENABLED
        MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
        PYTHON_PREFER
    
    
    -- Build files have been written to: C:/NCS/v2.6.1/nrf/samples/cellular/gnss/build/tfm
    [167/171] Linking C executable bin\tfm_s.axf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       32104 B        32 KB     97.97%
                 RAM:       14392 B        32 KB     43.92%
    [15/270] Performing install step for 'tfm'
    -- Install configuration: "MinSizeRel"
    ----- Installing platform NS -----
    [268/270] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      201632 B       992 KB     19.85%
                 RAM:       46576 B     211608 B     22.01%
            IDT_LIST:          0 GB        32 KB      0.00%
    [270/270] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 

    Best regards,

    Charlie

  • Hi Charlie,

    Thank you so much for your support, you have been so helpful with your replies.

    I managed to have the SUPL server A-GNSS work, apparently I was making two errors:

    Error1: Not adding the Extra Kconfig overlay-supl.conf

    Error2: Extracting the SUPL client library in the wrong file

    Best regards
    Saad

Related