net-p2p/retroshare VoIP plugin: Undefined symbol

Peter Klett peter at
Sat Nov 3 13:04:41 UTC 2012

Hi All,

I'm currently trying to get the VoIP plugin from RetroShare to work 
under FreeBSD.
After this patch I was able to build it:

--- plugins/VOIP/services/       2012-02-26 
18:13:54.000000000 +0100
+++ plugins/VOIP/services/        2012-10-29 
12:53:56.650925587 +0100
@@ -182,7 +182,7 @@
         ok &= setRawUInt32(data, tlvsize, &offset, flags);
         ok &= setRawUInt32(data, tlvsize, &offset, data_size);
          std::cerr << "data_size : " << data_size << std::endl;
-        memcpy(data+offset,voip_data,data_size) ;
+        memcpy(&((uint8_t*)data)[offset],voip_data,data_size) ;
         offset += data_size ;

         if (offset != tlvsize)

But I can't get RetroShare to load it:

Cannot open plugin: /home/user/.retroshare/extensions/ 
Undefined symbol "_ZN9p3Service7receiveEP9RsRawItem"

Now the symbol is part of the RetroShare binary:

$ grep _ZN9p3Service7receiveEP9RsRawItem 
Binary file work/trunk/retroshare-gui/src/RetroShare matches

but somehow the symbols from the main binary do not get exported to the 
The FreeBSD man page for dlopen(3) states in the NOTES section

ELF executables need to be linked using the -export-dynamic option to
ld(1) for symbols defined in the executable to become visible to 

So I rebuilt RetroShare with the -export-dynamic option, and the symbol 
is part of the symbol table:

$ objdump -t work/trunk/retroshare-gui/src/RetroShare | grep 
0000000000809580 g     F .text  00000000000000c7              

but still to no avail (same undefined symbol error).
My knowledge of ELF binaries is pretty sparse, so if someone has more 
clues, I would appreciate sharing :)

Thanks Peter

More information about the freebsd-ports mailing list