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

Example program does not compile #2170

Closed
edwardalee opened this issue Jan 27, 2024 · 2 comments · Fixed by lf-lang/playground-lingua-franca#96
Closed

Example program does not compile #2170

edwardalee opened this issue Jan 27, 2024 · 2 comments · Fixed by lf-lang/playground-lingua-franca#96

Comments

@edwardalee
Copy link
Collaborator

The examples/C/src/modal_models/FurutaPendulum.lf example in the playground no longer compiles. It gives:

ld: Undefined symbols:
  _lf_sched_done_with_reaction, referenced from:
      __lf_worker_do_work in libcore.a[8](reactor_threaded.c.o)
  _lf_sched_free, referenced from:
      _environment_free_threaded in libcore.a[7](environment.c.o)
  _lf_sched_get_ready_reaction, referenced from:
      __lf_worker_do_work in libcore.a[8](reactor_threaded.c.o)
  _lf_sched_init, referenced from:
      __lf_initialize_trigger_objects in FurutaPendulum.c.o
      _lf_reactor_c_main in libcore.a[8](reactor_threaded.c.o)
  _lf_scheduler_trigger_reaction, referenced from:
      __lf_trigger_reaction in libcore.a[8](reactor_threaded.c.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also, it uses:

  flags: "-lm",

This is deprecated. What is the right way to do that?

@erlingrj
Copy link
Collaborator

erlingrj commented Jan 27, 2024

The flags should be replaced by cmake-include. The compilation error is due to the build_run_plot.sh script which is outdated. I can give it a try

@erlingrj
Copy link
Collaborator

This should fix it: lf-lang/playground-lingua-franca#96

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.

2 participants