Problem with "make" -lm missing.

Hello to all. I am trying to build an app with “make clean all flash term” on native platform, and all I get as a result that:

Building application “time” for “native” with MCU “native”.

“make” -C /home/d/RIOT/boards/native “make” -C /home/d/RIOT/boards/native/drivers “make” -C /home/d/RIOT/core “make” -C /home/d/RIOT/cpu/native “make” -C /home/d/RIOT/cpu/native/periph “make” -C /home/d/RIOT/drivers

“make” -C /home/d/RIOT/sys “make” -C /home/d/RIOT/sys/auto_init /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/…/…/…/…/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/…/…/…/…/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /lib/…/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /lib/…/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/…/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/…/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/…/…/…/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/…/…/…/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm /usr/bin/ld: cannot find -lm collect2: error: ld returned 1 exit status make: *** [/home/darch/RIOT/examples/time/…/…/Makefile.include:261: all] Error 1

I am using ArchLinux. What am I doing wrong? Thanks!

Hi,

Have you multilib support enabled and installed ?

https://github.com/RIOT-OS/RIOT/wiki/Family:-native

Hi, have you installed gcc-multilib and the other dependencies [1]?

Cheers, Martine

Oops, forgot to provide the link for [1]: https://github.com/RIOT-OS/RIOT/wiki/Family%3A-native#dependencies

Problem solved.

Now I have another problem!

I compile on native board, and everything is alright.

When I am trying to compile on qemu-i386, it seems to start, but I get no results. All I get is:

Building application “time” for “qemu-i386” with MCU “x86”.

“make” -C /home/d/RIOT/pkg/tlsf rm -rf /home/d/RIOT/examples/time/bin/pkg/qemu-i386/tlsf/src mkdir -p /home/d/RIOT/examples/time/bin/pkg/qemu-i386/tlsf/src patching file Makefile patching file tlsf-malloc.c patching file tlsf-malloc.h patching file tlsf.c patching file tlsf.h “make” -C /home/d/RIOT/boards/qemu-i386 “make” -C /home/d/RIOT/boards/x86-multiboot-common “make” -C /home/d/RIOT/core “make” -C /home/d/RIOT/cpu/x86 “make” -C /home/d/RIOT/drivers “make” -C /home/d/RIOT/sys “make” -C /home/d/RIOT/sys/auto_init “make” -C /home/d/RIOT/sys/quad_math text data bss dec hex filename 123739 2392 68228 194359 2f737 /home/d/RIOT/examples/time/bin/qemu-i386/time.elf true exec /home/d/RIOT/boards/qemu-i386/dist/term.py qemu-system-i386 /home//RIOT/examples/time/bin /home/d/RIOT/examples/time/bin/qemu-i386/time.hex Type ‘exit’ to exit. Starting QEMU: qemu-system-i386 -serial tcp:0.0.0.0:55893 -nographic -monitor /dev/null -kernel /home/d/RIOT/examples/time/bin/qemu-i386/time.hex -m size=512

2016-08-09 11:19:44.436878: Interrupt handling initialized 2016-08-09 11:19:44.437139: PIC initialized 2016-08-09 11:19:44.437568: Warning: Your hardware does not support the NX bit! 2016-08-09 11:19:44.437834: Setting PT_XD = 0. 2016-08-09 11:19:44.438586: Kernel memory: 0x100000 - 0x132000 2016-08-09 11:19:44.438882: .text: 0x100060 - 0x1172ef 2016-08-09 11:19:44.439173: .rodata: 0x118000 - 0x11ae08 2016-08-09 11:19:44.439451: .data: 0x120000 - 0x1208e8 2016-08-09 11:19:44.439737: .bss: 0x121000 - 0x131a84 2016-08-09 11:19:44.440049: Unmapped memory: 0x132000 - 0x140000 2016-08-09 11:19:44.440254: Heap start: 0x140000 2016-08-09 11:19:44.440625: 0000000000000000 - 000000000009fc00 (usable) 2016-08-09 11:19:44.441091: 000000000009fc00 - 00000000000a0000 (unusable: reseved) 2016-08-09 11:19:44.441545: 00000000000f0000 - 0000000000100000 (unusable: reseved) 2016-08-09 11:19:44.441919: 0000000000100000 - 000000001ffe0000 (usable) 2016-08-09 11:19:44.674721: 000000001ffe0000 - 0000000020000000 (unusable: reseved) 2016-08-09 11:19:44.675258: 00000000fffc0000 - 0000000100000000 (unusable: reseved) 2016-08-09 11:19:44.676789: There are 130734 free pages (510.680 MB) available for the heap. 2016-08-09 11:19:44.677060: Virtual memory initialized 2016-08-09 11:19:44.677378: RTC initialized [08:19:44, 2016-08-09] 2016-08-09 11:19:44.677551: PIT initialized 2016-08-09 11:19:44.677769: Looking up PCI devices 2016-08-09 11:19:44.678502: 00:00.0 “Intel Corporation”: “440FX - 82441FX PMC [Natoma]” (Bridge device: Host bridge, rev: 02) 2016-08-09 11:19:44.679282: 00:01.0 “Intel Corporation”: “82371SB PIIX3 ISA [Natoma/Triton II]” (Bridge device: ISA bridge, rev: 00) 2016-08-09 11:19:44.680175: 00:01.1 “Intel Corporation”: “82371SB PIIX3 IDE [Natoma/Triton II]” (Mass storage controller: IDE controller, rev: 00) 2016-08-09 11:19:44.680531: BAR 4: I/O space, ports 0xc040-0xc04f 2016-08-09 11:19:44.681289: 00:01.3 “Intel Corporation”: “82371AB/EB/MB PIIX4 ACPI” (Bridge device: Other bridge device, rev: 03) 2016-08-09 11:19:44.681535: IRQ: new = 10, old = 9 2016-08-09 11:19:44.682184: 00:02.0 “0x1234”: “0x1111” (Display controller: VGA-compatible controller, rev: 02) 2016-08-09 11:19:44.695092: BAR 0: memory, physical = 0xfd000000-0xfdffffff, virtual = 0x0023d000-0x0123cfff 2016-08-09 11:19:44.695797: BAR 2: memory, physical = 0xfebf0000-0xfebf0fff, virtual = 0x1fff7000-0x1fff7fff 2016-08-09 11:19:44.696827: 00:03.0 “Intel Corporation”: “82540EM Gigabit Ethernet Controller” (Network controller: Ethernet controller, rev: 03) 2016-08-09 11:19:44.697108: IRQ: new = 10, old = 11 2016-08-09 11:19:44.697756: BAR 0: memory, physical = 0xfebc0000-0xfebdffff, virtual = 0x1fff9000-0x20018fff 2016-08-09 11:19:44.698100: BAR 1: I/O space, ports 0xc000-0xc03f 2016-08-09 11:19:44.698438: RIOT x86 hardware initialization complete. 2016-08-09 11:19:44.698729: RIOT board initialization complete. 2016-08-09 11:19:44.699216: main(): This is RIOT! (Version: 2016.10-devel-21-gcf11a-D)

After this, it just don’t run. It was supposed to show a clock to me.

Hi,

It's difficult to say anything about this without seeing the actual source code.

Cheers, Ludwig

Hi!

I made trouble once, speaking about this project, but I am going at it again!!

I want my app to run on a bare VM. Meaning that I want my VM to boot to my app without an OS been installed in the VM emulator. Any solutions would be very helpful!

P.S: On the other hand, I have a raspberry pi on my hands and an arduino uno for some days. My project aims on that purpose too.

Hi,

Yes, you said that you want do that before but you never explained: *WHY* do you want to do that? Also: RIOT is an OS!

Cheers, Ludwig

Hahahahaha it’s that WHY again!

Because I have told to do so from my university!

I can’t explain further because I DON’T KNOW WHY!

Hi,

then either ask your prof / TA what your objective is or drop the class. You may quote the author of the qemu-i386 port (that's me) that the port is in a bad shape (that's true). But you are also welcome to bring the port up to speed, but please accept that we won't jump because the need port right now.

RIOT has full support for multiple inexpensive boards that might work better for you than emulation. Please see: https://github.com/RIOT-OS/RIOT/wiki/RIOT-Platforms

Regards René

Okay I understand.

Any chances that I can run on Arduino Uno?

Any chances that I can run on Arduino Uno?

Arduino uno is not fully functional for now, depends on your application needs.... Basically, UART and timers should work, gpio are untested, no pwm ....

Fetch #5590 and #5451 PR and try ....

Good luck,

So a simple Clock-Chronometer written in shell script, wouldn’t work for now?

Hi,

If you have been told to write an application that runs on a VM without using an OS, RIOT is not the answer because it is an OS, so your application is using an OS.

Apart from that there is no difference between running on native and running on QEMU from the application point of view.

As René already said: you probably should clarify the intention of the task with your teachers.

Cheers, Ludwig

Hi again.

The point is that the VM hasn’t got an OS.

I mean that when I try to run the app on VM, the VM must not have Linux/MacOSX/Windows or whatever.

The only thing that exists on the VM must be the RIOT app.

From that point of view, yes, an OS must be running.

P.S: Anyone who have tried to run an app on Arduino Uno, please be kind to tell me if they succeed!

Thanks!

P.S: Anyone who have tried to run an app on Arduino Uno, please be kind to tell me if they succeed!

What I have personnaly tested on real hardware and works fine is : - hello_world - timer_periodic_wakeup - ipc_pingpong

from RIOT/examples/ directory