-
Notifications
You must be signed in to change notification settings - Fork 156
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
[FreeBSD] Build failure whenever --enable-sessioncache specified (not related to missing ebtree) #297
Comments
Fix for the above has been added in PR #298. However, there's a new issue with the session cache code under FreeBSD, as it is trying to include a linux header for futex support:
This is because we unconditionally define USE_SYSCALL_FUTEX in Makefile.am/Makefile.in whenever enabling session cache. A proper fix would be to add autoconf magic to detect it. We must also conditionally link against pthread with USE_SYSCALL_FUTEX disabled. |
You'll also need to add: With the above changes, I was able to get a successful build of hitch with --enable-sessioncache. |
Hi zi0r, I've encountered the same problem a couple of months back. I tried to I agree with the need to add an option to the config file, something Of course, the latter could also be implemented under FreeBSD using |
I tracked this down to a07b7b6, this existed before we forked hitch off stud. |
The master branch should work now, please close if that's the case for you too or keep yelling at us! I only tried FreeBSD. |
I needed to add -lpthread to LDDFLAGS (though this could be because auto* stuff wasn't regenerated). The other odd thing was that I also needed to: before starting the actual build. Otherwise, I got this error:
Otherwise, I've got a successful build. Will try testing today. Thanks! |
Strange, I didn't have any of those problems on FreeBSD, can you please try building again but this time from either a clean checkout, or from a |
Will check it out--I had tried using 1.5.0 with the couple of patches applied on top of it. |
Any news here? Since it has been more than two weeks I will close this ticket. Please reopen if you are still experiencing problems. |
The compiler is unhappy with the abs() calls in hitch.c:464. Additionally, the multicast code at hitch.c:584 is referencing ifr_ifindex, which doesn't appear to exist under FreeBSD.
Build log:
=======================<phase: build >============================ ===> Building for hitch-1.5.0_1 /usr/bin/make all-recursive Making all in src/util cc -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/include -O2 -g -Wall -W -I/usr/include -O2 -pipe -fstack-protector -fno-strict-aliasing -MT parse_proxy_v2-parse_proxy_v2.o -MD -MP -MF .deps/parse_proxy_v2-parse_proxy_v2.Tpo -c -o parse_proxy_v2-parse_proxy_v2.o
test -f 'parse_proxy_v2.c' || echo './'parse_proxy_v2.c mv -f .deps/parse_proxy_v2-parse_proxy_v2.Tpo .deps/parse_proxy_v2-parse_proxy_v2.Po cc -O2 -g -Wall -W -I/usr/include -O2 -pipe -fstack-protector -fno-strict-aliasing -L/usr/local/lib -lcrypto -lssl -fstack-protector -o parse_proxy_v2 parse_proxy_v2-parse_proxy_v2.o Making all in src /usr/bin/make all-am cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -I/usr/include -O2 -pipe -fstack-protector -fno-strict-aliasing -MT libcfg_a-cfg_lex.o -MD -MP -MF .deps/libcfg_a-cfg_lex.Tpo -c -o libcfg_a-cfg_lex.o
test -f 'cfg_lex.c' || echo './'cfg_lex.c cfg_lex.c:1718:3: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cfg_lex.c:910:18: note: expanded from macro 'YY_INPUT' for ( n = 0; n < max_size && \ ~ ^ ~~~~~~~~ 1 warning generated. mv -f .deps/libcfg_a-cfg_lex.Tpo .deps/libcfg_a-cfg_lex.Po cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -I/usr/include -O2 -pipe -fstack-protector -fno-strict-aliasing -MT libcfg_a-cfg_parser.o -MD -MP -MF .deps/libcfg_a-cfg_parser.Tpo -c -o libcfg_a-cfg_parser.o
test -f 'cfg_parser.c' || echo './'cfg_parser.c mv -f .deps/libcfg_a-cfg_parser.Tpo .deps/libcfg_a-cfg_parser.Po rm -f libcfg.a ar cru libcfg.a libcfg_a-cfg_lex.o libcfg_a-cfg_parser.o ranlib libcfg.a depbase=
echo foreign/flopen.o | sed 's|[^/]$|.deps/&|;s|.o$||'; cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -O2 -pipe -fstack-protector -fno-strict-aliasing -MT foreign/flopen.o -MD -MP -MF $depbase.Tpo -c -o foreign/flopen.o foreign/flopen.c && mv -f $depbase.Tpo $depbase.Po depbase=
echo foreign/vas.o | sed 's|[^/]; cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -O2 -pipe -fstack-protector -fno-strict-aliasing -MT foreign/vas.o -MD -MP -MF $depbase.Tpo -c -o foreign/vas.o foreign/vas.c && mv -f $depbase.Tpo $depbase.Po depbase=
echo foreign/vpf.o | sed 's|[^/]$|.deps/&|;s|.o$||'; cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -O2 -pipe -fstack-protector -fno-strict-aliasing -MT foreign/vpf.o -MD -MP -MF $depbase.Tpo -c -o foreign/vpf.o foreign/vpf.c && mv -f $depbase.Tpo $depbase.Po depbase=
echo foreign/vsb.o | sed 's|[^/]; cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -O2 -pipe -fstack-protector -fno-strict-aliasing -MT foreign/vsb.o -MD -MP -MF $depbase.Tpo -c -o foreign/vsb.o foreign/vsb.c && mv -f $depbase.Tpo $depbase.Po depbase=
echo foreign/vsa.o | sed 's|[^/]*$|.deps/&|;s|.o$||'; cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -O2 -pipe -fstack-protector -fno-strict-aliasing -MT foreign/vsa.o -MD -MP -MF $depbase.Tpo -c -o foreign/vsa.o foreign/vsa.c && mv -f $depbase.Tpo $depbase.Po rm -f libforeign.a ar cru libforeign.a foreign/flopen.o foreign/vas.o foreign/vpf.o foreign/vsb.o foreign/vsa.o ranlib libforeign.a cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -I/usr/include -I/usr/include -I/usr/local/include -fno-strict-aliasing -Werror -DUSE_SYSCALL_FUTEX -Iebtree -O2 -pipe -fstack-protector -fno-strict-aliasing -MT hitch-asn_gentm.o -MD -MP -MF .deps/hitch-asn_gentm.Tpo -c -o hitch-asn_gentm.o
test -f 'asn_gentm.c' || echo './'asn_gentm.c mv -f .deps/hitch-asn_gentm.Tpo .deps/hitch-asn_gentm.Po cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -I/usr/include -I/usr/include -I/usr/local/include -fno-strict-aliasing -Werror -DUSE_SYSCALL_FUTEX -Iebtree -O2 -pipe -fstack-protector -fno-strict-aliasing -MT hitch-configuration.o -MD -MP -MF .deps/hitch-configuration.Tpo -c -o hitch-configuration.o
test -f 'configuration.c' || echo './'configuration.c mv -f .deps/hitch-configuration.Tpo .deps/hitch-configuration.Po cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -g -Wall -W -I/usr/include -I/usr/include -I/usr/local/include -fno-strict-aliasing -Werror -DUSE_SYSCALL_FUTEX -Iebtree -O2 -pipe -fstack-protector -fno-strict-aliasing -MT hitch-hitch.o -MD -MP -MF .deps/hitch-hitch.Tpo -c -o hitch-hitch.o
test -f 'hitch.c' || echo './'`hitch.chitch.c:464:9: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
if (!(abs((int)(int32_t)now - ntohl(encdate))
^
hitch.c:464:9: note: remove the call to 'abs' since unsigned values cannot be negative
if (!(abs((int)(int32_t)now - ntohl(encdate))
^~~
hitch.c:584:29: error: no member named 'ifr_ifindex' in 'struct ifreq'
mreqn.imr_ifindex = ifr.ifr_ifindex;
~~~ ^
2 errors generated.
*** Error code 1
Stop.
make[4]: stopped in /wrkdirs/usr/ports/security/hitch/work/hitch-1.5.0/src
*** Error code 1
Stop.
make[3]: stopped in /wrkdirs/usr/ports/security/hitch/work/hitch-1.5.0/src
*** Error code 1
Stop.
make[2]: stopped in /wrkdirs/usr/ports/security/hitch/work/hitch-1.5.0
*** Error code 1
Stop.
make[1]: stopped in /wrkdirs/usr/ports/security/hitch/work/hitch-1.5.0
*** Error code 1
Stop.
make: stopped in /usr/ports/security/hitch`
The text was updated successfully, but these errors were encountered: