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

include netinet/in.h #82

Merged
merged 2 commits into from
Aug 10, 2023
Merged

Conversation

kaiquekandykoga
Copy link
Contributor

FreeBSD is not finding IPPROTO_TCP identifier without netinet/in.h

[kandy@freebsd ~]$ gem install trilogy
Building native extensions. This could take a while... ERROR:  Error installing trilogy:
        ERROR: Failed to build gem native extension.

    current directory: /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1/ext/trilogy-ruby
/usr/home/kandy/.rubies/ruby-3.2.2/bin/ruby extconf.rb checking for CRYPTO_malloc() in -lcrypto... yes
checking for SSL_new() in -lssl... yes
checking for rb_interned_str() in ruby.h... yes
creating Makefile

current directory: /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1/ext/trilogy-ruby make DESTDIR\= sitearchdir\=./.gem.20230603-79859-at41zf sitelibdir\=./.gem.20230603-79859-at41zf clean

current directory: /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1/ext/trilogy-ruby make DESTDIR\= sitearchdir\=./.gem.20230603-79859-at41zf sitelibdir\=./.gem.20230603-79859-at41zf compiling trilogy.c
trilogy.c:2744:38: error: use of undeclared identifier 'IPPROTO_TCP'
            if (setsockopt(sock->fd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&flags, sizeof(flags)) < 0) {
                                     ^
trilogy.c:2752:38: error: use of undeclared identifier 'IPPROTO_TCP'
            if (setsockopt(sock->fd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&flags, sizeof(flags)) < 0) {
                                     ^
trilogy.c:2760:38: error: use of undeclared identifier 'IPPROTO_TCP'
            if (setsockopt(sock->fd, IPPROTO_TCP, TCP_KEEPCNT, (void *)&flags, sizeof(flags)) < 0) {
                                     ^
3 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1/ext/trilogy-ruby

make failed, exit code 1

Gem files will remain installed in /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1 for inspection. Results logged to /usr/home/kandy/.gem/ruby/3.2.2/extensions/x86_64-freebsd-13/3.2.0-static/trilogy-2.4.1/gem_make.out

kaiquekandykoga and others added 2 commits June 3, 2023 01:49
FreeBSD is not finding IPPROTO_TCP identifier without netinet/in.h

[kandy@freebsd ~]$ gem install trilogy
Building native extensions. This could take a while...
ERROR:  Error installing trilogy:
        ERROR: Failed to build gem native extension.

    current directory: /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1/ext/trilogy-ruby
/usr/home/kandy/.rubies/ruby-3.2.2/bin/ruby extconf.rb
checking for CRYPTO_malloc() in -lcrypto... yes
checking for SSL_new() in -lssl... yes
checking for rb_interned_str() in ruby.h... yes
creating Makefile

current directory: /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1/ext/trilogy-ruby
make DESTDIR\= sitearchdir\=./.gem.20230603-79859-at41zf sitelibdir\=./.gem.20230603-79859-at41zf clean

current directory: /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1/ext/trilogy-ruby
make DESTDIR\= sitearchdir\=./.gem.20230603-79859-at41zf sitelibdir\=./.gem.20230603-79859-at41zf
compiling trilogy.c
trilogy.c:2744:38: error: use of undeclared identifier 'IPPROTO_TCP'
            if (setsockopt(sock->fd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&flags, sizeof(flags)) < 0) {
                                     ^
trilogy.c:2752:38: error: use of undeclared identifier 'IPPROTO_TCP'
            if (setsockopt(sock->fd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&flags, sizeof(flags)) < 0) {
                                     ^
trilogy.c:2760:38: error: use of undeclared identifier 'IPPROTO_TCP'
            if (setsockopt(sock->fd, IPPROTO_TCP, TCP_KEEPCNT, (void *)&flags, sizeof(flags)) < 0) {
                                     ^
3 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1/ext/trilogy-ruby

make failed, exit code 1

Gem files will remain installed in /usr/home/kandy/.gem/ruby/3.2.2/gems/trilogy-2.4.1 for inspection.
Results logged to /usr/home/kandy/.gem/ruby/3.2.2/extensions/x86_64-freebsd-13/3.2.0-static/trilogy-2.4.1/gem_make.out
Copy link
Member

@jhawthorn jhawthorn left a comment

Choose a reason for hiding this comment

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

Thanks!

@jhawthorn jhawthorn merged commit b77a667 into trilogy-libraries:main Aug 10, 2023
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

Successfully merging this pull request may close these issues.

2 participants