Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined references to `sys_rand32_get' #172

Closed
lorepieri8 opened this issue Apr 19, 2019 · 0 comments · Fixed by #173
Closed

undefined references to `sys_rand32_get' #172

lorepieri8 opened this issue Apr 19, 2019 · 0 comments · Fixed by #173

Comments

@lorepieri8
Copy link
Member

zephyrproject-rtos/zephyr#15565

Describe the bug
I get undefined references to sys_rand32_get'` after building a zephyr app with qemu_cortex_m3 or qemu_x86, while the same setup seems working for nrf52840_pca10056.

To Reproduce
Steps to reproduce the behavior:

  1. https://github.com/AnyLedger/anyledger-wallet, commit 8fb0247
  2. zephyr build instructions, with zephyr version picked using:
git clone https://github.com/zephyrproject-rtos/zephyr.git
DATE='Nov 7 2018'
git rev-list -1 --before="$DATE" master | xargs -Iz git checkout z
  1. cmake -GNinja -DBOARD=qemu_cortex_m3 -DBUILD_XCOMPILE=1 ../
  2. ninja
  3. See error

Expected behavior
ninja completing the build

Screenshots or console output

libapp.a(compat.c.obj): In function `random32':
/Users/lorenzo/gitHubRepo/nov7zephyr/zephyr/samples/anyledger/anyledger-wallet/build/../zephyr/compat.c:26: undefined reference to `sys_rand32_get'
zephyr/libzephyr.a(coap.c.obj): In function `coap_next_token':
/Users/lorenzo/gitHubRepo/nov7zephyr/zephyr/subsys/net/lib/coap/coap.c:1484: undefined reference to `sys_rand32_get'
/Users/lorenzo/gitHubRepo/nov7zephyr/zephyr/subsys/net/lib/coap/coap.c:1485: undefined reference to `sys_rand32_get'
zephyr/libzephyr.a(slip.c.obj): In function `slip_iface_init':
/Users/lorenzo/gitHubRepo/nov7zephyr/zephyr/drivers/net/slip.c:488: undefined reference to `sys_rand32_get'
zephyr/subsys/net/ip/libsubsys__net__ip.a(net_context.c.obj): In function `find_available_port':
/Users/lorenzo/gitHubRepo/nov7zephyr/zephyr/subsys/net/ip/net_context.c:98: undefined reference to `sys_rand32_get'
zephyr/subsys/net/ip/libsubsys__net__ip.a(net_if.c.obj):/Users/lorenzo/gitHubRepo/nov7zephyr/zephyr/subsys/net/ip/net_if.c:2008: more undefined references to `sys_rand32_get' follow
collect2: error: ld returned 1 exit status
%
ninja: build stopped: subcommand failed.

Environment (please complete the following information):

  • OS: MacOS
  • ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    -GNUARMEMB_TOOLCHAIN_PATH="~/opt/gcc-arm-none-eabi-7-2018-q2-update/"

Additional context

It works with
cmake -GNinja -DBOARD= nrf52840_pca10056 -DBUILD_XCOMPILE=1 ../
while it doesn't work for
cmake -GNinja -DBOARD= qemu_x86 -DBUILD_XCOMPILE=1 ../

@lorepieri8 lorepieri8 added bug Something isn't working and removed bug Something isn't working labels Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant