-
Notifications
You must be signed in to change notification settings - Fork 26
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
Comments
On Fri, Apr 17, 2020 at 05:46:39AM -0700, Robin wrote:
Hello !
Today I tried to build gensio on macos, but it failed.
steps:
git clone;
```shell
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,
^
Hmm, I wonder how macos supports multicast on IPV6. That's the standard
interface, I thought. But since it didn't complain about struct
ipv6_mreq, I imagine it just has a different name. I'm not sure what it
is, though.
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);
^~~~~~
Annoying, getgrouplist should take gid_t there.
/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?
Well, there's an old saying that there is no portable code, just code
that has been ported. Someone needs to spend the time to get it to
work on macos. It's just never been done. I don't have a macos
machine myself. But it shouldn't be too hard, and gensio_osops.c
*should* be the only place with issues.
…-corey
Thanks!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#16
|
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! |
On Sat, Apr 18, 2020 at 04:52:24AM -0700, Robin wrote:
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?).
gtlssh does not, unfortunately, provide an ssh-compatible connection.
It has its own protocol based on openssl. I was unable to find an ssh
library that I could easily integrate into gensio.
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?
You can compile on a RPI; I have one that I use. You have to have the
compilers and the proper dev packages installed, but it's not hard to
do.
Anyway, thanks for the help and have a good day!
No problem, and enjoy your weekend.
…-corey
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#16 (comment)
|
On Sat, Apr 18, 2020 at 08:40:17AM -0500, Corey Minyard wrote:
On Sat, Apr 18, 2020 at 04:52:24AM -0700, Robin wrote:
> 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?).
gtlssh does not, unfortunately, provide an ssh-compatible connection.
It has its own protocol based on openssl. I was unable to find an ssh
library that I could easily integrate into gensio.
I forgot to say that you could create a login on your system that just
runs gensio to connect it to a serial port. That way you can use ssh.
You can probably google about rbash (or rksh) for information on how to
do that. With rbash you can set the user's .profile to run a program
and then exit afterwards.
…-corey
>
> 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?
You can compile on a RPI; I have one that I use. You have to have the
compilers and the proper dev packages installed, but it's not hard to
do.
>
> Anyway, thanks for the help and have a good day!
No problem, and enjoy your weekend.
-corey
>
> --
> You are receiving this because you commented.
> Reply to this email directly or view it on GitHub:
> #16 (comment)
|
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. |
Hello !
Today I tried to build gensio on macos, but it failed.
steps:
git clone;
And here's the output of make :
Is it because it's trying to use macos building-tools and libraries?
Thanks!
The text was updated successfully, but these errors were encountered: