libsndfile linking error with libvorbis and libogg when compiling on mac 10.6 snow leopard - libsndfile

Hi I'm trying to compile libsndfile 1.0.25 on Mac OSX 10.6
I've installed libvorbis-1.3.4 and libogg-1.3.1 with brew
1 - I tried installing libsndfile with brew
2 - I tried installing libsndfile manually with ./configure and make
The ./configure step does seem to find libvorbis and libogg, and I've confirmed these are
x86_64 libraries. I hope there is a hint in the output that I do not understand how
to implement and that somebody can quickly spot it. Thanks for looking!
THE BREW ERROR OUTPUT:
==> Downloading http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz
Already downloaded: /Library/Caches/Homebrew/libsndfile-1.0.25.tar.gz
==> Downloading patches
######################################################################## 100.0%
######################################################################## 100.0%
==> Patching
patching file programs/sndfile-play.c
patching file M4/clang.m4
patching file M4/really_gcc.m4
patching file configure.ac
==> autoreconf -i
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:207: error: possibly undefined macro: AC_SYS_EXTRA_LARGEFILE
configure.ac:295: error: possibly undefined macro: AC_OCTAVE_BUILD
autoreconf: /usr/bin/autoconf failed with exit status: 1
THE MANUAL MAKE ERROR OUTPUT:
CCLD libsndfile.la
Undefined symbols for architecture x86_64:
"_vorbis_comment_clear", referenced from:
_vorbis_end in ogg_vorbis.o
_vorbis_read_header in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_vorbis_info_clear", referenced from:
_vorbis_end in ogg_vorbis.o
_vorbis_read_header in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_ogg_stream_reset", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_sync_reset", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_sync_buffer", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_read_sample in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_sync_wrote", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_read_sample in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_sync_pageout", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_read_sample in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_stream_clear", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_ogg_close in libcommon.a(ogg.o)
_ogg_open in libcommon.a(ogg.o)
"_ogg_page_serialno", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_stream_init", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_write_header in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_stream_pagein", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_read_sample in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_stream_packetout", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_read_sample in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_vorbis_block_clear", referenced from:
_vorbis_read_header in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_vorbis_dsp_clear", referenced from:
_vorbis_read_header in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_vorbis_info_init", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_write_header in ogg_vorbis.o
"_vorbis_comment_init", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_write_header in ogg_vorbis.o
"_vorbis_synthesis_headerin", referenced from:
_vorbis_read_header in ogg_vorbis.o
_ogg_vorbis_open in ogg_vorbis.o
"_vorbis_synthesis_init", referenced from:
_vorbis_read_header in ogg_vorbis.o
"_vorbis_block_init", referenced from:
_vorbis_read_header in ogg_vorbis.o
_vorbis_write_header in ogg_vorbis.o
"_vorbis_comment_query", referenced from:
_vorbis_read_header in ogg_vorbis.o
"_vorbis_version_string", referenced from:
_ogg_vorbis_open in ogg_vorbis.o
"_ogg_sync_init", referenced from:
_ogg_vorbis_open in ogg_vorbis.o
_ogg_open in libcommon.a(ogg.o)
"_ogg_page_eos", referenced from:
_ogg_vorbis_open in ogg_vorbis.o
_vorbis_read_sample in ogg_vorbis.o
_vorbis_write_samples in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_ogg_sync_clear", referenced from:
_ogg_vorbis_open in ogg_vorbis.o
_ogg_close in libcommon.a(ogg.o)
_ogg_open in libcommon.a(ogg.o)
"_ogg_page_granulepos", referenced from:
_ogg_vorbis_open in ogg_vorbis.o
"_vorbis_synthesis_pcmout", referenced from:
_vorbis_read_sample in ogg_vorbis.o
"_vorbis_synthesis_read", referenced from:
_vorbis_read_sample in ogg_vorbis.o
"_vorbis_synthesis", referenced from:
_vorbis_read_sample in ogg_vorbis.o
"_vorbis_synthesis_blockin", referenced from:
_vorbis_read_sample in ogg_vorbis.o
"_vorbis_analysis_wrote", referenced from:
_vorbis_write_samples in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_vorbis_analysis_blockout", referenced from:
_vorbis_write_samples in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_vorbis_analysis", referenced from:
_vorbis_write_samples in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_vorbis_bitrate_addblock", referenced from:
_vorbis_write_samples in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_vorbis_bitrate_flushpacket", referenced from:
_vorbis_write_samples in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_ogg_stream_packetin", referenced from:
_vorbis_write_samples in ogg_vorbis.o
_vorbis_write_header in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_ogg_stream_pageout", referenced from:
_vorbis_write_samples in ogg_vorbis.o
_vorbis_close in ogg_vorbis.o
"_vorbis_analysis_buffer", referenced from:
_vorbis_write_d in ogg_vorbis.o
_vorbis_write_f in ogg_vorbis.o
_vorbis_write_i in ogg_vorbis.o
_vorbis_write_s in ogg_vorbis.o
"_vorbis_comment_add_tag", referenced from:
_vorbis_write_header in ogg_vorbis.o
"_vorbis_analysis_init", referenced from:
_vorbis_write_header in ogg_vorbis.o
"_vorbis_analysis_headerout", referenced from:
_vorbis_write_header in ogg_vorbis.o
"_ogg_stream_flush", referenced from:
_vorbis_write_header in ogg_vorbis.o
ld: symbol(s) not found for architecture x86_64

