dtorkin

Untitled

May 20th, 2025
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.64 KB | None | 0 0
  1. dtorkin@ubuntu1:~/Desktop/practice$ make
  2. Compiling uvm/uvm_main.c...
  3. gcc -Wall -Wextra -g -Iprotocol -Iio -Isvm -Iuvm -Iconfig -Iutils -pthread -c -o uvm/uvm_main.o uvm/uvm_main.c
  4. uvm/uvm_main.c: In function ‘main’:
  5. uvm/uvm_main.c:388:12: error: redeclaration of ‘request’ with no linkage
  6. 388 | UvmRequest request; // Для формирования запросов
  7. | ^~~~~~~
  8. uvm/uvm_main.c:348:16: note: previous declaration of ‘request’ with type ‘UvmRequest’
  9. 348 | UvmRequest request;
  10. | ^~~~~~~
  11. uvm/uvm_main.c:409:37: error: ‘MAX_SVM_CONFIGS’ undeclared (first use in this function)
  12. 409 | if (svm_id >= 0 && svm_id < MAX_SVM_CONFIGS) {
  13. | ^~~~~~~~~~~~~~~
  14. uvm/uvm_main.c:409:37: note: each undeclared identifier is reported only once for each function it appears in
  15. uvm/uvm_main.c:486:59: error: request for member ‘init_channel_sent’ in something not a structure or union
  16. 486 | recv_msg_num, svm_id, link->init_channel_sent, link->confirm_init_received);
  17. | ^~
  18. uvm/uvm_main.c:486:84: error: request for member ‘confirm_init_received’ in something not a structure or union
  19. 486 | recv_msg_num, svm_id, link->init_channel_sent, link->confirm_init_received);
  20. | ^~
  21.  
  22. uvm/uvm_main.c:492:18: error: ‘msg’ undeclared (first use in this function)
  23. 492 | else if (msg->header.message_type == MESSAGE_TYPE_PODTVERZHDENIE_KONTROLYA) {
  24. | ^~~
  25. uvm/uvm_main.c:495:17: error: ‘svm_id’ undeclared (first use in this function)
  26. 495 | if (svm_id >= 0 && svm_id < MAX_SVM_CONFIGS) {
  27. | ^~~~~~
  28. uvm/uvm_main.c:499:101: error: ‘recv_msg_num’ undeclared (first use in this function)
  29. 499 | : 'Podtverzhdenie Kontrolya' (SVM Num %u) OK for SVM ID %d.\n", recv_msg_num, svm_id);
  30. | ^~~~~~~~~~~~
  31.  
  32. uvm/uvm_main.c:392:10: warning: variable ‘activity_in_iteration’ set but not used [-Wunused-but-set-variable]
  33. 392 | bool activity_in_iteration = false; // Был ли какой-то обмен или действие
  34. | ^~~~~~~~~~~~~~~~~~~~~
  35. uvm/uvm_main.c:548:13: error: ‘activity_in_iteration’ undeclared (first use in this function)
  36. 548 | activity_in_iteration = true; // Будет действие отправки
  37. | ^~~~~~~~~~~~~~~~~~~~~
  38. uvm/uvm_main.c:550:48: error: ‘msg_counters’ undeclared (first use in this function); did you mean ‘msg_num_counter’?
  39. 550 | uint16_t current_msg_num_for_svm = msg_counters[i]; // Берем счетчик для этого SVM
  40. | ^~~~~~~~~~~~
  41. | msg_num_counter
  42. uvm/uvm_main.c:629:13: error: ‘message_received_in_this_iteration’ undeclared (first use in this function)
  43. 629 | if(!message_received_in_this_iteration && uvm_keep_running){
  44. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45. uvm/uvm_main.c:334:5: error: label ‘cleanup_connections’ used but not defined
  46. 334 | if (pthread_create(&sender_tid, NULL, uvm_sender_thread_func, NULL) != 0) { /*...*/ goto cleanup_connections; }
  47. | ^~
  48. uvm/uvm_main.c:329:5: error: label ‘cleanup_queues’ used but not defined
  49. 329 | if (active_svm_count == 0) { /*...*/ goto cleanup_queues; }
  50. | ^~
  51. uvm/uvm_main.c:285:5: error: label ‘cleanup_mutexes’ used but not defined
  52. 285 | if (num_svms_to_run == 0) { /*...*/ goto cleanup_mutexes; }
  53. | ^~
  54. uvm/uvm_main.c:245:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
  55. 245 | int main(int argc, char *argv[] __attribute__((unused)) ) { // argv пока не используется
  56. | ~~~~^~~~
  57. uvm/uvm_main.c: At top level:
  58. uvm/uvm_main.c:634:12: error: expected declaration specifiers or ‘...’ before string constant
  59. 634 | printf("UVM: Shutdown initiated by main loop exit or signal...\n");
  60. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61. uvm/uvm_main.c:637:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
  62. 637 | cleanup_connections: // Метка для goto, если не все потоки стартанули
  63. | ^
  64. uvm/uvm_main.c:640:5: error: expected identifier or ‘(’ before ‘if’
  65. 640 | if (uvm_outgoing_request_queue) {
  66. | ^~
  67. uvm/uvm_main.c:645:5: error: expected identifier or ‘(’ before ‘if’
  68. 645 | if (uvm_incoming_response_queue) uvq_shutdown(uvm_incoming_response_queue);
  69. | ^~
  70. uvm/uvm_main.c:647:24: error: expected declaration specifiers or ‘...’ before ‘&’ token
  71. 647 | pthread_mutex_lock(&uvm_send_counter_mutex);
  72. | ^
  73. uvm/uvm_main.c:648:5: warning: data definition has no type or storage class
  74. 648 | uvm_outstanding_sends = 0;
  75. | ^~~~~~~~~~~~~~~~~~~~~
  76. uvm/uvm_main.c:648:5: warning: type defaults to ‘int’ in declaration of ‘uvm_outstanding_sends’ [-Wimplicit-int]
  77. uvm/uvm_main.c:648:5: error: conflicting type qualifiers for ‘uvm_outstanding_sends’
  78. uvm/uvm_main.c:41:14: note: previous definition of ‘uvm_outstanding_sends’ with type ‘int’
  79. 41 | volatile int uvm_outstanding_sends = 0; // Пока не используется активно
  80. | ^~~~~~~~~~~~~~~~~~~~~
  81. uvm/uvm_main.c:649:28: error: expected declaration specifiers or ‘...’ before ‘&’ token
  82. 649 | pthread_cond_broadcast(&uvm_all_sent_cond);
  83. | ^
  84. uvm/uvm_main.c:650:26: error: expected declaration specifiers or ‘...’ before ‘&’ token
  85. 650 | pthread_mutex_unlock(&uvm_send_counter_mutex);
  86. | ^
  87. uvm/uvm_main.c:652:24: error: expected declaration specifiers or ‘...’ before ‘&’ token
  88. 652 | pthread_mutex_lock(&gui_socket_mutex);
  89. | ^
  90. uvm/uvm_main.c:653:5: error: expected identifier or ‘(’ before ‘if’
  91. 653 | if (gui_listen_fd >= 0) { int fd=gui_listen_fd; gui_listen_fd=-1; shutdown(fd, SHUT_RDWR); close(fd); }
  92. | ^~
  93. uvm/uvm_main.c:654:5: error: expected identifier or ‘(’ before ‘if’
  94. 654 | if (gui_client_fd >= 0) { int fd=gui_client_fd; gui_client_fd=-1; shutdown(fd, SHUT_RDWR); close(fd); }
  95. | ^~
  96. uvm/uvm_main.c:655:26: error: expected declaration specifiers or ‘...’ before ‘&’ token
  97. 655 | pthread_mutex_unlock(&gui_socket_mutex);
  98. | ^
  99. uvm/uvm_main.c:657:12: error: expected declaration specifiers or ‘...’ before string constant
  100. 657 | printf("UVM: Closing SVM connections...\n");
  101. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  102. uvm/uvm_main.c:658:24: error: expected declaration specifiers or ‘...’ before ‘&’ token
  103. 658 | pthread_mutex_lock(&uvm_links_mutex);
  104. | ^
  105. uvm/uvm_main.c:659:5: error: expected identifier or ‘(’ before ‘for’
  106. 659 | for(int i=0; i<num_svms_to_run; ++i) {
  107. | ^~~
  108. uvm/uvm_main.c:659:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  109. 659 | for(int i=0; i<num_svms_to_run; ++i) {
  110. | ^
  111. uvm/uvm_main.c:659:37: error: expected identifier or ‘(’ before ‘++’ token
  112. 659 | for(int i=0; i<num_svms_to_run; ++i) {
  113. | ^~
  114. uvm/uvm_main.c:664:26: error: expected declaration specifiers or ‘...’ before ‘&’ token
  115. 664 | pthread_mutex_unlock(&uvm_links_mutex);
  116. | ^
  117. uvm/uvm_main.c:667:12: error: expected declaration specifiers or ‘...’ before string constant
  118. 667 | printf("UVM: Joining threads...\n");
  119. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  120. uvm/uvm_main.c:668:5: error: expected identifier or ‘(’ before ‘if’
  121. 668 | if (sender_tid != 0) pthread_join(sender_tid, NULL);
  122. | ^~
  123. uvm/uvm_main.c:669:12: error: expected declaration specifiers or ‘...’ before string constant
  124. 669 | printf("UVM: Sender thread joined.\n");
  125. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  126. uvm/uvm_main.c:670:5: error: expected identifier or ‘(’ before ‘for’
  127. 670 | for (int i = 0; i < num_svms_to_run; ++i) {
  128. | ^~~
  129. uvm/uvm_main.c:670:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  130. 670 | for (int i = 0; i < num_svms_to_run; ++i) {
  131. | ^
  132. uvm/uvm_main.c:670:42: error: expected identifier or ‘(’ before ‘++’ token
  133. 670 | for (int i = 0; i < num_svms_to_run; ++i) {
  134. | ^~
  135. uvm/uvm_main.c:675:12: error: expected declaration specifiers or ‘...’ before string constant
  136. 675 | printf("UVM: All receiver threads joined.\n");
  137. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  138. uvm/uvm_main.c:676:5: error: expected identifier or ‘(’ before ‘if’
  139. 676 | if (gui_server_tid != 0) pthread_join(gui_server_tid, NULL);
  140. | ^~
  141. uvm/uvm_main.c:677:12: error: expected declaration specifiers or ‘...’ before string constant
  142. 677 | printf("UVM: GUI server thread joined.\n");
  143. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  144. uvm/uvm_main.c:680:24: error: expected declaration specifiers or ‘...’ before ‘&’ token
  145. 680 | pthread_mutex_lock(&uvm_links_mutex);
  146. | ^
  147. uvm/uvm_main.c:681:5: error: expected identifier or ‘(’ before ‘for’
  148. 681 | for (int i = 0; i < MAX_SVM_INSTANCES; ++i) {
  149. | ^~~
  150. uvm/uvm_main.c:681:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  151. 681 | for (int i = 0; i < MAX_SVM_INSTANCES; ++i) {
  152. | ^
  153. uvm/uvm_main.c:681:44: error: expected identifier or ‘(’ before ‘++’ token
  154. 681 | for (int i = 0; i < MAX_SVM_INSTANCES; ++i) {
  155. | ^~
  156. uvm/uvm_main.c:690:26: error: expected declaration specifiers or ‘...’ before ‘&’ token
  157. 690 | pthread_mutex_unlock(&uvm_links_mutex);
  158. | ^
  159. uvm/uvm_main.c:691:12: error: expected declaration specifiers or ‘...’ before string constant
  160. 691 | printf("UVM: Connections and IO interfaces cleaned up.\n");
  161. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  162. uvm/uvm_main.c:693:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
  163. 693 | cleanup_queues:
  164. | ^
  165. uvm/uvm_main.c:695:5: error: expected identifier or ‘(’ before ‘if’
  166. 695 | if (uvm_incoming_response_queue) uvq_destroy(uvm_incoming_response_queue);
  167. | ^~
  168. uvm/uvm_main.c:696:12: error: expected declaration specifiers or ‘...’ before string constant
  169. 696 | printf("UVM: Queues destroyed.\n");
  170. | ^~~~~~~~~~~~~~~~~~~~~~~~~~
  171. uvm/uvm_main.c:698:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
  172. 698 | cleanup_mutexes:
  173. | ^
  174. uvm/uvm_main.c:700:27: error: expected declaration specifiers or ‘...’ before ‘&’ token
  175. 700 | pthread_mutex_destroy(&gui_socket_mutex);
  176. | ^
  177. uvm/uvm_main.c:701:27: error: expected declaration specifiers or ‘...’ before ‘&’ token
  178. 701 | pthread_mutex_destroy(&uvm_send_counter_mutex);
  179. | ^
  180. uvm/uvm_main.c:702:26: error: expected declaration specifiers or ‘...’ before ‘&’ token
  181. 702 | pthread_cond_destroy(&uvm_all_sent_cond);
  182. | ^
  183. uvm/uvm_main.c:703:12: error: expected declaration specifiers or ‘...’ before string constant
  184. 703 | printf("UVM: Mutexes and condvar destroyed.\n");
  185. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  186. uvm/uvm_main.c:705:12: error: expected declaration specifiers or ‘...’ before string constant
  187. 705 | printf("UVM Application finished.\n");
  188. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  189. uvm/uvm_main.c:706:5: error: expected identifier or ‘(’ before ‘return’
  190. 706 | return 0;
  191. | ^~~~~~
  192. uvm/uvm_main.c:707:1: error: expected identifier or ‘(’ before ‘}’ token
  193. 707 | }
  194. | ^
  195. make: *** [Makefile:43: uvm/uvm_main.o] Ошибка 1
Advertisement
Add Comment
Please, Sign In to add comment