# bro 1.4 - pybroccoli error

**URL:** <https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414>\
**Category:** Zeek\
**Created:** [October 20, 2008, 3:10am UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414 "2008-10-20T03:10:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mel](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mel](https://community.zeek.org/u/mel)\
**Post date:** [October 20, 2008, 3:10am UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414/1 "2008-10-20T03:10:02Z")

</div>

Hi all,

On Freebsd 7:

bro-sensor# python -c 'import broccoli'  
Traceback (most recent call last):  
&nbsp;&nbsp;File "\<string\>", line 1, in \<module\>  
&nbsp;&nbsp;File "broccoli.py", line 6, in \<module\>  
&nbsp;&nbsp;&nbsp;&nbsp;from \_broccoli\_intern import \*  
ImportError: /usr/local/lib/python2.5/site-packages/\_broccoli\_intern.so:  
Undefined symbol "BIO\_ctrl"

This does not happen on Gentoo Linux.

--mel

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [October 20, 2008, 4:44pm UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414/2 "2008-10-20T16:44:36Z")

</div>

Are there different OpenSSL versions installed on these systems?  
Could you try one of the Broccoli test programs in aux/broccoli/test  
to see if the problem occurs without the Python bindings as well?

Robin

---

<div class="post-metadata">

**Author:** ![mel](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mel](https://community.zeek.org/u/mel)\
**Post date:** [October 21, 2008, 7:20am UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414/3 "2008-10-21T07:20:56Z")

</div>

Robin Sommer wrote:

> Are there different OpenSSL versions installed on these systems?

Freebsd: OpenSSL 0.9.8e 23 Feb 2007

Gentoo: OpenSSL 0.9.8h 28 May 2008

bro-1.4-prerelease does not have such errors on both systems.

> Could you try one of the Broccoli test programs in aux/broccoli/test  
> to see if the problem occurs without the Python bindings as well?

The test scripts fail on FreeBSD. The pybroccoli from svn also generates  
the same error on FreeBSD.

> Robin

--mel

---

<div class="post-metadata">

**Author:** ![mel](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mel](https://community.zeek.org/u/mel)\
**Post date:** [October 21, 2008, 7:44am UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414/4 "2008-10-21T07:44:11Z")

</div>

mel wrote:

> Freebsd: OpenSSL 0.9.8e 23 Feb 2007

I've built it using the latest OpenSSL from FreeBSD ports (0.8.9i), and  
it is still giving the same error.

--mel

---

<div class="post-metadata">

**Author:** ![mel](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mel](https://community.zeek.org/u/mel)\
**Post date:** [October 21, 2008, 10:38am UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414/5 "2008-10-21T10:38:53Z")

</div>

mel wrote:

> bro-sensor# python -c 'import broccoli'  
> Traceback (most recent call last):  
> &nbsp;&nbsp;File "\<string\>", line 1, in \<module\>  
> &nbsp;&nbsp;File "broccoli.py", line 6, in \<module\>  
> &nbsp;&nbsp;&nbsp;&nbsp;from \_broccoli\_intern import \*  
> ImportError: /usr/local/lib/python2.5/site-packages/\_broccoli\_intern.so:  
> Undefined symbol "BIO\_ctrl"

In Bro 1.4 release, running autogen.sh followed by the normal  
./configure fixes this issue.

--mel

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [October 21, 2008, 7:25pm UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414/6 "2008-10-21T19:25:54Z")

</div>

That's good to know, thanks! Not sure what the underlying problem is  
but we'll see if we can find something.

Robin

---

<div class="post-metadata">

**Author:** ![Christian\_Kreibich3](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@Christian\_Kreibich3](https://community.zeek.org/u/Christian_Kreibich3)\
**Post date:** [October 23, 2008, 12:02am UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414/7 "2008-10-23T00:02:03Z")

</div>

We have identified the cause of the problem. On FreeBSD 7, the libtool  
script we include in the Broccoli tree does not correctly create a .so  
symlink in the local build directory. This causes the Python module to  
be statically linked against Broccli, which in turn causes the  
additional dependencies of libssl and libcrypto to remain unresolved at  
runtime.

For the time being, re-running autogen.sh in aux/broccoli is the correct  
workaround. Alternatively you can apply this patch to  
aux/broccoli/bindings/python/setup.py:

--- setup.py~ 2008-07-14 19:17:59.000000000 -0400  
+++ setup.py 2008-10-21 19:55:53.000000000 -0400  
@@ -14,6 +14,6 @@  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ext\_modules = [  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extension("\_broccoli\_intern", ["broccoli\_intern\_wrap.c"],  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;library\_dirs=["../../src/.libs"],  
- libraries=["broccoli"])]  
+ libraries=["broccoli", "ssl", "crypto"])]  
)

We'll fix the issue in the 1.4.1 release.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:38pm UTC](https://community.zeek.org/t/bro-1-4-pybroccoli-error/1414/8 "2022-05-06T15:38:42Z")

</div>


