[CONC-65] Can't build on OSX Created: 2014-01-02  Updated: 2014-01-03  Resolved: 2014-01-03

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Rui Pacheco Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

OSX 10.9.1, Xcode Version 5.0.2 (5A3005)



 Description   

I've downloaded the latest version of the MariaDB C client library. I ran `cmake CMakeLists.txt` to generate a Makefile and when I run that Makefile I get the error:

`
Linking C shared library libmariadb.dylib
Undefined symbols for architecture x86_64:
"_libiconv", referenced from:
_mariadb_convert_string in my_charset.c.o
"_libiconv_close", referenced from:
_mariadb_convert_string in my_charset.c.o
"_libiconv_open", referenced from:
_mariadb_convert_string in my_charset.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libmariadb/libmariadb.1.dylib] Error 1
make[1]: *** [libmariadb/CMakeFiles/libmariadb.dir/all] Error 2
make: *** [all] Error 2
`

This also happens if I try to build `libmariadb`. The only way I can build the library is by building `mariadbclient`, but when I try to include that on an Xcode project it fails with the error above. Adding libiconv.dylib to the project won't change anything.



 Comments   
Comment by Georg Richter [ 2014-01-03 ]

Fixed in rev. 108.
Installation of macports libiconv is required, libmariadb now links against the macports libraries (opt/local/lib),

Generated at Thu Feb 08 03:02:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.