# Bro 1.5.1 compile error on FreeBSD AMD64

**URL:** <https://community.zeek.org/t/bro-1-5-1-compile-error-on-freebsd-amd64/1625>\
**Category:** Zeek\
**Created:** [May 22, 2010, 1:19am UTC](https://community.zeek.org/t/bro-1-5-1-compile-error-on-freebsd-amd64/1625 "2010-05-22T01:19:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CS\_Lee](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@CS\_Lee](https://community.zeek.org/u/CS_Lee)\
**Post date:** [May 22, 2010, 1:19am UTC](https://community.zeek.org/t/bro-1-5-1-compile-error-on-freebsd-amd64/1625/1 "2010-05-22T01:19:16Z")

</div>

hi guys,

When I try to compile bro 1.5.1 on FreeBSD AMD64 platform, I hit this error -

building ‘\_broccoli\_intern’ extension  
cc -shared -pthread -L/usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs -I/usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src /usr/home/cslee/bro-source/bro-1.5.1/aux/broctl/.python-build/temp.freebsd-8.0-RELEASE-amd64-2.6/broccoli\_intern\_wrap.o -L…/…/src/.libs -lbroccoli -o /usr/home/cslee/bro-source/bro-1.5.1/aux/broctl/.python-build/lib.freebsd-8.0-RELEASE-amd64-2.6/\_broccoli\_intern.so  
/usr/bin/ld: /usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs/libbroccoli.a(bro.o): relocation R\_X86\_64\_32 can not be used when making a shared object; recompile with -fPIC  
/usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs/libbroccoli.a: could not read symbols: Bad value  
error: command ‘cc’ failed with exit status 1  
\*\*\* Error code 1

Anyway thanks to robin for pointed stuffs on bro log archive stuffs.

---

<div class="post-metadata">

**Author:** ![Kevin\_Lo](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@Kevin\_Lo](https://community.zeek.org/u/Kevin_Lo)\
**Post date:** [May 23, 2010, 9:43am UTC](https://community.zeek.org/t/bro-1-5-1-compile-error-on-freebsd-amd64/1625/2 "2010-05-23T09:43:23Z")

</div>

CS Lee wrote:

> hi guys,
> 
> When I try to compile bro 1.5.1 on FreeBSD AMD64 platform, I hit this  
> error -
> 
> building '\_broccoli\_intern' extension  
> cc -shared -pthread  
> -L/usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs  
> -I/usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src /usr/home/cslee/bro-source/bro-1.5.1/aux/broctl/.python-build/temp.freebsd-8.0-RELEASE-amd64-2.6/broccoli\_intern\_wrap.o -L../../src/.libs -lbroccoli -o /usr/home/cslee/bro-source/bro-1.5.1/aux/broctl/.python-build/lib.freebsd-8.0-RELEASE-amd64-2.6/\_broccoli\_intern.so  
> /usr/bin/ld: /usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs/libbroccoli.a(bro.o): relocation R\_X86\_64\_32 can not be used when making a shared object; recompile with -fPIC  
> /usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs/libbroccoli.a: could not read symbols: Bad value  
> error: command 'cc' failed with exit status 1  
> \*\*\* Error code 1
> 
> Anyway thanks to robin for pointed stuffs on bro log archive stuffs.

Could you try attached patch? Thanks!

> --  
> Best Regards,
> 
> CS Lee\<geek00L[at]gmail.com\>
> 
> [http://geek00l.blogspot.com](http://geek00l.blogspot.com)  
> [http://defcraft.net](http://defcraft.net)

Kevin

[patch-aux\_broctl\_Makefile\_in](https://community.zeek.org/uploads/short-url/bdkbB05iYYfLNXxmvcQLOs2t3I1) (482 Bytes)

---

<div class="post-metadata">

**Author:** ![CS\_Lee](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@CS\_Lee](https://community.zeek.org/u/CS_Lee)\
**Post date:** [May 23, 2010, 3:46pm UTC](https://community.zeek.org/t/bro-1-5-1-compile-error-on-freebsd-amd64/1625/3 "2010-05-23T15:46:35Z")

</div>

hi Kevin,

After patch is applied, same error popped up

broccoli\_intern\_wrap.c: In function ‘\_wrap\_bro\_event\_add\_val’:  
broccoli\_intern\_wrap.c:5585: warning: assignment discards qualifiers from pointer target type  
broccoli\_intern\_wrap.c: In function ‘\_wrap\_bro\_event\_set\_val’:  
broccoli\_intern\_wrap.c:5655: warning: assignment discards qualifiers from pointer target type  
broccoli\_intern\_wrap.c: In function ‘\_wrap\_bro\_record\_add\_val’:  
broccoli\_intern\_wrap.c:6810: warning: assignment discards qualifiers from pointer target type  
broccoli\_intern\_wrap.c: In function ‘\_wrap\_bro\_record\_set\_nth\_val’:  
broccoli\_intern\_wrap.c:6996: warning: assignment discards qualifiers from pointer target type  
broccoli\_intern\_wrap.c: In function ‘\_wrap\_bro\_record\_set\_named\_val’:  
broccoli\_intern\_wrap.c:7067: warning: assignment discards qualifiers from pointer target type  
cc -shared -pthread -L/usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs -I/usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src /usr/home/cslee/bro-source/bro-1.5.1/aux/broctl/.python-build/temp.freebsd-8.0-RELEASE-amd64-2.6/broccoli\_intern\_wrap.o -L…/…/src/.libs -lbroccoli -o /usr/home/cslee/bro-source/bro-1.5.1/aux/broctl/.python-build/lib.freebsd-8.0-RELEASE-amd64-2.6/\_broccoli\_intern.so  
/usr/bin/ld: /usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs/libbroccoli.a(bro.o): relocation R\_X86\_64\_32 can not be used when making a shared object; recompile with -fPIC  
/usr/home/cslee/bro-source/bro-1.5.1/aux/broccoli/src/.libs/libbroccoli.a: could not read symbols: Bad value  
error: command ‘cc’ failed with exit status 1  
\*\*\* Error code 1

Stop in /usr/home/cslee/bro-source/bro-1.5.1/aux/broctl.  
\*\*\* Error code 1

Stop in /usr/home/cslee/bro-source/bro-1.5.1/aux.  
\*\*\* Error code 1

Stop in /usr/home/cslee/bro-source/bro-1.5.1/aux.  
\*\*\* Error code 1

Stop in /usr/home/cslee/bro-source/bro-1.5.1.  
\*\*\* Error code 1

Stop in /usr/home/cslee/bro-source/bro-1.5.1.

The patch just make it compile with -fPIC flag and and it doesn’t work.

Thanks

---

<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:39pm UTC](https://community.zeek.org/t/bro-1-5-1-compile-error-on-freebsd-amd64/1625/4 "2022-05-06T15:39:06Z")

</div>


