GithubHelp home page GithubHelp logo

Comments (6)

msune avatar msune commented on May 27, 2024

Can you please paste your gcc or clang version, whatever you are using?

For gcc please also paste g++ --version

from pmacct.

anandb-ripencc avatar anandb-ripencc commented on May 27, 2024
gcc --version
gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2.1.0.1)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ --version
g++ (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2.1.0.1)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

from pmacct.

msune avatar msune commented on May 27, 2024

I am unable to reproduce this error neither with the current HEAD nor v1.7.8 in an Orcale9 container:

marc@Mriya:~$ docker run -it oraclelinux:9 bash
... #install deps
[root@5262f62201dd /]# gcc --version
gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2.1.0.1)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@5262f62201dd /]# g++ --version
g++ (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2.1.0.1)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@5262f62201dd pmacct]# sh autogen.sh && ./configure 
autogen.sh: reconfigure with autoreconf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --force -I m4
autoreconf: configure.ac: tracing
autoreconf: 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: running: /usr/bin/autoconf --include=m4 --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:8: installing './compile'
configure.ac:6: installing './missing'
examples/custom/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'
autogen.sh: for the next step, run './configure' [or './configure --help' to check available options]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
...

config.status: executing libtool commands


[root@5262f62201dd pmacct]# make
Making all in src
gmake[1]: Entering directory '/tmp/pmacct/src'
gmake  all-recursive
gmake[2]: Entering directory '/tmp/pmacct/src'
Making all in external_libs
gmake[3]: Entering directory '/tmp/pmacct/src/external_libs'
[dep: libcdada] Checking...
[dep: libcdada] Cloning and checking out commit..
Submodule 'src/external_libs/libcdada' (https://github.com/msune/libcdada.git) registered for path 'src/external_libs/libcdada'
Cloning into '/tmp/pmacct/src/external_libs/libcdada'...
Submodule path 'src/external_libs/libcdada': checked out 'be47ae8cb14832e3401df4a8bc7a544f17fc170a'
[dep: libcdada] Syncing commit...
[dep: libcdada] Building...
aclocal: warning: couldn't open directory 'm4': No such file or directory
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/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'
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:16: installing 'build-aux/ar-lib'
configure.ac:9: installing 'build-aux/compile'
configure.ac:14: installing 'build-aux/config.guess'
configure.ac:14: installing 'build-aux/config.sub'
configure.ac:7: installing 'build-aux/install-sh'
configure.ac:7: installing 'build-aux/missing'
examples/Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
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 whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
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 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 for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking how to print strings... printf
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
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 archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
/tmp/pmacct/src/external_libs/libcdada/configure: line 8426: /usr/bin/file: No such file or directory
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux 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... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for a Python interpreter with version >= 3... python3
checking for python3... /usr/bin/python3
checking for python3 version... 3.9
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.9/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib64/python3.9/site-packages
checking whether to enable debug mode... no
checking whether to enable profiling mode... no
checking for git... yes
checking the build version... v0.5.0 (0.5.0)
checking the build number... 
checking for valgrind... no
checking whether RDTSC support is available... yes
checking whether to compile and run tests... yes
checking whether to compile examples... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating examples/Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating tools/Makefile
config.status: creating include/cdada/version.h
config.status: executing depfiles commands
config.status: executing libtool commands
make[4]: Entering directory '/tmp/pmacct/src/external_libs/libcdada/build'
Making install in include
make[5]: Entering directory '/tmp/pmacct/src/external_libs/libcdada/build/include'
make[6]: Entering directory '/tmp/pmacct/src/external_libs/libcdada/build/include'
make[6]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/tmp/pmacct/src/external_libs/rootfs/include'
 /usr/bin/mkdir -p '/tmp/pmacct/src/external_libs/rootfs/include/cdada'
 /usr/bin/install -c -m 644  cdada/version.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/bbitmap.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/list.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/list_custom_cc.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/map.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/map_custom_cc.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/queue.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/queue_custom_cc.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/set.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/set_custom_cc.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/stack.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/stack_custom_cc.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/str.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/utils.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/__common_internal.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/__list_internal.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/__map_internal.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/__queue_internal.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/__set_internal.h /tmp/pmacct/src/external_libs/libcdada/include/cdada/__stack_internal.h '/tmp/pmacct/src/external_libs/rootfs/include/cdada'
 /usr/bin/install -c -m 644  /tmp/pmacct/src/external_libs/libcdada/include/cdada.h '/tmp/pmacct/src/external_libs/rootfs/include/.'
make[6]: Leaving directory '/tmp/pmacct/src/external_libs/libcdada/build/include'
make[5]: Leaving directory '/tmp/pmacct/src/external_libs/libcdada/build/include'
Making install in src
make[5]: Entering directory '/tmp/pmacct/src/external_libs/libcdada/build/src'
  CXX      libcdada_la-bbitmap.lo
  CXX      libcdada_la-list.lo
  CXX      libcdada_la-map.lo
  CXX      libcdada_la-queue.lo
  CXX      libcdada_la-set.lo
  CXX      libcdada_la-stack.lo
  CXX      libcdada_la-str.lo
  CC       libcdada_la-utils.lo
  CXXLD    libcdada.la
make[6]: Entering directory '/tmp/pmacct/src/external_libs/libcdada/build/src'
 /usr/bin/mkdir -p '/tmp/pmacct/src/external_libs/rootfs/lib'
...

Where are you getting your copy of pmacct? If it is from git, can you output a git status.

from pmacct.

msune avatar msune commented on May 27, 2024

And please, print the output of cc --version and CPU arch

from pmacct.

anandb-ripencc avatar anandb-ripencc commented on May 27, 2024

I am using this tarball: http://www.pmacct.net/pmacct-1.7.8.tar.gz

I discovered that when building an RPM of pmacct, the build system sets certain hardening flags for the compiler and linker, which causes warnings to be treated as errors. Eventually, I figured out that I can use this in the SPEC file:

./autogen.sh
%configure --enable-jansson --enable-kafka CFLAGS="-g -O2" CXXFLAGS="-g -O2" LDFLAGS=""
make

This compiles pmacct using the barest minimum of compiler flags. During the build, some warnings are emitted, but they are no longer fatal failures. The RPM build completes successfully. I now have an RPM, and I'm going to see if I can install it and run pmacctd and sfacctd successfully.

from pmacct.

msune avatar msune commented on May 27, 2024

Can you share the RPM spec? I want to see what are those flags, to reproduce and fix the warning. Also, please let me know the CPU arch

from pmacct.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.