[multicat-devel] State of FreeBSD support?
Alex Alex
win2000rus at hotmail.com
Tue Jul 5 20:31:32 CEST 2016
I managed to build multicat successfully after searching in multicat.c,
util.c, util.h all strings with __APPLE__ and replacing this fragment
with __FreeBSD__.
After it, in FreeBSD 9.x:
$ sudo env CFLAGS=-I/usr/local/include make multicat
cc -I/usr/local/include -Wall -Wformat-security -O3
-fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE
-D_BSD_SOURCE -g -c multicat.c
cc -I/usr/local/include -Wall -Wformat-security -O3
-fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE
-D_BSD_SOURCE -g -c util.c
cc -o multicat multicat.o util.o -lrt
$ sudo install multicat /usr/local/bin
$ sudo install multicat.1 /usr/local/share/man/man1
In FreeBSD 10.x I got an error:
$ sudo env CFLAGS=-I/usr/local/include make multicat
cc -I/usr/local/include -Wall -Wformat-security -O3
-fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE
-D_BSD_SOURCE -g -c multicat.c -o multicat.o
cc -I/usr/local/include -Wall -Wformat-security -O3
-fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE
-D_BSD_SOURCE -g -c util.c -o util.o
cc -o multicat multicat.o util.o -lrt
/usr/bin/ld: undefined reference to symbol
`pthread_setschedparam@@FBSD_1.0' (try adding -lthr)
//lib/libthr.so.3: could not read symbols: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make: stopped in /tmp/multicat-2.1
and managed to avoid it with:
sudo cc -o multicat multicat.o util.o -lthr
Alex.
05.07.2016 16:39, Ed Maste пишет:
> I see on Multicat's page that it should run on Linux, FreeBSD and OS
> X, but my attempt to build it failed on FreeBSD:
>
> In file included from multicat.c:59:
> ./util.h:62:19: error: field has incomplete type 'struct iphdr'
> struct iphdr iph;
> ^
> ./util.h:62:13: note: forward declaration of 'struct iphdr'
> struct iphdr iph;
> ^
> multicat.c:282:20: error: no member named 'len' in 'struct udphdr'
> pktheader.udph.len
> ~~~~~~~~~~~~~~ ^
>
> A quick glance at the source suggests it's using GNU's non-standard IP
> and UDP header definitions. I'm happy to look into it, but wanted to
> inquire about the state of FreeBSD support first. When did it last
> build on FreeBSD, and on which FreeBSD version?
>
> -Ed
> _______________________________________________
> multicat-devel mailing list
> multicat-devel at videolan.org
> https://mailman.videolan.org/listinfo/multicat-devel
> .
>
More information about the multicat-devel
mailing list