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

FreeBSD 13.1 compilation attempt #139

Closed
UlasSAYGINIM opened this issue May 25, 2022 · 8 comments
Closed

FreeBSD 13.1 compilation attempt #139

UlasSAYGINIM opened this issue May 25, 2022 · 8 comments

Comments

@UlasSAYGINIM
Copy link

it gave this error below when i want to compile. all necessary ports are installed before compilation.

it downloaded zip file 10 mins ago from github link : https://github.com/libnet/libnet/archive/refs/heads/master.zip 10


root@fbsd131:~/libnet/libnet-master # ./autogen.sh
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal --force --warnings=portability -I m4 ${ACLOCAL                                                                                                                                                             _FLAGS}
autoreconf-2.69: configure.ac: tracing
autoreconf-2.69: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf-2.69: running: /usr/local/bin/autoconf-2.69 --force --warnings=portab                                                                                                                                                             ility
autoreconf-2.69: running: /usr/local/bin/autoheader-2.69 --force --warnings=port                                                                                                                                                             ability
autoreconf-2.69: running: automake --add-missing --copy --force-missing --warnin                                                                                                                                                             gs=portability
configure.ac:48: installing './compile'
configure.ac:24: installing './config.guess'
configure.ac:24: installing './config.sub'
configure.ac:27: installing './install-sh'
configure.ac:27: installing './missing'
autoreconf-2.69: Leaving directory `.'
root@fbsd131:~/libnet/libnet-master # configure
configure: Command not found.
root@fbsd131:~/libnet/libnet-master # ./configure
checking for a POSIX-compliant shell... /bin/sh
checking for a sed that does not truncate output... /usr/bin/sed
checking for chmod... chmod
checking build system type... amd64-unknown-freebsd13.1
checking host system type... amd64-unknown-freebsd13.1
checking target system type... amd64-unknown-freebsd13.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... no
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 393216
checking how to convert amd64-unknown-freebsd13.1 file names to amd64-unknown-freebsd13.1 format... func_convert_file_noop
checking how to convert amd64-unknown-freebsd13.1 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd13.1 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking net/if.h usability... yes
checking net/if.h presence... yes
checking for net/if.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for gethostbyname2... yes
checking for getifaddrs... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for socklen_t... yes
checking whether byte ordering is bigendian... no
checking net/pfilt.h usability... no
checking net/pfilt.h presence... no
checking for net/pfilt.h... no
checking sys/net/nit.h usability... no
checking sys/net/nit.h presence... no
checking for sys/net/nit.h... no
checking net/raw.h usability... no
checking net/raw.h presence... no
checking for net/raw.h... no
checking sys/dlpi.h usability... no
checking sys/dlpi.h presence... no
checking for sys/dlpi.h... no
checking linux/socket.h usability... no
checking linux/socket.h presence... no
checking for linux/socket.h... no
checking link-layer packet interface type... found link layer bpf
checking for doxygen... no
configure: WARNING: doxygen not found - will not generate any doxygen documentation
checking for perl... /usr/local/bin/perl
checking whether to build sample programs... no
checking enable tests... no
checking FreeBSD version, is SOCK_RAW really raw?... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Doxyfile
config.status: creating libnet-config
config.status: creating doc/Makefile
config.status: creating doc/man/Makefile
config.status: creating doc/man/man1/Makefile
config.status: creating doc/man/man3/Makefile
config.status: creating include/Makefile
config.status: creating include/libnet.h
config.status: creating libnet.pc
config.status: creating src/Makefile
config.status: creating sample/Makefile
config.status: creating tests/Makefile
config.status: creating win32/Makefile
config.status: creating doc/fixmanpages
config.status: creating include/config.h
config.status: executing libtool commands

-=-=-=-=-=-=-=-=-=-= libnet Configuration Complete =-=-=-=-=-=-=-=-=-=-

    Version ....................... 1.3-dev

    Host .......................... amd64-unknown-freebsd13.1
    Operating System .............. freebsd13.1
    Host CPU ...................... amd64
    Host Vendor ................... unknown
    Host OS ....................... freebsd13.1
    Prefix ........................ /usr/local

    Cross-compiling ............... no
    Compiler is GNU (compatible) .. yes
    CC ............................ cc
    CFLAGS ........................ -g -O2 -D_DEFAULT_SOURCE=1
    LD ............................ /usr/bin/ld
    LDFLAGS .......................
    LIBS ..........................

    Link Layer .................... bpf
    Shared Libraries .............. yes
    Static Libraries .............. yes
    PIC ........................... yes
    Build Sample Programs ......... no
    Rebuild docs .................. no
    Tests.......................... no

To override options

        ./configure --help

Report bugs to https://github.com/libnet/libnet/issues

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
To disable silent build and print the full command line of every stage

        make V=1



root@fbsd131:~/libnet/libnet-master # make
Making all in include
make  all-am
Making all in src
  CC       libnet_asn1.lo
  CC       libnet_build_802.1q.lo
  CC       libnet_build_802.1x.lo
  CC       libnet_build_802.2.lo
  CC       libnet_build_802.3.lo
  CC       libnet_build_arp.lo
  CC       libnet_build_bgp.lo
  CC       libnet_build_cdp.lo
  CC       libnet_build_data.lo
  CC       libnet_build_dhcp.lo
  CC       libnet_build_dns.lo
  CC       libnet_build_ethernet.lo
  CC       libnet_build_fddi.lo
  CC       libnet_build_gre.lo
  CC       libnet_build_hsrp.lo
  CC       libnet_build_icmp.lo
  CC       libnet_build_igmp.lo
  CC       libnet_build_ip.lo
libnet_build_ip.c:257:16: error: use of undeclared identifier 'UINT32_MAX'
    if (src == UINT32_MAX)
               ^
1 error generated.
*** Error code 1

Stop.
make[1]: stopped in /root/libnet/libnet-master/src
*** Error code 1

Stop.
make: stopped in /root/libnet/libnet-master

@UlasSAYGINIM
Copy link
Author

i test latest release. it seems ok. but it says at the end it says : Making all in win32


root@fbsd131:~/libnet/libnet-1.2 # ./configure && make
checking for a POSIX-compliant shell... /bin/sh
checking for a sed that does not truncate output... /usr/bin/sed
checking for chmod... chmod
checking build system type... x86_64-unknown-freebsd13.1
checking host system type... x86_64-unknown-freebsd13.1
checking target system type... x86_64-unknown-freebsd13.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... no
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 393216
checking how to convert x86_64-unknown-freebsd13.1 file names to x86_64-unknown-freebsd13.1 format... func_convert_file_noop
checking how to convert x86_64-unknown-freebsd13.1 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd13.1 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking for gethostbyname2... yes
checking for getifaddrs... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for socklen_t... yes
checking whether byte ordering is bigendian... no
checking net/pfilt.h usability... no
checking net/pfilt.h presence... no
checking for net/pfilt.h... no
checking sys/net/nit.h usability... no
checking sys/net/nit.h presence... no
checking for sys/net/nit.h... no
checking net/raw.h usability... no
checking net/raw.h presence... no
checking for net/raw.h... no
checking sys/dlpi.h usability... no
checking sys/dlpi.h presence... no
checking for sys/dlpi.h... no
checking linux/socket.h usability... no
checking linux/socket.h presence... no
checking for linux/socket.h... no
checking link-layer packet interface type... found link layer bpf
checking for doxygen... no
configure: WARNING: doxygen not found - will not generate any doxygen documentation
checking for perl... /usr/local/bin/perl
checking whether to build sample programs... no
checking FreeBSD version, is SOCK_RAW really raw?... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Doxyfile
config.status: creating libnet-config
config.status: creating doc/Makefile
config.status: creating doc/man/Makefile
config.status: creating doc/man/man1/Makefile
config.status: creating doc/man/man3/Makefile
config.status: creating include/Makefile
config.status: creating include/libnet.h
config.status: creating libnet.pc
config.status: creating src/Makefile
config.status: creating sample/Makefile
config.status: creating win32/Makefile
config.status: creating doc/fixmanpages
config.status: creating include/config.h
config.status: executing libtool commands

-=-=-=-=-=-=-=-=-=-= libnet Configuration Complete =-=-=-=-=-=-=-=-=-=-

    Version ....................... 1.2

    Host .......................... x86_64-unknown-freebsd13.1
    Operating System .............. freebsd13.1
    Host CPU ...................... x86_64
    Host Vendor ................... unknown
    Host OS ....................... freebsd13.1
    Prefix ........................ /usr/local

    Cross-compiling ............... no
    Compiler is GCC ............... yes
    CC ............................ cc
    CFLAGS ........................ -g -O2
    LD ............................ /usr/bin/ld
    LDFLAGS .......................
    LIBS ..........................

    Link Layer .................... bpf
    Shared Libraries .............. yes
    Static Libraries .............. yes
    PIC ........................... yes
    Build Sample Programs ......... no
    Rebuild docs .................. no

To override options

        ./configure --help

Report bugs to https://github.com/libnet/libnet/issues

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
To disable silent build and print the full command line of every stage

        make V=1

Making all in include
make  all-am
Making all in src
  CC       libnet_asn1.lo
  CC       libnet_build_802.1q.lo
  CC       libnet_build_802.1x.lo
  CC       libnet_build_802.2.lo
  CC       libnet_build_802.3.lo
  CC       libnet_build_arp.lo
  CC       libnet_build_bgp.lo
  CC       libnet_build_cdp.lo
  CC       libnet_build_data.lo
  CC       libnet_build_dhcp.lo
  CC       libnet_build_dns.lo
  CC       libnet_build_ethernet.lo
  CC       libnet_build_fddi.lo
  CC       libnet_build_gre.lo
  CC       libnet_build_hsrp.lo
  CC       libnet_build_icmp.lo
  CC       libnet_build_igmp.lo
  CC       libnet_build_ip.lo
  CC       libnet_build_ipsec.lo
  CC       libnet_build_isl.lo
  CC       libnet_build_link.lo
  CC       libnet_build_mpls.lo
  CC       libnet_build_ntp.lo
  CC       libnet_build_ospf.lo
  CC       libnet_build_rip.lo
  CC       libnet_build_rpc.lo
  CC       libnet_build_sebek.lo
  CC       libnet_build_snmp.lo
  CC       libnet_build_stp.lo
  CC       libnet_build_tcp.lo
  CC       libnet_build_token_ring.lo
  CC       libnet_build_udp.lo
  CC       libnet_build_vrrp.lo
  CC       libnet_advanced.lo
  CC       libnet_checksum.lo
  CC       libnet_cq.lo
  CC       libnet_crc.lo
  CC       libnet_error.lo
  CC       libnet_if_addr.lo
  CC       libnet_init.lo
  CC       libnet_internal.lo
  CC       libnet_pblock.lo
  CC       libnet_port_list.lo
  CC       libnet_prand.lo
  CC       libnet_raw.lo
  CC       libnet_resolve.lo
  CC       libnet_version.lo
  CC       libnet_write.lo
  CC       libnet_link_bpf.lo
  CCLD     libnet.la
Making all in win32

@troglobit
Copy link
Collaborator

Thanks for the report, I'll have a look at it!

@troglobit
Copy link
Collaborator

There's something off on the main branch with including stdint.h on FreeBSD. If I include it manually in each source file that has this problem, it builds fine.

For now, use the released version, and ignore the Making all in win32 at the end, it's just the build system iterating over all possible build directories.

@UlasSAYGINIM
Copy link
Author

thank you for fast response. i am happy to see you are adding testing cases for libnet. i think it will be able to test on freebsd but release version does not have it. i should have github version to test it. for future release , does test section will be released?

There's something off on the main branch with including stdint.h on FreeBSD. @troglobit

how can i find them and make them on to test the branch? is it possible?

i also asked FreeBSD port update for latest version.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248484

i think with unit testing option we will be sure that freebsd can update the port to latest version. it will ease the job.

thank you.

@troglobit
Copy link
Collaborator

Yes, tests will be included in the next release.

I've not pushed the fixes yet, because stdint.h should've been picked up from common.h, which is already included and works on Linux with various C-libs. So, like I said, there's something off here and it needs to be investigated before a change is made.

Help investigating the root cause on FreeBSD would be very appreciated.

@UlasSAYGINIM
Copy link
Author

i dont know how to investigate but if you tell me what to change and look with tests. i can do that.
or better option in my opinion, if you can create another branch for freebsd and its tests. you can change the necessary files to set clib changes for FreeBSD 13.1.
i can compile from that branch and run the tests and send the results to you.

@troglobit
Copy link
Collaborator

No time to explain, the latest commit to master should work.

@UlasSAYGINIM
Copy link
Author

I will look when i have time to look. thank you for commit. have a nice day.

ivalery111 pushed a commit to ivalery111/libnet that referenced this issue May 31, 2022
stdint.h is required to get UINT32_MAX et al on FreeBSD, and possibly
other *BSD as well, not just Win32.  So moving this include to the
common include section.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
ivalery111 pushed a commit to ivalery111/libnet that referenced this issue Jun 1, 2022
stdint.h is required to get UINT32_MAX et al on FreeBSD, and possibly
other *BSD as well, not just Win32.  So moving this include to the
common include section.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
ivalery111 pushed a commit to ivalery111/libnet that referenced this issue Jun 1, 2022
stdint.h is required to get UINT32_MAX et al on FreeBSD, and possibly
other *BSD as well, not just Win32.  So moving this include to the
common include section.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
ivalery111 pushed a commit to ivalery111/libnet that referenced this issue Jun 1, 2022
stdint.h is required to get UINT32_MAX et al on FreeBSD, and possibly
other *BSD as well, not just Win32.  So moving this include to the
common include section.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
ivalery111 pushed a commit to ivalery111/libnet that referenced this issue Jun 1, 2022
stdint.h is required to get UINT32_MAX et al on FreeBSD, and possibly
other *BSD as well, not just Win32.  So moving this include to the
common include section.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
ivalery111 pushed a commit to ivalery111/libnet that referenced this issue Jun 16, 2022
stdint.h is required to get UINT32_MAX et al on FreeBSD, and possibly
other *BSD as well, not just Win32.  So moving this include to the
common include section.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants