Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236441 - net-analyzer/net-snmp on g/fbsd
Summary: net-analyzer/net-snmp on g/fbsd
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Keywording (show other bugs)
Hardware: x86 FreeBSD
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords: KEYWORDREQ, PATCH
Depends on:
Blocks:
 
Reported: 2008-09-02 12:09 UTC by Dmitri Bogomolov
Modified: 2019-10-12 12:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
net-snmp-5.4.3.ebuild patch for libtool problem (net-snmp-5.4.3.ebuild_libtool.patch,512 bytes, patch)
2011-08-03 20:16 UTC, Dmitri Bogomolov
no flags Details | Diff
net-snmp-5.4.3.ebuild patch for libtool problem (net-snmp-5.4.3.ebuild.patch,625 bytes, patch)
2012-02-28 19:07 UTC, Dmitri Bogomolov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Bogomolov 2008-09-02 12:09:39 UTC
net-analyzer/net-snmp-5.4.1.1 builds without a problem with ACCEPT_KEYWORDS="x86" on my i686-gentoo-freebsd6.2

Reproducible: Always




I have USE="python ssl tcpd"
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2008-09-10 06:22:19 UTC
There is nothing for netmon to do here...
Comment 2 Alexis Ballier gentoo-dev 2008-09-25 10:24:35 UTC
fails with libtool 2.2 here:
ibtool_args+=: not found
libtool_args+=: not found
compile_command+=: not found
finalize_command+=: not found
libtool_args+=: not found
libtool_args+=: not found
libtool_args+=: not found
libtool_args+=: not found
libtool: link: i686-gentoo-freebsd7.0-gcc  -L/var/tmp/portage/net-analyzer/net-snmp-5.4.1.1/work/net-snmp-5.4.1.1/agent/.libs -L/var/tmp/portage/net-analyzer/net-snmp-5.4.1.1/work/net-snmp-5.4.1.1/agent/helpers/.libs -L/var/tmp/portage/net-analyzer/net-snmp-5.4.1.1/work/net-snmp-5.4.1.1/snmplib/.libs -L/var/tmp/portage/net-analyzer/net-snmp-5.4.1.1/work/net-snmp-5.4.1.1/snmplib -L/var/tmp/portage/net-analyzer/net-snmp-5.4.1.1/work/net-snmp-5.4.1.1/agent/helpers ./.libs/libnetsnmpagent.so helpers/.libs/libnetsnmphelpers.so ./.libs/libnetsnmpmibs.so /var/tmp/portage/net-analyzer/net-snmp-5.4.1.1/work/net-snmp-5.4.1.1/agent/helpers/.libs/libnetsnmphelpers.so /var/tmp/portage/net-analyzer/net-snmp-5.4.1.1/work/net-snmp-5.4.1.1/agent/.libs/libnetsnmpagent.so -lwrap -lkvm /var/tmp/portage/net-analyzer/net-snmp-5.4.1.1/work/net-snmp-5.4.1.1/snmplib/.libs/libnetsnmp.so ../snmplib/.libs/libnetsnmp.so -lcrypto
/usr/lib/gcc/i686-gentoo-freebsd7.0/4.2.4/../../../crt1.o: In function `_start':
(.text+0x81): undefined reference to `main'
collect2: ld returned 1 exit status
Comment 3 Javier Villavicencio (RETIRED) gentoo-dev 2008-09-26 02:32:27 UTC
See bug 235025, might be failing due to the same problem (autotool macro replacing $SHELL with /bin/sh).
Comment 4 Dmitri Bogomolov 2011-02-07 19:45:58 UTC
:( I can't build recent >=net-analyzer/net-snmp-5.4.2.1-r1 on g/fbsd-8.0.

Last words are:
making all in /var/tmp/portage/net-analyzer/net-snmp-5.4.3/work/net-snmp-5.4.3/snmplib
gmake[1]: Entering directory `/var/tmp/portage/net-analyzer/net-snmp-5.4.3/work/net-snmp-5.4.3/snmplib'
/bin/sh ../libtool  --mode=compile i686-gentoo-freebsd8.0-gcc -I../include -I.  -I../snmplib  -DNETSNMP_ENABLE_IPV6  -O2 -march=i686 -mtune=i686 -pipe -Ufreebsd8 -Dfreebsd8=freebsd8  -c -o snmp_client.lo snmp_client.c
base_compile+= i686-gentoo-freebsd8.0-gcc: not found
eval: base_compile+= -I../include: not found
base_compile+= -I.: not found
eval: base_compile+= -I../snmplib: not found
base_compile+= -DNETSNMP_ENABLE_IPV6: not found
base_compile+= -O2: not found
base_compile+= -march=i686: not found
base_compile+= -mtune=i686: not found
base_compile+= -pipe: not found
base_compile+= -Ufreebsd8: not found
base_compile+= -Dfreebsd8=freebsd8: not found
base_compile+= -c: not found
libtool: compile: you must specify a compilation command
libtool: compile: Try `libtool --help --mode=compile' for more information.
gmake[1]: *** [snmp_client.lo] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/net-analyzer/net-snmp-5.4.3/work/net-snmp-5.4.3/snmplib'
gmake: *** [subdirs] Error 1
emake failed
Comment 5 Dmitri Bogomolov 2011-08-03 20:16:40 UTC
Created attachment 281983 [details, diff]
net-snmp-5.4.3.ebuild patch for libtool problem

I think this is not really good fix. But something like this done in dev-libs/apr/apr-1.4.4 (bug 317527).
Comment 6 Dmitri Bogomolov 2012-02-28 19:07:54 UTC
Created attachment 303623 [details, diff]
net-snmp-5.4.3.ebuild patch for libtool problem

This patch like in bug 354151
Comment 7 Dmitri Bogomolov 2012-02-28 19:12:09 UTC
The next problem while compiling 5.4.3:

libtool: compile:  i686-gentoo-freebsd8.2-gcc -I../../include -I. -I../../agent -I../
../agent/mibgroup -I../../snmplib -O2 -march=i686 -mtune=i686 -pipe -Ufreebsd8 -Dfree
bsd8=freebsd8 -c host/hr_filesys.c -o host/hr_filesys.o >/dev/null 2>&1
/bin/bash ../../libtool  --mode=compile i686-gentoo-freebsd8.2-gcc -I../../include -I
. -I../../agent -I../../agent/mibgroup -I../../snmplib   -O2 -march=i686 -mtune=i686 
-pipe -Ufreebsd8 -Dfreebsd8=freebsd8  -c -o host/hr_swrun.lo host/hr_swrun.c
libtool: compile:  i686-gentoo-freebsd8.2-gcc -I../../include -I. -I../../agent -I../
../agent/mibgroup -I../../snmplib -O2 -march=i686 -mtune=i686 -pipe -Ufreebsd8 -Dfree
bsd8=freebsd8 -c host/hr_swrun.c  -fPIC -DPIC -o host/.libs/hr_swrun.o
host/hr_swrun.c: In function 'var_hrswrun':
host/hr_swrun.c:608:48: error: 'struct kinfo_proc' has no member named 'kp_proc'
host/hr_swrun.c:731:48: error: 'struct kinfo_proc' has no member named 'kp_proc'
host/hr_swrun.c:936:37: error: 'struct kinfo_proc' has no member named 'kp_proc'
host/hr_swrun.c:978:41: error: 'struct kinfo_proc' has no member named 'kp_proc'
host/hr_swrun.c:1085:47: error: 'struct kinfo_proc' has no member named 'kp_proc'
host/hr_swrun.c:1086:37: error: 'struct kinfo_proc' has no member named 'kp_proc'
host/hr_swrun.c:1087:37: error: 'struct kinfo_proc' has no member named 'kp_proc'
host/hr_swrun.c:1205:47: error: 'struct kinfo_proc' has no member named 'kp_eproc'
host/hr_swrun.c:1206:37: error: 'struct kinfo_proc' has no member named 'kp_eproc'
host/hr_swrun.c:1207:37: error: 'struct kinfo_proc' has no member named 'kp_eproc'
host/hr_swrun.c: In function 'Get_Next_HR_SWRun':
host/hr_swrun.c:1522:43: error: 'struct kinfo_proc' has no member named 'kp_proc'
host/hr_swrun.c:1523:52: error: 'struct kinfo_proc' has no member named 'kp_proc'
gmake[2]: *** [host/hr_swrun.lo] Error 1

And I can't find answer. But 5.6.1 seems to be more compatible.
Comment 8 Dmitri Bogomolov 2012-02-28 19:42:53 UTC
Compile errors in (In reply to comment #7)
> But 5.6.1 seems to be more compatible.

Compile errors more compatible with ~x86-fbsd keyworded software (:

libtool: link: i686-gentoo-freebsd8.2-gcc -fno-strict-aliasing -O2 -march=i686 -mtune=i686 -pipe -Ufreebsd8 -Dfreebsd8=freebsd8 -o .libs/agentxtrap .libs/agentxtrap.o -Wl,-O1 -Wl,--as-needed  -L/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/agent/.libs -L/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/snmplib/.libs -L/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/snmplib -L/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/agent ../agent/.libs/libnetsnmpmibs.so /var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/agent/.libs/libnetsnmpagent.so -ldevstat -lkvm ../agent/.libs/libnetsnmpagent.so /var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/snmplib/.libs/libnetsnmp.so -lwrap ../snmplib/.libs/libnetsnmp.so -lcrypto 
/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_read'
/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_geterr'
/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_close'
/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_openfiles'
collect2: ld returned 1 exit status
gmake[1]: *** [agentxtrap] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/net-analyzer/net-snmp-5.6.1/work/net-snmp-5.6.1/apps'
gmake: *** [subdirs] Error 1
emake failed

I think this is a bug 403589.
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-10-04 16:01:40 UTC
Can you see if this works with 5.7.2_rc3, and reopen if it's still not fixed? Thanks.
Comment 10 Dmitri Bogomolov 2012-10-04 18:46:13 UTC
(In reply to comment #9)
> Can you see if this works with 5.7.2_rc3, and reopen if it's still not
> fixed? Thanks.

I just installed it on g/fbsd-9.0. Will you keyword it?
Comment 11 Naohiro Aota gentoo-dev 2012-10-09 23:46:52 UTC
I got:

libtool: link: i686-gentoo-freebsd9.0-gcc -Wl,-O1 -Wl,--as-needed -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -march=native -pipe -fomit-frame-p
ointer -g -Ufreebsd9 -Dfreebsd9=freebsd9 -o .libs/snmpusm .libs/snmpusm.o -Wl,-O1 -Wl,--as-needed  ../snmplib/.libs/libnetsnmp.so -lcrypto -lm
libtool: link: i686-gentoo-freebsd9.0-gcc -Wl,-O1 -Wl,--as-needed -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -march=native -pipe -fomit-frame-p
ointer -g -Ufreebsd9 -Dfreebsd9=freebsd9 -o .libs/encode_keychange .libs/encode_keychange.o -Wl,-O1 -Wl,--as-needed  ../snmplib/.libs/libnetsnmp.so
 -lcrypto -lm
/var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3/agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_read'
/var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3/agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_geterr'
/var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3/agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_close'
/var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3/agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_openfiles'
collect2: error: ld returned 1 exit status
Comment 12 Dmitri Bogomolov 2012-10-10 06:16:16 UTC
(In reply to comment #11)
> I got:
> 
> libtool: link: i686-gentoo-freebsd9.0-gcc -Wl,-O1 -Wl,--as-needed
> -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -march=native -pipe
> -fomit-frame-p
> ointer -g -Ufreebsd9 -Dfreebsd9=freebsd9 -o .libs/snmpusm .libs/snmpusm.o
> -Wl,-O1 -Wl,--as-needed  ../snmplib/.libs/libnetsnmp.so -lcrypto -lm
> libtool: link: i686-gentoo-freebsd9.0-gcc -Wl,-O1 -Wl,--as-needed
> -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -march=native -pipe
> -fomit-frame-p
> ointer -g -Ufreebsd9 -Dfreebsd9=freebsd9 -o .libs/encode_keychange
> .libs/encode_keychange.o -Wl,-O1 -Wl,--as-needed 
> ../snmplib/.libs/libnetsnmp.so
>  -lcrypto -lm
> /var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3/
> agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_read'
> /var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3/
> agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_geterr'
> /var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3/
> agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_close'
> /var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3/
> agent/.libs/libnetsnmpagent.so: undefined reference to `kvm_openfiles'
> collect2: error: ld returned 1 exit status

It's weird. I had this result on 8.2, but on 9.0 net-analyzer/net-snmp-5.7.2_rc3 installed successfully.
Comment 13 Naohiro Aota gentoo-dev 2012-10-10 12:01:07 UTC
(In reply to comment #12)
> It's weird. I had this result on 8.2, but on 9.0
> net-analyzer/net-snmp-5.7.2_rc3 installed successfully.

Not so weird.

# emerge -pvt net-snmp
[ebuild  N     ] net-analyzer/net-snmp-5.7.2_rc3  USE="bzip2 ipv6 ssl tcpd zlib -X -doc (-elf) (-lm_sensors) -mfd-rewrites -minimal -mysql (-netlink) (-pci) 
ompat" 0 kB

# pwd
/var/tmp/portage/net-analyzer/net-snmp-5.7.2_rc3/work/net-snmp-5.7.2.rc3
# grep LAGENTLIBS configure.d/config_os_libs1 
NETSNMP_SEARCH_LIBS(kvm_read, kvm,,,, LAGENTLIBS)
NETSNMP_SEARCH_LIBS(kvm_openfiles, kvm,,,, LAGENTLIBS)

// we get -lkvm set here, but

# grep LAGENTLIBS configure.d/config_os_libs2
  LAGENTLIBS="$_wraplibs"

// overwritten by this code, and you get ...

# grep LAGENTLIBS config.log 
netsnmp_cv_func_kvm_openfiles_LAGENTLIBS='none required'
netsnmp_cv_func_kvm_read_LAGENTLIBS=-lkvm
LAGENTLIBS=' -lwrap'

So enabling tcp-wrapper on FreeBSD arise library detection error.
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-12 12:17:32 UTC
G/FBSD is dead.