Recently, when rebuilding msgpack on OS X 10.9, the resulting module had problems performing object unpacking. The error given was:
tests/101.log:dyld: Symbol not found: _msgpack_convert_long_to_properties
tests/101.out:dyld: lazy symbol binding failed: Symbol not found: _msgpack_convert_long_to_properties
and a number of the tests would fail.
The fix seems to be to de-inline the functions in msgpack_convert.c. Since they're only referenced from that source file anyway, there's not much benefit to the inlining anyway. :)
I've included a diff of my change, and so far, it seems to be working correctly.
diff --git a/msgpack_convert.c b/msgpack_convert.c
index 29655b0..8e6c784 100644
--- a/msgpack_convert.c
+++ b/msgpack_convert.c
@@ -34,7 +34,7 @@
return SUCCESS;
}
-inline int msgpack_convert_long_to_properties(
+int msgpack_convert_long_to_properties(
HashTable _ht, HashTable *_properties, HashPosition *prop_pos,
uint key_index, zval *val, HashTable *var)
{
@@ -133,7 +133,7 @@ inline int msgpack_convert_long_to_properties(
return zend_hash_index_update(ht, key_index, &val, sizeof(val), NULL);
}
-inline int msgpack_convert_string_to_properties(
+int msgpack_convert_string_to_properties(
zval _object, char *key, uint key_len, zval *val, HashTable *var)
{
zval *_data = NULL;
diff --git a/msgpack_convert.h b/msgpack_convert.h
index 93e045e..2f2f5a9 100644
--- a/msgpack_convert.h
+++ b/msgpack_convert.h
@@ -2,8 +2,10 @@
#ifndef MSGPACK_CONVERT_H
#define MSGPACK_CONVERT_H
-int msgpack_convert_object(zval _return_value, zval *object, zval *_value);
-int msgpack_convert_array(zval _return_value, zval *tpl, zval *_value);
-int msgpack_convert_template(zval _return_value, zval *tpl, zval *_value);
+extern int msgpack_convert_object(zval _return_value, zval *object, zval *_valu
+extern int msgpack_convert_array(zval _return_value, zval *tpl, zval *_value);
+extern int msgpack_convert_template(zval _return_value, zval *tpl, zval *_value
+extern int msgpack_convert_long_to_properties(HashTable _ht, HashTable *_proper
- uint key_index, zval *val, HashTable *var);
- #endif