# Issues installing net-snmp on FreeBSD 9.0



## pmontero (Mar 6, 2013)

Hi,

Unable to solve this issue installing net-snmp on FreeBSD 9.0.

I've tried several advises and no success yet.

When doing 

```
cd /usr/ports/net-mgmt/net-snmp
make install clean
```
the building will stop at some point (always at the same point) with the following logs:

```
./.libs/libnetsnmpmibs.so: undefined reference to `_dmalloc_strncat'
./.libs/libnetsnmpagent.so: undefined reference to `_dmalloc_memcmp'
./.libs/libnetsnmpagent.so: undefined reference to `dmalloc_realloc'
./.libs/libnetsnmpagent.so: undefined reference to `_dmalloc_memcpy'
./.libs/libnetsnmpagent.so: undefined reference to `_dmalloc_strchr'
./.libs/libnetsnmpmibs.so: undefined reference to `_dmalloc_strcspn'
./.libs/libnetsnmpagent.so: undefined reference to `_dmalloc_strncasecmp'
*** Error code 1
Stop in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/agent.
*** Error code 1
Stop in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2.
*** Error code 1
Stop in /usr/ports/net-mgmt/net-snmp.
*** Error code 1
Stop in /usr/ports/net-mgmt/net-snmp.
```
How can I solve this, please?


----------



## SirDice (Mar 6, 2013)

What options did you enable?


----------



## pmontero (Mar 6, 2013)

SirDice said:
			
		

> What options did you enable?



I did not modify the options. I'm assuming I used the default options when issuing the `# make clean install`. I did try on another host and it did work.

What would be your recommendation?


----------



## SirDice (Mar 6, 2013)

Maybe there were some options already set, try doing a `# make rmconfig` to make sure the options are default.


----------



## pmontero (Mar 6, 2013)

SirDice said:
			
		

> Maybe there were some options already set, try doing a `# make rmconfig` to make sure the options are default.



I did and it started with the Options for net-snmp 5.7.2_1 but still when I ran the make install give me the same errors.

I did try with DMALLOW enable debugger enabled and without it and both times I have the same results

```
./.libs/libnetsnmpagent.so: undefined reference to `_dmalloc_memcmp'
./.libs/libnetsnmpagent.so: undefined reference to `dmalloc_realloc'
./.libs/libnetsnmpagent.so: undefined reference to `_dmalloc_memcpy'
./.libs/libnetsnmpagent.so: undefined reference to `_dmalloc_strchr'
./.libs/libnetsnmpmibs.so: undefined reference to `_dmalloc_strcspn'
./.libs/libnetsnmpagent.so: undefined reference to `_dmalloc_strncasecmp'
*** Error code 1

Stop in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2/agent.
*** Error code 1

Stop in /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.2.
*** Error code 1

Stop in /usr/ports/net-mgmt/net-snmp.
*** Error code 1
```


----------



## mix_room (Mar 6, 2013)

I would make sure that 'DMALLOC=off' is really set in the configuration, and then I would try reinstalling devel/dmalloc


----------



## pmontero (Mar 6, 2013)

Thanks guys.

I kept trying and I issue again:

```
> make rmconfig
> make reinstall
```
And the installation completed clean.

No idea.


----------



## SirDice (Mar 6, 2013)

pmontero said:
			
		

> And the installation completed clean.
> 
> No idea.


Must have been a glitch in the matrix.

Good to hear it's working now :beer


----------