One Solution:
I encountered libsndfile linker errors that are similar, but not identical.
The problem seemed to reside in the configure script provided in the libsndfile tar.gz itself.
That is good news. It means that nothing is wrong with the libvorbis binary nor the libogg binary. There is no fundamental ABI issue preventing linkage of libsndfile against the libvorbis and libogg provided by homebrew.
I located these lines in the configure script of libsndfile:
EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBISENC_CFLAGS"
EXTERNAL_LIBS="$FLAC_LIBS $VORBISENC_LIBS"
(Those lines are copied verbatim. The indentation is wonky in the original script.)
Do you notice the inconsistency?
EXTERNAL_CFLAGS is being formed by concatenating 3 sets of flags, but EXTERNAL_LIBS is formed by concatenating only 2.
Updating those lines as follows allowed me to build and link everything:
EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS"
EXTERNAL_LIBS="$FLAC_LIBS $OGG_LIBS $VORBIS_LIBS $VORBISENC_LIBS"
That is all it took to fix things.
My Backstory:
In the original post (by #ubob), attempt 2 is described as: "installing libsndfile manually with ./configure and make"
Without knowing what options (if any) were passed to ./configure, I cannot know for certain whether my answer applies to #ubob's scenario or not.
my operating system: Mac OS X 10.8.1
libsndfile source distribution version: libsndfile-1.0.24
(but I also tried libsndfile-1.0.25 and found the same situation with EXTERNAL_LIBS)
dependencies obtained from homebrew:
flac/1.3.1/lib/libFLAC.8.dylib
libogg/1.3.2/lib/libogg.0.dylib
libvorbis/1.3.5/lib/libvorbis.0.dylib
libvorbis/1.3.5/lib/libvorbisenc.2.dylib
libvorbis/1.3.5/lib/libvorbisfile.3.dylib
my build commands:
export CC="clang -v"
export FLAC_CFLAGS="-I/whichever/path/leads/to/flac/1.3.1/include"
export FLAC_LIBS="-L/whichever/path/leads/toflac/1.3.1/lib -lFLAC.8"
export OGG_CFLAGS="-I/whichever/path/leads/tolibogg/1.3.2/include"
export OGG_LIBS="-L/whichever/path/leads/tolibogg/1.3.2/lib -logg.0"
export VORBIS_CFLAGS="-I/whichever/path/leads/tolibvorbis/1.3.5/include"
export VORBIS_LIBS="-L/whichever/path/leads/tolibvorbis/1.3.5/lib -lvorbis.0"
export VORBISENC_CFLAGS="-I/whichever/path/leads/tolibvorbis/1.3.5/include"
export VORBISENC_LIBS="-L/whichever/path/leads/tolibvorbis/1.3.5/lib -lvorbisenc.2 -lvorbisfile.3"
./configure --enable-external-libs --disable-static --enable-shared --disable-sqlite --disable-dependency-tracking
make
Once I had made the adjustments to EXTERNAL_CFLAGS and EXTERNAL_LIBS as described above, I was able to successfully build a proper libsndfile.1.dylib, which is now being put to good use in my application and working fine.
For reference, my linker errors were as follows:
CCLD libsndfile.la
Undefined symbols for architecture x86_64:
"_ogg_page_eos", referenced from:
_ogg_open in ogg.o
_ogg_close in ogg.o
_ogg_read_sample in ogg.o
_ogg_write_samples in ogg.o
"_ogg_page_granulepos", referenced from:
_ogg_open in ogg.o
"_ogg_page_serialno", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
[OMITTED FOR BREVITY]
"_ogg_stream_reset", referenced from:
_ogg_read_header in ogg.o
"_ogg_sync_buffer", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_read_sample in ogg.o
"_ogg_sync_clear", referenced from:
_ogg_open in ogg.o
_ogg_close in ogg.o
"_ogg_sync_init", referenced from:
_ogg_open in ogg.o
"_ogg_sync_pageout", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_read_sample in ogg.o
"_ogg_sync_reset", referenced from:
_ogg_read_header in ogg.o
[OMITTED FOR BREVITY]
"_vorbis_comment_clear", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_close in ogg.o
"_vorbis_comment_init", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_write_header in ogg.o
"_vorbis_comment_query", referenced from:
_ogg_read_header in ogg.o
"_vorbis_dsp_clear", referenced from:
_ogg_read_header in ogg.o
_ogg_close in ogg.o
"_vorbis_info_clear", referenced from:
_ogg_open in ogg.o
_ogg_read_header in ogg.o
_ogg_close in ogg.o
[OMITTED FOR BREVITY]
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Related

cocos2dx build fail due to undefined symbol

I am new in Cocos2d and Xcode(as well as game development and mac, I was window and eclipse user). I am working on programmer guide from coco2dx homepage. I have clone the git and try to run the code, but I am facing compilation error with libcocos2d iOS.a. I have set up library path (to libcocos2d) and header file that caused "cocos2d.h not found" error. But now I have a problem with linker errors. I have googled to figure out build architecture errors but no goods. My current build setting for build architecture is that yes to debug, no to release, architecture is set to standard 64bit x86_64, and valid architectures are -armv7, armv7s, i386, x86_64, and arm64- Can some help me with this?
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_CMMotionManager", referenced from:
objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o)
"_OBJC_CLASS_$_EAGLContext", referenced from:
objc-class-ref in libcocos2d iOS.a(CCDirectorCaller-ios.o)
"_OBJC_CLASS_$_UIApplication", referenced from:
objc-class-ref in libcocos2d iOS.a(CCApplication-ios.o)
objc-class-ref in libcocos2d iOS.a(CCDirectorCaller-ios.o)
objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o)
"_OBJC_CLASS_$_UIColor", referenced from:
objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o)
"_OBJC_CLASS_$_UIDevice", referenced from:
objc-class-ref in libcocos2d iOS.a(CCApplication-ios.o)
objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o)
"_OBJC_CLASS_$_UIFont", referenced from:
objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o)
"_OBJC_CLASS_$_UIImage", referenced from:
objc-class-ref in libcocos2d iOS.a(CCImage-ios.o)
"_OBJC_CLASS_$_UIScreen", referenced from:
objc-class-ref in libcocos2d iOS.a(CCDevice-ios.o)
"_UIApplicationDidBecomeActiveNotification", referenced from:
-[CCDirectorCaller init] in libcocos2d iOS.a(CCDirectorCaller-ios.o)
"_UIApplicationWillResignActiveNotification", referenced from:
-[CCDirectorCaller init] in libcocos2d iOS.a(CCDirectorCaller-ios.o)
"_UIGraphicsPopContext", referenced from:
cocos2d::Device::getTextureDataForText(char const*, cocos2d::FontDefinition const&, cocos2d::Device::TextAlign, int&, int&, bool&) in libcocos2d iOS.a(CCDevice-ios.o)
"_UIGraphicsPushContext", referenced from:
cocos2d::Device::getTextureDataForText(char const*, cocos2d::FontDefinition const&, cocos2d::Device::TextAlign, int&, int&, bool&) in libcocos2d iOS.a(CCDevice-ios.o)
"_UIImageJPEGRepresentation", referenced from:
cocos2d::Image::saveToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in libcocos2d iOS.a(CCImage-ios.o)
"_UIImagePNGRepresentation", referenced from:
cocos2d::Image::saveToFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in libcocos2d iOS.a(CCImage-ios.o)
"AppDelegate::AppDelegate()", referenced from:
_main in main.o
"AppDelegate::~AppDelegate()", referenced from:
_main in main.o
"_glBindVertexArrayOES", referenced from:
cocos2d::GL::bindVAO(unsigned int) in libcocos2d iOS.a(ccGLStateCache.o)
"_glDeleteVertexArraysOES", referenced from:
cocos2d::Renderer::~Renderer() in libcocos2d iOS.a(CCRenderer.o)
cocos2d::MeshCommand::releaseVAO() in libcocos2d iOS.a(CCMeshCommand.o)
cocos2d::TextureAtlas::~TextureAtlas() in libcocos2d iOS.a(CCTextureAtlas.o)
cocos2d::CameraBackgroundSkyBoxBrush::~CameraBackgroundSkyBoxBrush() in libcocos2d iOS.a(CCCameraBackgroundBrush.o)
cocos2d::CameraBackgroundSkyBoxBrush::initBuffer() in libcocos2d iOS.a(CCCameraBackgroundBrush.o)
cocos2d::Physics3DDebugDrawer::~Physics3DDebugDrawer() in libcocos2d iOS.a(CCPhysics3DDebugDrawer.o)
cocos2d::DrawNode::~DrawNode() in libcocos2d iOS.a(CCDrawNode.o)
...
"_glGenVertexArraysOES", referenced from:
cocos2d::Renderer::setupVBOAndVAO() in libcocos2d iOS.a(CCRenderer.o)
cocos2d::MeshCommand::buildVAO() in libcocos2d iOS.a(CCMeshCommand.o)
cocos2d::TextureAtlas::setupVBOandVAO() in libcocos2d iOS.a(CCTextureAtlas.o)
cocos2d::CameraBackgroundSkyBoxBrush::initBuffer() in libcocos2d iOS.a(CCCameraBackgroundBrush.o)
cocos2d::Physics3DDebugDrawer::init() in libcocos2d iOS.a(CCPhysics3DDebugDrawer.o)
cocos2d::DrawNode::init() in libcocos2d iOS.a(CCDrawNode.o)
cocos2d::VertexAttribBinding::init(cocos2d::MeshIndexData*, cocos2d::GLProgramState*) in libcocos2d iOS.a(CCVertexAttribBinding.o)
...
"_glMapBufferOES", referenced from:
cocos2d::Renderer::drawBatchedTriangles() in libcocos2d iOS.a(CCRenderer.o)
cocos2d::TextureAtlas::drawNumberOfQuads(long, long) in libcocos2d iOS.a(CCTextureAtlas.o)
"_glUnmapBufferOES", referenced from:
cocos2d::Renderer::drawBatchedTriangles() in libcocos2d iOS.a(CCRenderer.o)
cocos2d::TextureAtlas::drawNumberOfQuads(long, long) in libcocos2d iOS.a(CCTextureAtlas.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In your project settings, go to 'build phases' and in 'Link Binary with Libraries' add
OpenGLES.framework,UIKit.framework,ImageIO.framework, Foundation.framework and CoreGraphics.framework
clean the project and run again hopefully it start running.

Adding PayPal to IOS brings up many errors With Facebook SDK

Hello I am attempting to integrate PayPal into my app I added it via cocoa pods and also added the required libraries but now when compiling I get the error:
Undefined symbols for architecture x86_64:
"_ACAccountTypeIdentifierTwitter", referenced from:
-[PF_Twitter _getLocalTwitterAccountAsync] in ParseTwitterUtils(PF_Twitter.o)
"_FBTokenInformationExpirationDateKey", referenced from:
-[PFFacebookTokenCachingStrategy cacheTokenInformation:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy expirationDate] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setExpirationDate:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationTokenKey", referenced from:
-[PFFacebookTokenCachingStrategy accessToken] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setAccessToken:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_FBTokenInformationUserFBIDKey", referenced from:
-[PFFacebookTokenCachingStrategy facebookId] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
-[PFFacebookTokenCachingStrategy setFacebookId:] in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_CLASS_$_ACAccountStore", referenced from:
objc-class-ref in ParseTwitterUtils(PF_Twitter.o)
"_OBJC_CLASS_$_FBAppCall", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSDKAccessToken", referenced from:
objc-class-ref in ParseFacebookUtilsV4(PFFacebookPrivateUtilities.o)
objc-class-ref in ParseFacebookUtilsV4(PFFacebookAuthenticationProvider.o)
objc-class-ref in ParseFacebookUtilsV4(PFFacebookUtils.o)
"_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from:
objc-class-ref in ParseFacebookUtilsV4(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSDKLoginManager", referenced from:
objc-class-ref in ParseFacebookUtilsV4(PFFacebookMobileAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSDKSettings", referenced from:
objc-class-ref in ParseFacebookUtilsV4(PFFacebookPrivateUtilities.o)
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in ParseFacebookUtils(PFFacebookAuthenticationProvider.o)
"_OBJC_CLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_CLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
"_OBJC_METACLASS_$_FBSessionTokenCachingStrategy", referenced from:
_OBJC_METACLASS_$_PFFacebookTokenCachingStrategy in ParseFacebookUtils(PFFacebookTokenCachingStrategy.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
does anyone know how I can clear these errors?
Thanks I am using XCODE 7 and swift

Error: Current platform "darwin 15" does not match expected platform "darwin 14

I just upgraded my OS X from 10.10.5 to OS X El Capitan 10.11.
I tried to update my mac ports to version 2.3.3 ...
Mac ports is getting this error:
$ sudo port selfupdate
Error: Current platform "darwin 15" does not match expected platform "darwin 14
$ port -qv installed > myports.txt
Error: Current platform "darwin 15" does not match expected platform "darwin 14"
Error: If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration
Error: /opt/local/bin/port: Failed to initialize MacPorts, OS platform mismatch
Any ideas?
I tried following these porting instructions:
https://www.ghostwheel.com/merlin/Personal/notes/2015/09/14/installing-macports-on-os-x-10-11-el-capitan/
but the 'make' of macport 2.3.3 failed:
...
ld: warning: ignoring file ../cregistry/cregistry.a, file was built for archive which is not the architecture being linked (x86_64): ../cregistry/cregistry.a
Undefined symbols for architecture x86_64:
"_reg_all_open_entries", referenced from:
_registry_tcl_detach in registry.o
"_reg_all_open_files", referenced from:
_registry_tcl_detach in registry.o
"_reg_attach", referenced from:
_registry_open in registry.o
"_reg_close", referenced from:
_delete_reg in registry.o
"_reg_commit", referenced from:
_registry_read in registry.o
_registry_write in registry.o
"_reg_del_metadata", referenced from:
_metadata_cmd in registry.o
"_reg_detach", referenced from:
_registry_tcl_detach in registry.o
"_reg_entry_activate", referenced from:
_entry_obj_activate in entryobj.o
"_reg_entry_addgroup", referenced from:
_entry_obj_add_portgroup in entryobj.o
"_reg_entry_create", referenced from:
_entry_create in entry.o
"_reg_entry_deactivate", referenced from:
_filemap_cmds in entryobj.o
"_reg_entry_delete", referenced from:
_entry_delete in entry.o
"_reg_entry_dependencies", referenced from:
_entry_obj_dependencies in entryobj.o
"_reg_entry_dependents", referenced from:
_entry_obj_dependents in entryobj.o
"_reg_entry_depends", referenced from:
_entry_obj_depends in entryobj.o
"_reg_entry_files", referenced from:
_entry_obj_files in entryobj.o
"_reg_entry_free", referenced from:
_registry_write in registry.o
_delete_entry_list in registry.o
_entry_delete in entry.o
"_reg_entry_getgroups", referenced from:
_entry_obj_get_portgroups in entryobj.o
"_reg_entry_imaged", referenced from:
_entry_imaged in entry.o
"_reg_entry_imagefiles", referenced from:
_entry_obj_imagefiles in entryobj.o
"_reg_entry_installed", referenced from:
_entry_installed in entry.o
"_reg_entry_map", referenced from:
_filemap_cmds in entryobj.o
"_reg_entry_open", referenced from:
_entry_open in entry.o
"_reg_entry_owner", referenced from:
_entry_owner in entry.o
"_reg_entry_propget", referenced from:
_entry_obj_prop in entryobj.o
"_reg_entry_propset", referenced from:
_entry_obj_prop in entryobj.o
"_reg_entry_search", referenced from:
_entry_search in entry.o
"_reg_entry_unmap", referenced from:
_filemap_cmds in entryobj.o
"_reg_error_destruct", referenced from:
_registry_failed in registry.o
_registry_tcl_detach in registry.o
_registry_for in registry.o
_delete_reg in registry.o
_metadata_cmd in registry.o
_registry_open in registry.o
_registry_close in registry.o
...
"_reg_file_open", referenced from:
_file_open in file.o
"_reg_file_propget", referenced from:
_file_obj_prop in fileobj.o
"_reg_file_propset", referenced from:
_file_obj_prop in fileobj.o
"_reg_file_search", referenced from:
_file_search in file.o
"_reg_get_metadata", referenced from:
_metadata_cmd in registry.o
"_reg_open", referenced from:
_registry_for in registry.o
"_reg_portgroup_open", referenced from:
_portgroup_open in portgroup.o
"_reg_portgroup_propget", referenced from:
_portgroup_obj_prop in portgroupobj.o
"_reg_portgroup_propset", referenced from:
_portgroup_obj_prop in portgroupobj.o
"_reg_portgroup_search", referenced from:
_portgroup_search in portgroup.o
"_reg_rollback", referenced from:
_registry_read in registry.o
_registry_write in registry.o
"_reg_set_metadata", referenced from:
_metadata_cmd in registry.o
"_reg_start_read", referenced from:
_registry_read in registry.o
"_reg_start_write", referenced from:
_registry_write in registry.o
"_reg_vacuum", referenced from:
_delete_reg in registry.o
_registry_close in registry.o
"_registry_err_not_found", referenced from:
_metadata_cmd in registry.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]: *** [registry.dylib] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
Make of 2.3.4 also failed:
lndefined symbols for architecture x86_64:
"_reg_all_open_entries", referenced from:
_registry_tcl_detach in registry.o
"_reg_all_open_files", referenced from:
_registry_tcl_detach in registry.o
"_reg_attach", referenced from:
_registry_open in registry.o
"_reg_close", referenced from:
_delete_reg in registry.o
"_reg_commit", referenced from:
_registry_read in registry.o
_registry_write in registry.o
"_reg_del_metadata", referenced from:
_metadata_cmd in registry.o
"_reg_detach", referenced from:
_registry_tcl_detach in registry.o
"_reg_entry_activate", referenced from:
_entry_obj_activate in entryobj.o
"_reg_entry_addgroup", referenced from:
_entry_obj_add_portgroup in entryobj.o
"_reg_entry_create", referenced from:
_entry_create in entry.o
"_reg_entry_deactivate", referenced from:
_filemap_cmds in entryobj.o
"_reg_entry_delete", referenced from:
_entry_delete in entry.o
"_reg_entry_dependencies", referenced from:
_entry_obj_dependencies in entryobj.o
"_reg_entry_dependents", referenced from:
_entry_obj_dependents in entryobj.o
"_reg_entry_depends", referenced from:
_entry_obj_depends in entryobj.o
"_reg_entry_files", referenced from:
_entry_obj_files in entryobj.o
"_reg_entry_free", referenced from:
_registry_write in registry.o
_delete_entry_list in registry.o
_entry_delete in entry.o
"_reg_entry_getgroups", referenced from:
_entry_obj_get_portgroups in entryobj.o
"_reg_entry_imaged", referenced from:
_entry_imaged in entry.o
"_reg_entry_imagefiles", referenced from:
_entry_obj_imagefiles in entryobj.o
"_reg_entry_installed", referenced from:
_entry_installed in entry.o
"_reg_entry_map", referenced from:
_filemap_cmds in entryobj.o
"_reg_entry_open", referenced from:
_entry_open in entry.o
"_reg_entry_owner", referenced from:
_entry_owner in entry.o
"_reg_entry_propget", referenced from:
_entry_obj_prop in entryobj.o
"_reg_entry_propset", referenced from:
_entry_obj_prop in entryobj.o
"_reg_entry_search", referenced from:
_entry_search in entry.o
"_reg_entry_unmap", referenced from:
_filemap_cmds in entryobj.o
"_reg_error_destruct", referenced from:
_registry_failed in registry.o
_registry_tcl_detach in registry.o
_registry_for in registry.o
_delete_reg in registry.o
_metadata_cmd in registry.o
_registry_open in registry.o
_registry_close in registry.o
...
"_reg_file_open", referenced from:
_file_open in file.o
"_reg_file_propget", referenced from:
_file_obj_prop in fileobj.o
"_reg_file_propset", referenced from:
_file_obj_prop in fileobj.o
"_reg_file_search", referenced from:
_file_search in file.o
"_reg_get_metadata", referenced from:
_metadata_cmd in registry.o
"_reg_open", referenced from:
_registry_for in registry.o
"_reg_portgroup_open", referenced from:
_portgroup_open in portgroup.o
"_reg_portgroup_propget", referenced from:
_portgroup_obj_prop in portgroupobj.o
"_reg_portgroup_propset", referenced from:
_portgroup_obj_prop in portgroupobj.o
"_reg_portgroup_search", referenced from:
_portgroup_search in portgroup.o
"_reg_rollback", referenced from:
_registry_read in registry.o
_registry_write in registry.o
"_reg_set_metadata", referenced from:
_metadata_cmd in registry.o
"_reg_start_read", referenced from:
_registry_read in registry.o
"_reg_start_write", referenced from:
_registry_write in registry.o
"_reg_vacuum", referenced from:
_delete_reg in registry.o
_registry_close in registry.o
"_registry_err_not_found", referenced from:
_metadata_cmd in registry.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]: *** [registry.dylib] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
There is no 2.3.4 .pkg on the mac port site.
https://distfiles.macports.org/MacPorts/
Error: If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration
EDIT: The easiest is to just download the MacPorts 2.3.4 installer for El Capitan from the MacPorts site.
m7thon's solution worked for me on both my iMac (Late 2013) and MacbookPro (Early 2015). Follow the link provided by m7thon:
MacPort Migration Instructions --> https://trac.macports.org/wiki/Migration.
After installing the new version of MacPorts for El Capitan, follow the instructions to 1) compile a list of your installed ports (they weren't deleted when you upgraded to El Capitan), 2) delete them, and 3) reinstall them. Make sure you install Xcode command line tools prior to steps 1 thru 3:
xcode-select --install
Depending on how many ports you have installed, Step 3 can take a few hours, so make sure you are connected to a power source. For example, it takes the better part of an hour for MacPorts to build the gcc library.
Eventually, I was able to build and run port 2.3.4 from github.
For some reason,
$./configure
$ make
got an linker error.
I resolved the linker error by doing a make in the ./src/cregistry subdirectory
$ cd src/cregistry
$ make
$ cd ../..
$ make
$ sudo make install
After that port selfupdate and sudo port upgrade outdated worked.
MacPorts has released their official El Capitan installer:
https://www.macports.org/install.php

Error compiling libx264: Undefined symbols for architecture x86_64

I have ffmpeg installed, and I am trying to compile libx264 but keep getting an error. Most of the results I've found from searching are about issues compiling ffmpeg or configuring it with libx264 but I can't seem to even get libx264 to compile.
Here is the error:
Undefined symbols for architecture x86_64:
"_CFDataCreate", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_CFDictionaryCreateMutable", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_CFDictionarySetValue", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_CFNumberCreate", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_CFRelease", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_CVPixelBufferGetBaseAddress", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferGetBaseAddressOfPlane", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferGetBytesPerRow", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferGetBytesPerRowOfPlane", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferGetPixelFormatType", referenced from:
_vda_decoder_callback in libavcodec.a(vda_h264.o)
"_CVPixelBufferGetPlaneCount", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferIsPlanar", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferLockBaseAddress", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferRelease", referenced from:
_release_buffer in libavcodec.a(vda_h264_dec.o)
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_vda_h264_uninit in libavcodec.a(vda_h264.o)
_ff_vda_output_callback in libavcodec.a(vda_h264.o)
_release_buffer in libavcodec.a(vda_h264.o)
_vda_h264_release_buffer in libavcodec.a(vda_h264.o)
"_CVPixelBufferRetain", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
_vda_decoder_callback in libavcodec.a(vda_h264.o)
_ff_vda_output_callback in libavcodec.a(vda_h264.o)
"_CVPixelBufferUnlockBaseAddress", referenced from:
_release_buffer in libavcodec.a(vda_h264_dec.o)
"_VDADecoderCreate", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_VDADecoderDecode", referenced from:
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_VDADecoderDestroy", referenced from:
_ff_vda_destroy_decoder in libavcodec.a(vda_h264.o)
"_VDADecoderFlush", referenced from:
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_close", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_open", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_kCFAllocatorDefault", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_kCFCoreFoundationVersionNumber", referenced from:
_vdadec_init in libavcodec.a(vda_h264_dec.o)
"_kCFTypeDictionaryKeyCallBacks", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kCFTypeDictionaryValueCallBacks", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kCVPixelBufferIOSurfacePropertiesKey", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kCVPixelBufferPixelFormatTypeKey", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kVDADecoderConfiguration_Height", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kVDADecoderConfiguration_SourceFormat", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kVDADecoderConfiguration_Width", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kVDADecoderConfiguration_avcCData", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_swr_alloc", referenced from:
_opus_decode_init in libavcodec.a(opusdec.o)
"_swr_close", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
_opus_decode_flush in libavcodec.a(opusdec.o)
"_swr_convert", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
"_swr_free", referenced from:
_opus_decode_close in libavcodec.a(opusdec.o)
"_swr_init", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
"_swr_is_initialized", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.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: *** [x264] Error 1
Update: I worked around this by just using homebrew to install ffmpeg with libx264.
You need to add the following frameworks to your project: VideoDecodeAcceleration.framework, CoreVideo.framework, CoreFoundation.framework
To add them select your target, go to "Build Phases -> Link Binary With Libraries" click the + button and select your frameworks. Everything should compile after that.
If you only want libx264 and don't need x264 cli than disable lavf input during configure with ./configure --disable-lavf because it is problem with libavcodec/libavformat (lavf) dependencies.

Cannot link libmtp in a firebreath project on OSx

I have a functioning plugin I've written using the firebreath framework. I need to add MTP read write support to it.
After some research I landed on the libmtp (http://libmtp.sourceforge.net/). I downloaded the source built it and was able to run the examples and read / write to MTP devices.
Next I tried to add use this lib in my Firebreath plugin project. I can compile fine, but I get the below linker errors. I've added to my search library paths the directories with the libusb.a and libiconv.a files.
I've also tried using the Mac Ports version (sudo ports install libmtp +universal)
note: to use libmtp you need libiconv, and libusb installed
Here are the Linker errors im getting in xcode.
Undefined symbols for architecture i386:
"_libiconv", referenced from:
_ptp_unpack_string in libmtp.a(libmtp_la-ptp.o)
_ptp_pack_string in libmtp.a(libmtp_la-ptp.o)
_utf16_to_utf8 in libmtp.a(libmtp_la-unicode.o)
_utf8_to_utf16 in libmtp.a(libmtp_la-unicode.o)
"_libiconv_close", referenced from:
_LIBMTP_Release_Device in libmtp.a(libmtp_la-libmtp.o)
"_libiconv_open", referenced from:
_LIBMTP_Open_Raw_Device_Uncached in libmtp.a(libmtp_la-libmtp.o)
"_libusb_bulk_transfer", referenced from:
_ptp_write_func in libmtp.a(libmtp_la-libusb1-glue.o)
_ptp_usb_getdata in libmtp.a(libmtp_la-libusb1-glue.o)
_ptp_read_func in libmtp.a(libmtp_la-libusb1-glue.o)
_ptp_usb_event in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_claim_interface", referenced from:
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_clear_halt", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_close", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_control_transfer", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_ptp_usb_control_cancel_request in libmtp.a(libmtp_la-libusb1-glue.o)
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_detach_kernel_driver", referenced from:
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_free_config_descriptor", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_free_device_list", referenced from:
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_bus_number", referenced from:
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_config_descriptor", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_device", referenced from:
_dump_usbinfo in libmtp.a(libmtp_la-libusb1-glue.o)
_get_playlist_extension in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_device_address", referenced from:
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_device_descriptor", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_dump_usbinfo in libmtp.a(libmtp_la-libusb1-glue.o)
_get_playlist_extension in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_device_list", referenced from:
_LIBMTP_Check_Specific_Device in libmtp.a(libmtp_la-libusb1-glue.o)
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_get_string_descriptor_ascii", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_init", referenced from:
_LIBMTP_Check_Specific_Device in libmtp.a(libmtp_la-libusb1-glue.o)
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_kernel_driver_active", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_dump_usbinfo in libmtp.a(libmtp_la-libusb1-glue.o)
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_open", referenced from:
_probe_device_descriptor in libmtp.a(libmtp_la-libusb1-glue.o)
_init_ptp_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_release_interface", referenced from:
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_reset_device", referenced from:
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
_close_usb in libmtp.a(libmtp_la-libusb1-glue.o)
"_libusb_set_debug", referenced from:
_LIBMTP_Check_Specific_Device in libmtp.a(libmtp_la-libusb1-glue.o)
_LIBMTP_Detect_Raw_Devices in libmtp.a(libmtp_la-libusb1-glue.o)
_configure_usb_device in libmtp.a(libmtp_la-libusb1-glue.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It won't just link those other libraries automatically... you need to actually add the other libraries to your target_link_libraries statement.

Resources