SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using the current slackbuild for 3.14.7 and unable to compile apcups with snmp enabled. Getting the error
Code:
In file included from drv_powernet.c:27:
snmp.h:82: error: expected unqualified-id before numeric constant
snmp.h:82: error: expected ';' before numeric constant
drv_powernet.c: In function 'int powernet_check_comm_lost(UPSINFO*)':
drv_powernet.c:37: error: expected primary-expression before '*' token
drv_powernet.c:37: error: expected primary-expression before ')' token
drv_powernet.c:37: error: expected ',' or ';' before 'Sid'
drv_powernet.c: In function 'int powernet_snmp_ups_read_static_data(UPSINFO*)':
drv_powernet.c:164: error: expected primary-expression before '*' token
drv_powernet.c:164: error: expected primary-expression before ')' token
drv_powernet.c:164: error: expected ',' or ';' before 'Sid'
drv_powernet.c: In function 'int powernet_snmp_ups_read_volatile_data(UPSINFO*)':
drv_powernet.c:303: error: expected primary-expression before '*' token
drv_powernet.c:303: error: expected primary-expression before ')' token
drv_powernet.c:303: error: expected ',' or ';' before 'Sid'
make[4]: *** [.obj/drv_powernet.o] Error 1
make[3]: *** [all] Error 2
make[2]: *** [snmp_DIR] Error 2
make[1]: *** [drivers_DIR] Error 2
make: *** [src_DIR] Error 2
It compiles fine without snmp. I have net-snmp installed on slack64. The build also works fine on slack32-current with snmp. Anyone have luck with apcups on slack64?
Using the current slackbuild for 3.14.7 and unable to compile apcups with snmp enabled. Getting the error
Code:
In file included from drv_powernet.c:27:
snmp.h:82: error: expected unqualified-id before numeric constant
snmp.h:82: error: expected ';' before numeric constant
drv_powernet.c: In function 'int powernet_check_comm_lost(UPSINFO*)':
drv_powernet.c:37: error: expected primary-expression before '*' token
drv_powernet.c:37: error: expected primary-expression before ')' token
drv_powernet.c:37: error: expected ',' or ';' before 'Sid'
drv_powernet.c: In function 'int powernet_snmp_ups_read_static_data(UPSINFO*)':
drv_powernet.c:164: error: expected primary-expression before '*' token
drv_powernet.c:164: error: expected primary-expression before ')' token
drv_powernet.c:164: error: expected ',' or ';' before 'Sid'
drv_powernet.c: In function 'int powernet_snmp_ups_read_volatile_data(UPSINFO*)':
drv_powernet.c:303: error: expected primary-expression before '*' token
drv_powernet.c:303: error: expected primary-expression before ')' token
drv_powernet.c:303: error: expected ',' or ';' before 'Sid'
make[4]: *** [.obj/drv_powernet.o] Error 1
make[3]: *** [all] Error 2
make[2]: *** [snmp_DIR] Error 2
make[1]: *** [drivers_DIR] Error 2
make: *** [src_DIR] Error 2
It compiles fine without snmp. I have net-snmp installed on slack64. The build also works fine on slack32-current with snmp. Anyone have luck with apcups on slack64?
in apcupsd.SlackBuild, change:
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
fi
to
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -DNETSNMP_NO_LEGACY_DEFINITIONS=1"
LIBDIRSUFFIX="64"
fi
Thanks for the help. Any reason why MIB is defined differently in Slack64. Or is this a question for Pat himself?
We'd need to poke through the net-snmp headers a little deeper to know for sure, but I noticed a couple of other 64 bit platforms make the same definition (-DNETSNMP_NO_LEGACY_DEFINITIONS=1). I would shoot the package maintainer a message, he'll probably spot the problem right away.
I'll try to get this worked around in the script soonish. Based on what I see in the current cvs code for apcupsd, it looks like the author is planning to use an internal "minisnmp" library for future releases, so I don't see much reason to even bother with trying to find a "better" fix.
I'll try to get this worked around in the script soonish. Based on what I see in the current cvs code for apcupsd, it looks like the author is planning to use an internal "minisnmp" library for future releases, so I don't see much reason to even bother with trying to find a "better" fix.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.