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

Unable to build on macos #16

Closed
imkwx opened this issue Apr 17, 2020 · 5 comments
Closed

Unable to build on macos #16

imkwx opened this issue Apr 17, 2020 · 5 comments

Comments

@imkwx
Copy link

imkwx commented Apr 17, 2020

Hello !

Today I tried to build gensio on macos, but it failed.

steps:

git clone;

autoreconf -i 
./configure
make

And here's the output of make :

/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in lib
  CC       gensio.lo
  CC       gensio_osops.lo
gensio_osops.c:897:37: error: use of undeclared identifier 'IPV6_ADD_MEMBERSHIP'
                rv = setsockopt(fd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP,
                                                  ^
gensio_osops.c:953:37: error: use of undeclared identifier 'IPV6_ADD_MEMBERSHIP'
                rv = setsockopt(fd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP,
                                                  ^
gensio_osops.c:1089:43: warning: passing 'gid_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign]
    getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroup);
                                          ^~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:650:43: note: passing argument to parameter here
int      getgrouplist(const char *, int, int *, int *);
                                              ^
gensio_osops.c:1095:46: warning: passing 'gid_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign]
        err = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroup);
                                                    ^~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:650:43: note: passing argument to parameter here
int      getgrouplist(const char *, int, int *, int *);
                                              ^
2 warnings and 2 errors generated.
make[2]: *** [gensio_osops.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Is it because it's trying to use macos building-tools and libraries?

Thanks!

@cminyard
Copy link
Owner

cminyard commented Apr 18, 2020 via email

@imkwx
Copy link
Author

imkwx commented Apr 18, 2020

Thanks for the quick answer!

I actually tried to build it on macos to test the tools out (gtlssh/d) because I'm trying to use it to provide an ssh to serial connection (with the help of ser2net?).

The idea behind it is to run it on a raspberry pi and to bridge not from serial to telnet but serial to ssh (and provide authentification). I also tried to play around with the library on a raspberry pi but could build it there too. Do I have to compile it on a linux box and then push it on the RPI?

Anyway, thanks for the help and have a good day!

@cminyard
Copy link
Owner

cminyard commented Apr 18, 2020 via email

@cminyard
Copy link
Owner

cminyard commented Apr 18, 2020 via email

@cminyard
Copy link
Owner

I added something that hopefully fixes the IPV6_ADD_MEMBERSHIP. The getgrouplist is just a warning, and if it's going to take an int instead of a gid_t for a group id, it deserves to get a warning.

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

2 participants