Skip to content

Commit

Permalink
Merge pull request #167 from lf-lang/arengarajan99-patch-1
Browse files Browse the repository at this point in the history
Update lingua-franca-ref.txt
  • Loading branch information
lhstrh authored Feb 25, 2023
2 parents 6d74ef4 + c818f67 commit 408b61d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lingua-franca-ref.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
arduino-fed-support
master

6 comments on commit 408b61d

@rcakella
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI.. I was trying to build RTI in Linux environment and my build failed on all commits after this commit. It can be easily reproduced using the instructions on README in RTI directory.

@lhstrh
Copy link
Member Author

@lhstrh lhstrh commented on 408b61d Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for point this out, @rcakella. I can reproduce the problem. To me, this only confirms that we need to really move the rti out of this repo and run tests for it... @arengarajan99 could you please take a look?

@lhstrh
Copy link
Member Author

@lhstrh lhstrh commented on 408b61d Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing interesting in the commit that you point to, however. Does the commit before that one work?

@lhstrh
Copy link
Member Author

@lhstrh lhstrh commented on 408b61d Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also tagging @cmnrd as he might have a clue.

@lhstrh
Copy link
Member Author

@lhstrh lhstrh commented on 408b61d Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmnrd figured out that it works with -DAUTH=ON but not with the default -DAUTH=OFF. This probably has to do with the refactoring that @arengarajan99 did that didn't take in consideration the code contributed by @Jakio815.

Just for context, here is the error log:

[ 11%] Building C object CMakeFiles/RTI.dir/rti.c.o
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:76:18: error: ‘PTHREAD_MUTEX_INITIALIZER’ undeclared here (not in a function)
   76 |     .rti_mutex = PTHREAD_MUTEX_INITIALIZER,
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:77:29: error: ‘PTHREAD_COND_INITIALIZER’ undeclared here (not in a function)
   77 |     .received_start_times = PTHREAD_COND_INITIALIZER,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘create_server’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:140:84: warning: implicit declaration of function ‘strerror’; did you mean ‘hstrerror’? [-Wimplicit-function-declaration]
  140 |         lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno));
      |                                                                                    ^~~~~~~~
      |                                                                                    hstrerror
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘send_tag_advance_grant’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:260:9: warning: implicit declaration of function ‘pthread_cond_wait’ [-Wimplicit-function-declaration]
  260 |         pthread_cond_wait(&_RTI.sent_start_time, &_RTI.rti_mutex);
      |         ^~~~~~~~~~~~~~~~~
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘handle_port_absent_message’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:642:5: warning: implicit declaration of function ‘pthread_mutex_lock’ [-Wimplicit-function-declaration]
  642 |     pthread_mutex_lock(&_RTI.rti_mutex);
      |     ^~~~~~~~~~~~~~~~~~
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:650:9: warning: implicit declaration of function ‘pthread_mutex_unlock’; did you mean ‘lf_mutex_unlock’? [-Wimplicit-function-declaration]
  650 |         pthread_mutex_unlock(&_RTI.rti_mutex);
      |         ^~~~~~~~~~~~~~~~~~~~
      |         lf_mutex_unlock
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘handle_timestamp’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:1175:9: warning: implicit declaration of function ‘pthread_cond_broadcast’; did you mean ‘lf_cond_broadcast’? [-Wimplicit-function-declaration]
 1175 |         pthread_cond_broadcast(&_RTI.received_start_times);
      |         ^~~~~~~~~~~~~~~~~~~~~~
      |         lf_cond_broadcast
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘receive_and_check_fed_id_message’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:1597:13: warning: implicit declaration of function ‘strncmp’ [-Wimplicit-function-declaration]
 1597 |         if (strncmp(_RTI.federation_id, federation_id_received, federation_id_length) != 0) {
      |             ^~~~~~~
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:68:1: note: include ‘<string.h>’ or provide a declaration of ‘strncmp’
   67 | #include "rti.h"
  +++ |+#include <string.h>
   68 | #ifdef __RTI_AUTH__
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘connect_to_federates’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:1918:13: warning: implicit declaration of function ‘pthread_create’; did you mean ‘lf_thread_create’? [-Wimplicit-function-declaration]
 1918 |             pthread_create(&(_RTI.federates[fed_id].thread_id), NULL, federate_thread_TCP, &(_RTI.federates[fed_id]));
      |             ^~~~~~~~~~~~~~
      |             lf_thread_create
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘initialize_federate’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:1996:5: warning: implicit declaration of function ‘strncpy’ [-Wimplicit-function-declaration]
 1996 |     strncpy(_RTI.federates[id].server_hostname ,"localhost", INET_ADDRSTRLEN);
      |     ^~~~~~~
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:1996:5: note: include ‘<string.h>’ or provide a declaration of ‘strncpy’
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:1996:5: warning: incompatible implicit declaration of built-in function ‘strncpy’ [-Wbuiltin-declaration-mismatch]
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:1996:5: note: include ‘<string.h>’ or provide a declaration of ‘strncpy’
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘wait_for_federates’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:2050:9: warning: implicit declaration of function ‘pthread_join’; did you mean ‘lf_thread_join’? [-Wimplicit-function-declaration]
 2050 |         pthread_join(_RTI.federates[i].thread_id, &thread_exit_status);
      |         ^~~~~~~~~~~~
      |         lf_thread_join
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c: In function ‘process_clock_sync_args’:
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:2155:13: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration]
 2155 |         if (strcmp(argv[i], "off") == 0) {
      |             ^~~~~~
/home/marten/lf-lang/reactor-c/core/federated/RTI/rti.c:2155:13: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’
make[2]: *** [CMakeFiles/RTI.dir/build.make:76: CMakeFiles/RTI.dir/rti.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/RTI.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

@cmnrd
Copy link
Contributor

@cmnrd cmnrd commented on 408b61d Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a fix here: #171

Please sign in to comment.