[OTR-dev] osx "__" undefined symbol

Ian Goldberg ian at cypherpunks.ca
Fri Jan 18 06:54:48 EST 2013


On Thu, Jan 17, 2013 at 08:04:16PM +0100, Nathan Andrew Fain wrote:
> Compiling 4.0.0 works but
> 
> $ pidgin
> dyld: lazy symbol binding failed: Symbol not found: __
>   Referenced from: /opt/local/lib/pidgin/pidgin-otr.so
>   Expected in: flat namespace
> 
> dyld: Symbol not found: __
>   Referenced from: /opt/local/lib/pidgin/pidgin-otr.so
>   Expected in: flat namespace
> 
> $ nm /opt/local/lib/pidgin/pidgin-otr.so
>                  U __
> 0000000000013820 s ___PRETTY_FUNCTION__.33450
> 00000000000137d8 s ___PRETTY_FUNCTION__.33472
>                  U ___stack_chk_fail
>                  U ___stack_chk_guard
>                  U ___stderrp
> 0000000000006d60 t _account_menu_added_removed_cb
> 0000000000006f70 t _account_menu_changed_cb
> 000000000000d080 t _add_vrfy_fingerprint
>                  U _atoi
> ...
> 
> It can be difficult to find information but according to someone that ran
> into this in another project the issue was a missing include (
> https://trac.macports.org/ticket/33962)

The __ symbol is related to language translation.  Please apply this
pacth and see if it works for you.

Thanks,

   - Ian

diff --git a/ChangeLog b/ChangeLog
index d32958e..74fad13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-09-06
+
+	* gtk-dialog.c:
+	* gtk-ui.c:
+	* ui.c:
+	* otr-plugin.c: Compile correctly even if i18n (libintl/gettext)
+	is not available.
+
 2012-09-04
 
 	* README: Release 4.0.0
diff --git a/gtk-dialog.c b/gtk-dialog.c
index 725c78c..f9af2da 100644
--- a/gtk-dialog.c
+++ b/gtk-dialog.c
@@ -48,6 +48,9 @@
 #ifdef ENABLE_NLS
 /* internationalisation headers */
 #include <glib/gi18n-lib.h>
+#else
+#define _(x) (x)
+#define N_(x) (x)
 #endif
 
 /* libotr headers */
diff --git a/gtk-ui.c b/gtk-ui.c
index 80261e7..00c337f 100644
--- a/gtk-ui.c
+++ b/gtk-ui.c
@@ -42,6 +42,9 @@
 #ifdef ENABLE_NLS
 /* internationalisation header */
 #include <glib/gi18n-lib.h>
+#else
+#define _(x) (x)
+#define N_(x) (x)
 #endif
 
 /* purple-otr headers */
diff --git a/otr-plugin.c b/otr-plugin.c
index bec8dd0..d455ca8 100644
--- a/otr-plugin.c
+++ b/otr-plugin.c
@@ -56,6 +56,11 @@
 /* internationalisation header */
 #include <glib/gi18n-lib.h>
 
+#else /* ENABLE_NLS */
+
+#define _(x) (x)
+#define N_(x) (x)
+
 #endif /* ENABLE_NLS */
 
 /* libotr headers */
diff --git a/ui.c b/ui.c
index d47ab1e..2885e99 100644
--- a/ui.c
+++ b/ui.c
@@ -34,6 +34,9 @@
 #ifdef ENABLE_NLS
 /* internationalisation header */
 #include <glib/gi18n-lib.h>
+#else
+#define _(x) (x)
+#define N_(x) (x)
 #endif
 
 /* libotr headers */



More information about the OTR-dev mailing list