I am trying to install Cairo using Homebrew on Mac OS X Lion, but I get the following error:
Undefined symbols for architecture x86_64:
"_png_set_longjmp_fn", referenced from:
_read_png in cairo-png.o
_png_simple_error_callback in cairo-png.o
_write_png in cairo-png.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [libcairo.la] Error 1
I thought it might be that libpng was missing, and it's included with X11 in Lion, so I added ENV.x11 to Cairo's formula, this didn't fix it.
What's the next place I should look? Should I post more of the error/log?
I reinstalled libpng using this package: http://ethan.tira-thompson.com/Mac_OS_X_Ports.html, that solved the problem.
Related
When I try to compile mplayer on MacOS (12.4) I get an error
Undefined symbols for architecture x86_64:
"_x264_encoder_open_163", referenced from:
_X264_init in libavcodec.a(libx264.o)
Undefined symbols for architecture x86_64:
"_x264_encoder_open_163", referenced from:
_X264_init in libavcodec.a(libx264.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: *** [mencoder] Error 1
make: *** Waiting for unfinished jobs....
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mplayer] Error 1
Any ideas how to fix this?
The issue seem to have been with the x264 library.
And for some reasons a first reinstall of x264 did not work. But when (after some other attempts to install what is missing) I did again
brew reinstall x264
something was compiled. But then I did run the following three commands in exactly this order:
./configure
make clean
make
And to my total surprise it did compile finally mplayer. And it works (and fixes a bug only I seem to have).
When I run my XCode project using sqlite3, I keep getting the same two errors (appearing between **):
Undefined symbols for architecture i386:
**"_OBJC_CLASS_$_CalendarDatabase", referenced from: objc-class-ref in AppDelegate.o**
ld: symbol(s) not found for architecture i386
clang: error: **linker command failed with exit code 1 (use -v to see invocation)**
I looked everywhere for an answer but all I find is problems with importing sqlite3 and including frameworks. But I've included libsqlite3.0.dylib and libsqlite3.dylib and I've imported sqlite3 using #import "sqlite3.h". I'm still getting these errors. What could be the problem?
In the error message, the words for architecture i386 tells me that your dylibs do not have i386 code (only x86_64). If you're compiling for i386 (32 bits), you'll need either fat dylibs (x86_64 + i386), or 32-bit dylibs.
I have downloaded the SDL Library, i created an Xcode project, but when i try to build the xcode return this error:
Undefined symbols for architecture i386:
"_SDL_CreateMutex", referenced from:
-[testViewController packet_queue_init:] in testViewController.o
"_SDL_CreateCond", referenced from:
-[testViewController packet_queue_init:] in testViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
how can i fix it??
thanks
Keeps happening to me randomly too. Assuming you're still using your project, just try to toggle the options for the following settings :
Build active architecture only (DEBUG is usually YES, RELEASE is usually NO).
SDK : Latest
Build target: iPhone OS 4.0 (Or whatever your min supported OS is)
http://www.gnu.org/s/libmicrohttpd/tutorial.html#Hello-browser-example
gcc helloworld.c -lmicrohttpd -I/opt/local/include/
helloworld.c: In function ‘answer_to_connection’:
helloworld.c:18: warning: incompatible implicit declaration of built-in function ‘strlen’
ld: library not found for -lmicrohttpd
collect2: ld returned 1 exit status
I am using snow leopard with latest xcode
and installed libmicrohttpd using macports
never used OSX but you need something like: -L/opt/local/lib
Check where the lib resides.. the linked docs says -L$PATH_TO_LIBMHD_INCLUDES
After following these steps to set up an iphone project with CoverStory, my build fails with two linker errors.
Undefined symbols:
"_vproc_transaction_end", referenced from:
_gcov_exit in libgcov.a(_gcov.o)
_vproc_transaction_end$non_lazy_ptr in libgcov.a(_gcov.o)
(maybe you meant: _vproc_transaction_end$non_lazy_ptr)
"_vproc_transaction_begin", referenced from:
___gcov_init in libgcov.a(_gcov.o)
_vproc_transaction_begin$non_lazy_ptr in libgcov.a(_gcov.o)
(maybe you meant: _vproc_transaction_begin$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status
I'm using Xcode 3.2, GCC 4.2 on Snow Leopard. Any ideas what I'm missing?
Here's how to get gcov running with Xcode 3.2.2, GCC 4.2 on Snow Leopard:
http://code.google.com/p/coverstory/wiki/SnowLeopardGCov
Did you add "-lgcov" to Other Linker Flags as the Web page directs?
What is the value of the MACOSX_DEPLOYMENT_TARGET setting? This page and this page suggests the value needs to be set to 10.6.