onioncat icon indicating copy to clipboard operation
onioncat copied to clipboard

Compile fails

Open yacylover opened this issue 6 months ago • 11 comments

Hi,

I'm having an issue compiling onioncat.

gcc -DHAVE_CONFIG_H -I. -I.. -DSYSCONFDIR=\"/usr/local/etc\" -DSTATEDIR=\"/usr/local/var/onioncat\" -Wall -Wextra -O2 -pthread -MT ocattun.o -MD -MP -MF .deps/ocattun.Tpo -c -o ocattun.o ocattun.c ocattun.c: In function ‘tun_ipv6_config’: ocattun.c:344:21: error: storage size of ‘ifr6’ isn’t known ocattun.c:344:21: warning: unused variable ‘ifr6’ [-Wunused-variable] make[2]: *** [ocattun.o] Error 1 make[2]: Leaving directory /home/yacylover/Downloads/onioncat-master/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /home/yacylover/Downloads/onioncat-master' make: *** [all] Error 2

Can sonmeone help me please?

yacylover avatar Jun 09 '25 20:06 yacylover

Can you please add some details. What OS are your trying to compile this? Did you use the Package and run ./configure?

rahra avatar Jun 10 '25 05:06 rahra

Thank you for fast reply. I'm on OpenSuse Linux 12.1 (x86). Yes I just pulled the code from the repository here. ./configure runs through sucessfully. Unfortunately I'm unable to upgrade to a newer OS because I rely on some old versions of ham radio software

yacylover avatar Jun 10 '25 06:06 yacylover

ocattun.c:344:21: error: storage size of ‘ifr6’ isn’t known This hints at a missing header file. Try adding #include <linux/ipv6.h> to the file ocattun.c.

rahra avatar Jun 10 '25 06:06 rahra

Thank you. Now this error is being thrown:

In file included from /usr/include/linux/ipv6.h:5:0, from ocattun.c:29: /usr/include/linux/in6.h:30:8: error: redefinition of ‘struct in6_addr’ /usr/include/netinet/in.h:198:8: note: originally defined here /usr/include/linux/in6.h:46:8: error: redefinition of ‘struct sockaddr_in6’ /usr/include/netinet/in.h:239:8: note: originally defined here /usr/include/linux/in6.h:54:8: error: redefinition of ‘struct ipv6_mreq’ /usr/include/netinet/in.h:275:8: note: originally defined here ocattun.c: In function ‘tun_alloc’: ocattun.c:598:7: warning: passing argument 2 of ‘tun_ipv6_config’ from incompatible pointer type [enabled by default] ocattun.c:322:5: note: expected ‘const struct in6_addr *’ but argument is of type ‘struct in6_addr *’ ocattun.c:613:7: warning: passing argument 2 of ‘tun_add_route’ from incompatible pointer type [enabled by default] ocattun.c:525:5: note: expected ‘const struct in6_addr *’ but argument is of type ‘const struct in6_addr *’ ocattun.c:613:7: warning: passing argument 4 of ‘tun_add_route’ from incompatible pointer type [enabled by default] ocattun.c:525:5: note: expected ‘const struct in6_addr *’ but argument is of type ‘struct in6_addr *’ make[2]: *** [ocattun.o] Error 1 make[2]: Leaving directory /home/yacylover/Downloads/onioncat-master/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /home/yacylover/Downloads/onioncat-master'

yacylover avatar Jun 10 '25 06:06 yacylover

Well probably there's some looping in the headers on this old system. Actually this header should already have been included from ocat.h so probably it's now a double include. It was just a try. Could you probably post the output of the configure script?

rahra avatar Jun 10 '25 06:06 rahra

Ok I just uploaded it to Pastebin

https://pastebin.com/ykYXWKdp

yacylover avatar Jun 10 '25 07:06 yacylover

Oh, I didn't mean the content of the configure script but what it outputs if you run it with ./configure.

rahra avatar Jun 10 '25 07:06 rahra

Ok here we go:

yacylover@heankaschde:~/Downloads/onioncat-master> ./configure configure: loading site script /usr/share/site/i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking whether ln -s works... yes checking build system type... i686-suse-linux-gnu checking host system type... i686-suse-linux-gnu checking for a sed that does not truncate output... /usr/bin/sed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking whether gcc is Clang... no checking whether pthreads work with "-pthread" and "-lpthread"... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking whether more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... no checking for library containing bind... none required checking for library containing inet_ntop... none required checking for ANSI C header files... yes checking for egrep... (cached) /usr/bin/grep -E checking for sys/types.h... yes checking for sys/wait.h... yes checking for sys/socket.h... yes checking for sys/stat.h... yes checking for netdb.h... yes checking for arpa/nameser.h... yes checking for arpa/nameser_compat.h... yes checking for netinet/in.h... yes checking for netinet/in_systm.h... yes checking for netinet/ip.h... yes checking for netinet/ip6.h... yes checking for netinet/in6.h... no checking for net/if.h... yes checking for net/if_tun.h... no checking for net/tun/if_tun.h... no checking for linux/if_tun.h... yes checking for linux/sockios.h... yes checking for linux/ipv6.h... no checking for endian.h... yes checking for sys/endian.h... no checking for netinet/icmp6.h... yes checking for net/ethernet.h... yes checking for netinet/if_ether.h... yes checking for netinet/ether.h... yes checking for netinet/udp.h... yes checking for sys/ethernet.h... no checking for fcntl.h... yes checking for time.h... yes checking for netinet6/in6_var.h... no checking for netinet6/nd6.h... no checking for pwd.h... yes checking for syslog.h... yes checking for resolv.h... yes checking for an ANSI C-conforming const... yes checking for struct ip6_hdr... yes checking for struct iphdr... yes checking for struct ip... yes checking for struct ifreq... yes checking for struct ifaliasreq... no checking for struct in6_ifreq... no checking for struct in6_aliasreq... no checking for struct sockaddr_in.sin_len... no checking for struct stat.st_mtim... yes checking for struct ether_header.ether_dhost.ether_addr_octet... no checking for strlcat... no checking for strlcpy... no checking for ether_ntoa... yes checking for ether_ntoa_r... yes checking for getpwnam_r... yes configure: creating ./config.status config.status: creating Makefile config.status: creating src/cygwin/Makefile config.status: creating src/Makefile config.status: creating man/Makefile config.status: creating i2p/Makefile config.status: creating doc/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands

yacylover avatar Jun 10 '25 10:06 yacylover

Additional note: I managed to compile one of the newer tor versions that support the v3 hidden services on this os.

yacylover avatar Jun 10 '25 15:06 yacylover

Is the error occurring in context of my very old Kernel version or are they any other dependencies responsible for the disruption of the compile process? @rahra Could you do me a favour and post a kernel version number where the build process sucessfully ran through?

yacylover avatar Jun 16 '25 18:06 yacylover

Sorry for late response. I'm not really sure what is missing but I'm pretty sure that is because of the old system since it compiles fine on most systems that I know of. Did you download a recent release of OnionCat? I'm asking because the output of your ./configure differs in many lines compared to what I see on my Linux with the current version of Onioncat. Actually I think it is some IPv6 definition missing or was rearranged to some other header files compared to your system.

rahra avatar Jul 13 '25 13:07 rahra