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

Getting error message when compiling #15

Open
achand007 opened this issue Dec 23, 2020 · 1 comment
Open

Getting error message when compiling #15

achand007 opened this issue Dec 23, 2020 · 1 comment
Assignees

Comments

@achand007
Copy link

Hi,
I get a compilation error at the last step when trying to build ingenialink. I have built libsercomm and libxml2 as required prior to building ingenialink. Please see the output below. Any ideas on how to fix this:

cmake --build _build
[  0%] Building C object CMakeFiles/ingenialink.dir/ingenialink/dict.c.o
In file included from /home/aneesh/src/ingenialink/ingenialink/dict.c:25:0:
/home/aneesh/src/ingenialink/ingenialink/dict.h:120:24: warning: redefinition of typedef ‘il_dict_t’ [-Wpedantic]
 typedef struct il_dict il_dict_t;
                        ^~~~~~~~~
In file included from /home/aneesh/src/ingenialink/ingenialink/dict.h:28:0,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.c:25:
/home/aneesh/src/ingenialink/include/public/ingenialink/dict.h:42:24: note: previous declaration of ‘il_dict_t’ was here
 typedef struct il_dict il_dict_t;
                        ^~~~~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c: In function ‘parse_reg_range’:
/home/aneesh/src/ingenialink/ingenialink/dict.c:473:32: error: too many arguments to function ‘strtof’
    reg->range.min.flt = (float)strtof(
                                ^~~~~~
In file included from /home/aneesh/src/ingenialink/include/public/ingenialink/common.h:30:0,
                 from /home/aneesh/src/ingenialink/include/public/ingenialink/dict_labels.h:28,
                 from /home/aneesh/src/ingenialink/include/public/ingenialink/dict.h:28,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.h:28,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.c:25:
/usr/include/stdlib.h:123:14: note: declared here
 extern float strtof (const char *__restrict __nptr,
              ^~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c:519:32: error: too many arguments to function ‘strtof’
    reg->range.max.flt = (float)strtof(
                                ^~~~~~
In file included from /home/aneesh/src/ingenialink/include/public/ingenialink/common.h:30:0,
                 from /home/aneesh/src/ingenialink/include/public/ingenialink/dict_labels.h:28,
                 from /home/aneesh/src/ingenialink/include/public/ingenialink/dict.h:28,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.h:28,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.c:25:
/usr/include/stdlib.h:123:14: note: declared here
 extern float strtof (const char *__restrict __nptr,
              ^~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c: In function ‘parse_reg_enums’:
/home/aneesh/src/ingenialink/ingenialink/dict.c:553:36: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness [-Wpointer-sign]
     reg->enums[index].value = atoi(value);
                                    ^~~~~
In file included from /home/aneesh/src/ingenialink/include/public/ingenialink/common.h:30:0,
                 from /home/aneesh/src/ingenialink/include/public/ingenialink/dict_labels.h:28,
                 from /home/aneesh/src/ingenialink/include/public/ingenialink/dict.h:28,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.h:28,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.c:25:
/usr/include/stdlib.h:104:12: note: expected ‘const char *’ but argument is of type ‘xmlChar * {aka unsigned char *}’
 extern int atoi (const char *__nptr)
            ^~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c:554:38: warning: pointer targets in passing argument 1 of ‘strdup’ differ in signedness [-Wpointer-sign]
     reg->enums[index].label = strdup(content);
                                      ^~~~~~~
In file included from /home/aneesh/src/ingenialink/include/klib/khash.h:129:0,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.h:34,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.c:25:
/usr/include/string.h:166:14: note: expected ‘const char *’ but argument is of type ‘xmlChar * {aka unsigned char *}’
 extern char *strdup (const char *__s)
              ^~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c:550:18: warning: unused variable ‘new_enum’ [-Wunused-variable]
    il_reg_enum_t new_enum;
                  ^~~~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c: In function ‘il_dict_create’:
/home/aneesh/src/ingenialink/ingenialink/dict.c:882:16: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
  dict->version = node_ver->children[0].content;
                ^
/home/aneesh/src/ingenialink/ingenialink/dict.c:923:30: warning: passing argument 3 of ‘parse_reg’ makes integer from pointer without a cast [-Wint-conversion]
    r = parse_reg(node, dict, &subnode);
                              ^
/home/aneesh/src/ingenialink/ingenialink/dict.c:623:12: note: expected ‘int’ but argument is of type ‘int *’
 static int parse_reg(xmlNodePtr node, il_dict_t *dict, int subnode)
            ^~~~~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c:952:36: warning: passing argument 3 of ‘parse_reg’ makes integer from pointer without a cast [-Wint-conversion]
      r = parse_reg(cur_node, dict, &subnode);
                                    ^
/home/aneesh/src/ingenialink/ingenialink/dict.c:623:12: note: expected ‘int’ but argument is of type ‘int *’
 static int parse_reg(xmlNodePtr node, il_dict_t *dict, int subnode)
            ^~~~~~~~~
In file included from /home/aneesh/src/ingenialink/ingenialink/dict.h:34:0,
                 from /home/aneesh/src/ingenialink/ingenialink/dict.c:25:
/home/aneesh/src/ingenialink/ingenialink/dict.c:1045:22: warning: passing argument 1 of ‘kh_destroy_reg_id’ from incompatible pointer type [-Wincompatible-pointer-types]
   kh_destroy(reg_id, dict->h_regs);
                      ^
/home/aneesh/src/ingenialink/include/klib/khash.h:446:47: note: in definition of macro ‘kh_destroy’
 #define kh_destroy(name, h) kh_destroy_##name(h)
                                               ^
/home/aneesh/src/ingenialink/include/klib/khash.h:215:13: note: expected ‘kh_reg_id_t * {aka struct kh_reg_id_s *}’ but argument is of type ‘kh_reg_id_t ** {aka struct kh_reg_id_s **}’
  SCOPE void kh_destroy_##name(kh_##name##_t *h)      \
             ^
/home/aneesh/src/ingenialink/include/klib/khash.h:363:2: note: in expansion of macro ‘__KHASH_IMPL’
  __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
  ^~~~~~~~~~~~
/home/aneesh/src/ingenialink/include/klib/khash.h:366:2: note: in expansion of macro ‘KHASH_INIT2’
  KHASH_INIT2(name, static kh_inline klib_unused, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
  ^~~~~~~~~~~
/home/aneesh/src/ingenialink/include/klib/khash.h:625:2: note: in expansion of macro ‘KHASH_INIT’
  KHASH_INIT(name, kh_cstr_t, khval_t, 1, kh_str_hash_func, kh_str_hash_equal)
  ^~~~~~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.h:50:1: note: in expansion of macro ‘KHASH_MAP_INIT_STR’
 KHASH_MAP_INIT_STR(reg_id, il_dict_reg_t)
 ^~~~~~~~~~~~~~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c:1051:1: warning: label ‘cleanup_h_axes’ defined but not used [-Wunused-label]
 cleanup_h_axes:
 ^~~~~~~~~~~~~~
/home/aneesh/src/ingenialink/ingenialink/dict.c:812:16: warning: unused variable ‘j’ [-Wunused-variable]
  int r = 0, i, j;
                ^
CMakeFiles/ingenialink.dir/build.make:62: recipe for target 'CMakeFiles/ingenialink.dir/ingenialink/dict.c.o' failed
make[2]: *** [CMakeFiles/ingenialink.dir/ingenialink/dict.c.o] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/ingenialink.dir/all' failed
make[1]: *** [CMakeFiles/ingenialink.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
@fcrevier
Copy link

I am getting the exact same errors when compiling the current master branch on Ubuntu 20.04LTS.
Is this being fixed or is there a workaround? I need to communicate with my Capitan XCR-C drive within a C/C++ program.
Thanks,
Felix

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

No branches or pull requests

4 participants