[riot-notifications] [RIOT-OS/RIOT] undefined reference to `ZTIMER_MSEC' (#14081)

mfp20 notifications at github.com
Thu May 14 19:04:21 CEST 2020


#### Description
Can't use ztimer. RIOTOS v2020.04 can't find ZTIMER_{USEC|MSEC|SEC} reference. HEAD spits a different error (ztimer struct doesn't have max_value).

#### Steps to reproduce the issue
Set RIOT version
```
$ git checkout tags/2020.04
Previous HEAD position was 398959cca Merge pull request #13990 from fjmolinas/pr_ztimer_base
HEAD is now at 673187e29 Merge pull request #13986 from leandrolanzieri/pr/2020.04_add_version
```

Simple Makefile

```
APPLICATION = test
BOARD ?= native
RIOTBASE ?= $(CURDIR)/../../../RIOT
DEVELHELP ?= 1
include $(RIOTBASE)/Makefile.include

USEMODULE += ztimer_msec

CFLAGS += -Wno-error 
```

Simple code

```
#include <stdio.h>
#include <ztimer.h>

int main(void) {
	ztimer_now(ZTIMER_MSEC);
	return 0;
}
```


#### Expected results
Application build.

#### Actual results
```
$ make
Building application "test" for "native" with MCU "native".

"make" -C /home/user/RIOT/boards/native
"make" -C /home/user/RIOT/boards/native/drivers
"make" -C /home/user/RIOT/core
"make" -C /home/user/RIOT/cpu/native
"make" -C /home/user/RIOT/cpu/native/periph
"make" -C /home/user/RIOT/cpu/native/stdio_native
"make" -C /home/user/RIOT/cpu/native/vfs
"make" -C /home/user/RIOT/drivers
"make" -C /home/user/RIOT/drivers/periph_common
"make" -C /home/user/RIOT/sys
"make" -C /home/user/RIOT/sys/auto_init
/home/user/five/src/test/bin/native/application_test/main.o: In function `main':
/home/user/five/src/test/main.c:7: undefined reference to `ZTIMER_MSEC'
collect2: error: ld returned 1 exit status
/home/user/five/src/test/../../../RIOT/Makefile.include:535: recipe for target '/home/user/five/src/test/bin/native/test.elf' failed
make: *** [/home/user/five/src/test/bin/native/test.elf] Error 1
```


#### Versions
```
$ make print-versions

Operating System Environment
----------------------------
         Operating System: "Ubuntu" "18.04.4 LTS (Bionic Beaver)"
                   Kernel: Linux 5.4.10-1.qubes.x86_64 x86_64 x86_64
             System shell: /bin/dash (probably dash)
             make's shell: /bin/dash (probably dash)

Installed compiler toolchains
-----------------------------
               native gcc: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
        arm-none-eabi-gcc: arm-none-eabi-gcc (15:6.3.1+svn253039-1build1) 6.3.1 20170620
                  avr-gcc: avr-gcc (GCC) 5.4.0
         mips-mti-elf-gcc: missing
               msp430-gcc: missing
     riscv-none-embed-gcc: missing
     xtensa-esp32-elf-gcc: missing
   xtensa-esp8266-elf-gcc: missing
                    clang: missing

Installed compiler libs
-----------------------
     arm-none-eabi-newlib: "2.4.0"
      mips-mti-elf-newlib: missing
  riscv-none-embed-newlib: missing
  xtensa-esp32-elf-newlib: missing
xtensa-esp8266-elf-newlib: missing
                 avr-libc: "2.0.0" ("20150208")

Installed development tools
---------------------------
                   ccache: missing
                    cmake: cmake version 3.10.2
                 cppcheck: missing
                  doxygen: 1.8.13
                      git: git version 2.17.1
                     make: GNU Make 4.1
                  openocd: Open On-Chip Debugger 0.10.0
                   python: Python 2.7.17
                  python2: Python 2.7.17
                  python3: Python 3.6.9
                   flake8: error: /usr/bin/python3: No module named flake8
               coccinelle: missing
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/14081
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200514/d3bbaf0f/attachment.htm>


More information about the notifications mailing list