From: SourceForge.net <no...@so...> - 2011-05-19 13:44:50
|
Bugs item #1486366, was opened at 2006-05-11 12:04 Message generated for change (Comment added) made by dmichelsen You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1486366&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: build/test Group: solaris Status: Open Resolution: None Priority: 6 Private: No Submitted By: Thomas Anders (tanders) Assigned to: Nobody/Anonymous (nobody) Summary: largefile support breaks the build Initial Comment: Building the agent with largefile support (usually "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64") breaks the build (at compile time, not configure time) in all CVS branches. This especially prevents us from being able to turn on embedded perl by default, since perl is usually compiled with largefile support which breaks the net-snmp build. Example compile errors on Solaris: "/usr/include/sys/swap.h", line 50: #error: "Cannot use swapctl in the large files compilation environment" cc: acomp failed for /home/anders/src/net-snmp-5.3.1.pre1/agent/mibgroup/ucd-snmp/memory_solaris2.c /usr/include/sys/procfs.h:43:2: error: #error "Cannot use procfs in the large file compilation environment" gmake[2]: *** [host/hr_swrun.lo] Error 1 A workaround is to "configure --with-out-mib-modules=host,ucd_snmp" (tested successfully on Solaris), but this is hardly acceptable as it results in very limited agent functionality. Please also see bug 1347709 ("snmpd doesnt handle large log files (>= 2GB) gracefully") and README.solaris for further information on largefile issues. ---------------------------------------------------------------------- Comment By: Dagobert Michelsen (dmichelsen) Date: 2011-05-19 15:44 Message: If I read lfcompile64(5) correctly it should be possible to build a Perl in 64 bit which always has largefiles enabled. As the header files for kernel access now work in a sane way it should be possible to embed this perl in a 64 bit netsnmp, right? Best regards -- Dago ---------------------------------------------------------------------- Comment By: James Holtom (jholtom) Date: 2010-07-16 00:26 Message: If you need to go to a newer version, v5.4.3 (as taken from sourceforge source code), can also be persuaded to do largefile/embedded -- again at the cost of MIBs. You'll need to hack-out the largefile checks in configure: --- net-snmp-5.4.3/configure Sun May 23 14:10:00 2010 +++ net-snmp-5.4.3/configure Mon Jul 12 05:57:45 2010 @@ -32215,25 +32215,25 @@ # check the compiler flags for illegal tokens case $target_os in solaris*) - if test "x$embed_perl" != "xno" ; then - # - # Perl cc checks - # - echo "$as_me:$LINENO: checking for problematic Perl cc flags on Suns" >&5 -echo $ECHO_N "checking for problematic Perl cc flags on Suns... $ECHO_C" >&6 - if $myperl -V:ccflags | grep LARGEFILE > /dev/null ; then - if test "x$embed_perl" = "xtry" ; then - embed_perl="no" - else - { { echo "$as_me:$LINENO: error: Perl was compiled with LARGEFILE support which will break Net-SNMP. Either set the environment variable PERLPROG to a different perl binary or use --disable-embedded-perl to turn off embedded Perl functionality altogether." >&5 -echo "$as_me: error: Perl was compiled with LARGEFILE support which will break Net-SNMP. Either set the environment variable PERLPROG to a different perl binary or use --disable-embedded-perl to turn off embedded Perl functionality altogether." >&2;} - { (exit 1); exit 1; }; } - fi - else - echo "$as_me:$LINENO: result: none known" >&5 -echo "${ECHO_T}none known" >&6 - fi - fi +# if test "x$embed_perl" != "xno" ; then +# # +# # Perl cc checks +# # +# echo "$as_me:$LINENO: checking for problematic Perl cc flags on Suns" >&5 +#echo $ECHO_N "checking for problematic Perl cc flags on Suns... $ECHO_C" >&6 +# if $myperl -V:ccflags | grep LARGEFILE > /dev/null ; then +# if test "x$embed_perl" = "xtry" ; then +# embed_perl="no" +# else +# { { echo "$as_me:$LINENO: error: Perl was compiled with LARGEFILE support which will break Net-SNMP. Either set the environment variable PERLPROG to a different perl binary or use --disable-embedded-perl to turn off embedded Perl functionality altogether." >&5 +#echo "$as_me: error: Perl was compiled with LARGEFILE support which will break Net-SNMP. Either set the environment variable PERLPROG to a different perl binary or use --disable-embedded-perl to turn off embedded Perl functionality altogether." >&2;} +# { (exit 1); exit 1; }; } +# fi +# else +# echo "$as_me:$LINENO: result: none known" >&5 +#echo "${ECHO_T}none known" >&6 +# fi +# fi ;; *) And then configure using: configure --prefix=/usr/local --with-mib-modules="smux mibII/mta_sendmail" --with-defaults --enable-ipv6 --with-out-mib-modules="ucd_snmp host mibII/ipv6 ucd_snmp/memory ucd_snmp/memory_solaris2 ucd_snmp/proc host/hr_swrun host/hr_storage" --with-perl-modules --enable-embedded-perl --disable-perl-cc-checks --enable-shared Which compiled and worked for me. ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2006-05-22 11:56 Message: Logged In: YES user_id=848638 One workaround (if you prefer largefile/embedded perl support over other agent functionality) is to: configure --with-out-mib-modules=ucd-snmp/memory,ucd-snmp/memory_solaris2,ucd-snmp/proc,host/hr_swrun,host/hr_storage Tested on Solaris 10/SPARC with 5.3.x CVS. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=1486366&group_id=12694 |