Modify

Opened 5 years ago

Closed 4 years ago

#13764 closed defect (fixed)

mini-snmpd: build error

Reported by: raver@… Owned by: florian
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: mini-snmpd Cc:

Description

Arch: ar71xx
Branch: trunk
Revision: r37034

Hi,
I'm getting this error when compiling mini-snmpd:

make[1]: Entering directory `/home/raver/OpenWrt/trunk'
make[2]: Entering directory `/home/raver/OpenWrt/trunk/package/libs/toolchain'
if [ -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install
WARNING: skipping libssp -- package not selected
if [ -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libstdcpp" >> /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install
WARNING: skipping libthread-db -- package not selected
if [ -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "librt" >> /home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/pkginfo/toolchain.default.install
WARNING: skipping libgfortran -- package not selected
WARNING: skipping ldd -- package not selected
WARNING: skipping ldconfig -- package not selected
make[2]: Leaving directory `/home/raver/OpenWrt/trunk/package/libs/toolchain'
make[2]: Entering directory `/home/raver/OpenWrt/trunk/feeds/packages/net/mini_snmpd'
CFLAGS="-Os -pipe -march=24kc -mtune=24kc -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -D__IPV4__ -DSYSLOG  -I/home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/usr/include -I/home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/include -I/home/raver/OpenWrt/trunk/staging_dir/toolchain-mips_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/raver/OpenWrt/trunk/staging_dir/toolchain-mips_gcc-4.8-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -march=24kc -mtune=24kc -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -D__IPV4__ -DSYSLOG  -I/home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/usr/include -I/home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/include -I/home/raver/OpenWrt/trunk/staging_dir/toolchain-mips_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/raver/OpenWrt/trunk/staging_dir/toolchain-mips_gcc-4.8-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/usr/lib -L/home/raver/OpenWrt/trunk/staging_dir/target-mips_uClibc-0.9.33.2/lib -L/home/raver/OpenWrt/trunk/staging_dir/toolchain-mips_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/home/raver/OpenWrt/trunk/staging_dir/toolchain-mips_gcc-4.8-linaro_uClibc-0.9.33.2/lib " make   -C /home/raver/OpenWrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/mini_snmpd/. AR=mips-openwrt-linux-uclibc-ar AS="mips-openwrt-linux-uclibc-gcc -c -Os -pipe -march=24kc -mtune=24kc -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -D__IPV4__ -DSYSLOG " LD=mips-openwrt-linux-uclibc-ld NM=mips-openwrt-linux-uclibc-nm CC="mips-openwrt-linux-uclibc-gcc" GCC="mips-openwrt-linux-uclibc-gcc" CXX="mips-openwrt-linux-uclibc-g++" RANLIB=mips-openwrt-linux-uclibc-ranlib STRIP=mips-openwrt-linux-uclibc-strip OBJCOPY=mips-openwrt-linux-uclibc-objcopy OBJDUMP=mips-openwrt-linux-uclibc-objdump SIZE=mips-openwrt-linux-uclibc-size CROSS="mips-openwrt-linux-uclibc-" ARCH="mips" OFLAGS="-Os -pipe -march=24kc -mtune=24kc -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -D__IPV4__ -DSYSLOG" STRIP="/bin/true" INSTALL_ROOT="/home/raver/OpenWrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/mini_snmpd/ipkg-install" mini_snmpd;
make[3]: Entering directory `/home/raver/OpenWrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/mini_snmpd'
mips-openwrt-linux-uclibc-gcc -c -Wall -Werror -DVERSION="\"1.2b\"" -DVENDOR="\".1.3.6.1.4.1\"" -Os -pipe -march=24kc -mtune=24kc -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -D__IPV4__ -DSYSLOG -D__TRAPS__ -D__LINUX__ mini_snmpd.c -o mini_snmpd.o
mini_snmpd.c: In function 'main':
mini_snmpd.c:446:31: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to remove the addressof? [-Werror=sizeof-pointer-memaccess]
   memset(&tv_sleep, 0, sizeof (&tv_sleep));
                               ^
cc1: all warnings being treated as errors
make[3]: *** [mini_snmpd.o] Error 1
make[3]: Leaving directory `/home/raver/OpenWrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/mini_snmpd'
make[2]: *** [/home/raver/OpenWrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/mini_snmpd/.built] Error 2
make[2]: Leaving directory `/home/raver/OpenWrt/trunk/feeds/packages/net/mini_snmpd'
make[1]: *** [package/feeds/packages/mini_snmpd/compile] Error 2
make[1]: Leaving directory `/home/raver/OpenWrt/trunk'
make: *** [package/mini_snmpd/compile] Error 2

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to assigned

This is a genuine warning here which needs fixing.

comment:2 Changed 4 years ago by kfs@…

This is a very common error that just needs the & removed from the sizeof argument

memset(&tv_sleep, 0, sizeof (tv_sleep));

I am finding this on trunk today, six months later!

How does one get commit privs?

comment:3 Changed 4 years ago by florian

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in r39901

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.