本文主要是介绍libjingle mac 编译错误 解决方案 (..完善中..),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
基本配置步骤:
一,下载对应的文件:
安装python ,http://www.python.org/
下载scons-local ,http://sourceforge.net/projects/scons/files/scons-src/2.0.1/scons-local-2.0.1.zip
下载swtoolkit,http://code.google.com/p/swtoolkit/downloads/detail?name=swtoolkit.0.9.1.zip
下载gtest ,http://code.google.com/p/googletest/downloads/list
下载expat,http://sourceforge.net/projects/expat/
下载srtp,http://libjingle.googlecode.com/files/srtp-cvs.zip
二,
拷贝相应的文件到相应的位置,如下图,。。注意文件名保持一直,否则需要修改配置文件
配置环境变量
touch ~/.bash_profile
open ~/.bash_profile
会打开系统文件,
输入一下内容:
export SCONS_DIR="/libjingle/scons-local/scons-local-2.0.1"
export PATH="/libjingle/scons-local/scons-local-2.0.1:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"
保存文件,执行下面命令,使配置生效。
source ~/.bash_profile
******
修改libjingle.scons中,(在顶端文字中查找)加入红色字段
"third_party/expat-2.0.1/lib",
"third_party/expat-2.0.1/vms", (或是third_party/expat-2.0.1)
],
win_cppdefines = [
"COMPILED_FROM_DSP",
],
**************
CXXFLAGS = ['-Wno-non-virtual-dtor','-Wno-ctor-dtor-privacy','-fno-rtti', //改为-rtti],
结果为:
CXXFLAGS = ['-Wno-non-virtual-dtor','-Wno-ctor-dtor-privacy','-rtti',],
修改main.scons中的sdk,(共两处)
'-isysroot', '/Applications/Xcode.app//Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk',
基本配置完成,进行编译:
/swtoolkit/hammer.sh
bogon:talk user$ /swtoolkit/hammer.sh
scons: Reading SConscript files ...scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/swtoolkit/site_scons/site_init.py", line 203, in BuildEnvironmentSConscripts
scons: done reading SConscript files.
scons: Building targets ...
________Compiling build/dbg/obj/third_party/gtest/src/gtest-all.o
________Creating library build/dbg/obj/libgunit.a
________Indexing build/dbg/obj/libgunit.a
Install file: "build/dbg/obj/libgunit.a" as "build/dbg/lib/libgunit.a"
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/aes.o
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/aes_cbc.o
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/aes_icm.o
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/cipher.o
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/null_cipher.o
________Compiling build/dbg/obj/third_party/srtp/crypto/hash/auth.o
________Compiling build/dbg/obj/third_party/srtp/crypto/hash/hmac.o
________Compiling build/dbg/obj/third_party/srtp/crypto/hash/null_auth.o
________Compiling build/dbg/obj/third_party/srtp/crypto/hash/sha1.o
________Compiling build/dbg/obj/third_party/srtp/crypto/replay/rdb.o
________Compiling build/dbg/obj/third_party/srtp/crypto/replay/rdbx.o
________Compiling build/dbg/obj/third_party/srtp/crypto/replay/ut_sim.o
________Compiling build/dbg/obj/third_party/srtp/crypto/math/datatypes.o
________Compiling build/dbg/obj/third_party/srtp/crypto/math/stat.o
________Compiling build/dbg/obj/third_party/srtp/crypto/kernel/alloc.o
________Compiling build/dbg/obj/third_party/srtp/crypto/kernel/crypto_kernel.o
________Compiling build/dbg/obj/third_party/srtp/crypto/kernel/err.o
________Compiling build/dbg/obj/third_party/srtp/crypto/kernel/key.o
________Compiling build/dbg/obj/third_party/srtp/crypto/rng/ctr_prng.o
________Compiling build/dbg/obj/third_party/srtp/crypto/rng/rand_source.o
________Compiling build/dbg/obj/third_party/srtp/srtp/ekt.o
________Compiling build/dbg/obj/third_party/srtp/srtp/srtp.o
________Creating library build/dbg/obj/libsrtp.a
________Indexing build/dbg/obj/libsrtp.a
Install file: "build/dbg/obj/libsrtp.a" as "build/dbg/lib/libsrtp.a"
________Compiling build/dbg/obj/base/macasyncsocket.o
________Compiling build/dbg/obj/base/macconversion.o
________Compiling build/dbg/obj/base/macsocketserver.o
________Compiling build/dbg/obj/base/macutils.o
________Compiling build/dbg/obj/base/macwindowpicker.o
________Compiling build/dbg/obj/base/scoped_autorelease_pool.o
________Compiling build/dbg/obj/session/phone/carbonvideorenderer.o
________Compiling build/dbg/obj/session/phone/macdevicemanager.o
________Compiling build/dbg/obj/session/phone/macdevicemanagermm.o
________Compiling build/dbg/obj/base/unixfilesystem.o
________Compiling build/dbg/obj/base/opensslidentity.o
________Compiling build/dbg/obj/base/opensslstreamadapter.o
________Compiling build/dbg/obj/base/posix.o
________Compiling build/dbg/obj/base/sslidentity.o
________Compiling build/dbg/obj/base/sslstreamadapter.o
________Compiling build/dbg/obj/base/asyncfile.o
________Compiling build/dbg/obj/base/asynchttprequest.o
________Compiling build/dbg/obj/base/asyncsocket.o
________Compiling build/dbg/obj/base/asynctcpsocket.o
________Compiling build/dbg/obj/base/asyncudpsocket.o
________Compiling build/dbg/obj/base/autodetectproxy.o
________Compiling build/dbg/obj/base/bandwidthsmoother.o
________Compiling build/dbg/obj/base/base64.o
________Compiling build/dbg/obj/base/basicpacketsocketfactory.o
________Compiling build/dbg/obj/base/bytebuffer.o
________Compiling build/dbg/obj/base/checks.o
________Compiling build/dbg/obj/base/common.o
________Compiling build/dbg/obj/base/cpuid.o
________Compiling build/dbg/obj/base/cpumonitor.o
________Compiling build/dbg/obj/base/diskcache.o
________Compiling build/dbg/obj/base/event.o
________Compiling build/dbg/obj/base/filelock.o
________Compiling build/dbg/obj/base/fileutils.o
________Compiling build/dbg/obj/base/firewallsocketserver.o
________Compiling build/dbg/obj/base/flags.o
________Compiling build/dbg/obj/base/helpers.o
________Compiling build/dbg/obj/base/host.o
________Compiling build/dbg/obj/base/httpbase.o
________Compiling build/dbg/obj/base/httpclient.o
________Compiling build/dbg/obj/base/httpcommon.o
________Compiling build/dbg/obj/base/httprequest.o
________Compiling build/dbg/obj/base/httpserver.o
________Compiling build/dbg/obj/base/ipaddress.o
________Compiling build/dbg/obj/base/logging.o
________Compiling build/dbg/obj/base/md5c.o
________Compiling build/dbg/obj/base/messagehandler.o
________Compiling build/dbg/obj/base/messagequeue.o
________Compiling build/dbg/obj/base/multipart.o
________Compiling build/dbg/obj/base/natserver.o
________Compiling build/dbg/obj/base/natsocketfactory.o
________Compiling build/dbg/obj/base/nattypes.o
________Compiling build/dbg/obj/base/nethelpers.o
________Compiling build/dbg/obj/base/network.o
________Compiling build/dbg/obj/base/openssladapter.o
________Compiling build/dbg/obj/base/optionsfile.o
________Compiling build/dbg/obj/base/pathutils.o
________Compiling build/dbg/obj/base/physicalsocketserver.o
________Compiling build/dbg/obj/base/proxydetect.o
________Compiling build/dbg/obj/base/proxyinfo.o
________Compiling build/dbg/obj/base/proxyserver.o
________Compiling build/dbg/obj/base/ratetracker.o
________Compiling build/dbg/obj/base/sharedexclusivelock.o
________Compiling build/dbg/obj/base/signalthread.o
________Compiling build/dbg/obj/base/socketadapters.o
________Compiling build/dbg/obj/base/socketaddress.o
________Compiling build/dbg/obj/base/socketaddresspair.o
________Compiling build/dbg/obj/base/socketpool.o
________Compiling build/dbg/obj/base/socketstream.o
________Compiling build/dbg/obj/base/ssladapter.o
________Compiling build/dbg/obj/base/sslsocketfactory.o
________Compiling build/dbg/obj/base/stream.o
________Compiling build/dbg/obj/base/stringdigest.o
________Compiling build/dbg/obj/base/stringencode.o
________Compiling build/dbg/obj/base/stringutils.o
________Compiling build/dbg/obj/base/systeminfo.o
________Compiling build/dbg/obj/base/task.o
________Compiling build/dbg/obj/base/taskparent.o
________Compiling build/dbg/obj/base/taskrunner.o
________Compiling build/dbg/obj/base/testclient.o
________Compiling build/dbg/obj/base/thread.o
________Compiling build/dbg/obj/base/timeutils.o
________Compiling build/dbg/obj/base/timing.o
________Compiling build/dbg/obj/base/transformadapter.o
________Compiling build/dbg/obj/base/urlencode.o
________Compiling build/dbg/obj/base/versionparsing.o
________Compiling build/dbg/obj/base/virtualsocketserver.o
________Compiling build/dbg/obj/base/worker.o
________Compiling build/dbg/obj/p2p/base/constants.o
________Compiling build/dbg/obj/p2p/base/p2ptransport.o
________Compiling build/dbg/obj/p2p/base/p2ptransportchannel.o
________Compiling build/dbg/obj/p2p/base/parsing.o
________Compiling build/dbg/obj/p2p/base/port.o
________Compiling build/dbg/obj/p2p/base/portallocator.o
________Compiling build/dbg/obj/p2p/base/portallocatorsessionproxy.o
________Compiling build/dbg/obj/p2p/base/portproxy.o
________Compiling build/dbg/obj/p2p/base/pseudotcp.o
________Compiling build/dbg/obj/p2p/base/relayport.o
________Compiling build/dbg/obj/p2p/base/relayserver.o
________Compiling build/dbg/obj/p2p/base/rawtransport.o
________Compiling build/dbg/obj/p2p/base/rawtransportchannel.o
________Compiling build/dbg/obj/p2p/base/session.o
________Compiling build/dbg/obj/p2p/base/sessiondescription.o
________Compiling build/dbg/obj/p2p/base/sessionmanager.o
________Compiling build/dbg/obj/p2p/base/sessionmessages.o
________Compiling build/dbg/obj/p2p/base/stun.o
________Compiling build/dbg/obj/p2p/base/stunport.o
________Compiling build/dbg/obj/p2p/base/stunrequest.o
________Compiling build/dbg/obj/p2p/base/stunserver.o
________Compiling build/dbg/obj/p2p/base/tcpport.o
________Compiling build/dbg/obj/p2p/base/transport.o
________Compiling build/dbg/obj/p2p/base/transportchannel.o
________Compiling build/dbg/obj/p2p/base/transportchannelproxy.o
________Compiling build/dbg/obj/p2p/base/udpport.o
________Compiling build/dbg/obj/p2p/client/basicportallocator.o
________Compiling build/dbg/obj/p2p/client/connectivitychecker.o
________Compiling build/dbg/obj/p2p/client/httpportallocator.o
________Compiling build/dbg/obj/p2p/client/socketmonitor.o
________Compiling build/dbg/obj/session/tunnel/pseudotcpchannel.o
________Compiling build/dbg/obj/session/tunnel/tunnelsessionclient.o
________Compiling build/dbg/obj/session/tunnel/securetunnelsessionclient.o
________Compiling build/dbg/obj/session/phone/audiomonitor.o
________Compiling build/dbg/obj/session/phone/call.o
________Compiling build/dbg/obj/session/phone/channel.o
________Compiling build/dbg/obj/session/phone/channelmanager.o
________Compiling build/dbg/obj/session/phone/codec.o
________Compiling build/dbg/obj/session/phone/currentspeakermonitor.o
________Compiling build/dbg/obj/session/phone/devicemanager.o
________Compiling build/dbg/obj/session/phone/dummydevicemanager.o
________Compiling build/dbg/obj/session/phone/filemediaengine.o
________Compiling build/dbg/obj/session/phone/filevideocapturer.o
________Compiling build/dbg/obj/session/phone/mediaengine.o
________Compiling build/dbg/obj/session/phone/mediamessages.o
________Compiling build/dbg/obj/session/phone/mediamonitor.o
________Compiling build/dbg/obj/session/phone/mediarecorder.o
________Compiling build/dbg/obj/session/phone/mediasession.o
________Compiling build/dbg/obj/session/phone/mediasessionclient.o
________Compiling build/dbg/obj/session/phone/rtpdump.o
________Compiling build/dbg/obj/session/phone/rtputils.o
________Compiling build/dbg/obj/session/phone/rtcpmuxfilter.o
________Compiling build/dbg/obj/session/phone/soundclip.o
________Compiling build/dbg/obj/session/phone/srtpfilter.o
________Compiling build/dbg/obj/session/phone/ssrcmuxfilter.o
________Compiling build/dbg/obj/session/phone/streamparams.o
________Compiling build/dbg/obj/session/phone/videoadapter.o
________Compiling build/dbg/obj/session/phone/videocapturer.o
________Compiling build/dbg/obj/session/phone/videocommon.o
________Compiling build/dbg/obj/session/phone/videoframe.o
________Compiling build/dbg/obj/sound/nullsoundsystem.o
________Compiling build/dbg/obj/sound/nullsoundsystemfactory.o
________Compiling build/dbg/obj/sound/platformsoundsystem.o
________Compiling build/dbg/obj/sound/platformsoundsystemfactory.o
________Compiling build/dbg/obj/sound/soundsysteminterface.o
________Compiling build/dbg/obj/sound/soundsystemproxy.o
________Compiling build/dbg/obj/xmllite/qname.o
________Compiling build/dbg/obj/xmllite/xmlbuilder.o
________Compiling build/dbg/obj/xmllite/xmlconstants.o
________Compiling build/dbg/obj/xmllite/xmlelement.o
________Compiling build/dbg/obj/xmllite/xmlnsstack.o
________Compiling build/dbg/obj/xmllite/xmlparser.o
________Compiling build/dbg/obj/xmllite/xmlprinter.o
________Compiling build/dbg/obj/xmpp/constants.o
________Compiling build/dbg/obj/xmpp/hangoutpubsubclient.o
________Compiling build/dbg/obj/xmpp/iqtask.o
________Compiling build/dbg/obj/xmpp/jid.o
________Compiling build/dbg/obj/xmpp/moduleimpl.o
________Compiling build/dbg/obj/xmpp/mucroomconfigtask.o
________Compiling build/dbg/obj/xmpp/mucroomhistorytask.o
________Compiling build/dbg/obj/xmpp/mucroomlookuptask.o
________Compiling build/dbg/obj/xmpp/pubsubclient.o
________Compiling build/dbg/obj/xmpp/pubsub_task.o
________Compiling build/dbg/obj/xmpp/pubsubtasks.o
________Compiling build/dbg/obj/xmpp/receivetask.o
________Compiling build/dbg/obj/xmpp/saslmechanism.o
________Compiling build/dbg/obj/xmpp/xmppclient.o
________Compiling build/dbg/obj/xmpp/xmppengineimpl.o
________Compiling build/dbg/obj/xmpp/xmppengineimpl_iq.o
________Compiling build/dbg/obj/xmpp/xmpplogintask.o
________Compiling build/dbg/obj/xmpp/xmppstanzaparser.o
________Compiling build/dbg/obj/xmpp/xmpptask.o
________Creating library build/dbg/obj/libjingle.a
________Indexing build/dbg/obj/libjingle.a
Install file: "build/dbg/obj/libjingle.a" as "build/dbg/lib/libjingle.a"
________Compiling build/dbg/obj/examples/login/jingleinfotask.o
________Compiling build/dbg/obj/examples/login/xmppauth.o
________Compiling build/dbg/obj/examples/login/xmpppump.o
________Compiling build/dbg/obj/examples/login/xmppsocket.o
________Creating library build/dbg/obj/libxmpphelp.a
________Indexing build/dbg/obj/libxmpphelp.a
Install file: "build/dbg/obj/libxmpphelp.a" as "build/dbg/lib/libxmpphelp.a"
________Compiling build/dbg/obj/base/unittest_main.o
________Creating library build/dbg/obj/libunittest_main.a
________Indexing build/dbg/obj/libunittest_main.a
Install file: "build/dbg/obj/libunittest_main.a" as "build/dbg/lib/libunittest_main.a"
________Compiling build/dbg/obj/examples/login/xmppthread.o
________Compiling build/dbg/obj/examples/login/login_main.o
________Linking build/dbg/obj/login
Install file: "build/dbg/obj/login" as "build/dbg/staging/login"
________Compiling build/dbg/obj/examples/call/call_main.o
________Compiling build/dbg/obj/examples/call/callclient.o
________Compiling build/dbg/obj/examples/call/console.o
________Compiling build/dbg/obj/examples/call/friendinvitesendtask.o
________Compiling build/dbg/obj/examples/call/mediaenginefactory.o
________Compiling build/dbg/obj/examples/call/mucinviterecvtask.o
________Compiling build/dbg/obj/examples/call/mucinvitesendtask.o
________Compiling build/dbg/obj/examples/call/presenceouttask.o
________Compiling build/dbg/obj/examples/call/presencepushtask.o
________Linking build/dbg/obj/call
Install file: "build/dbg/obj/call" as "build/dbg/staging/call"
________Compiling build/dbg/obj/p2p/base/relayserver_main.o
________Linking build/dbg/obj/relayserver
Install file: "build/dbg/obj/relayserver" as "build/dbg/staging/relayserver"
________Compiling build/dbg/obj/p2p/base/stunserver_main.o
________Linking build/dbg/obj/stunserver
Install file: "build/dbg/obj/stunserver" as "build/dbg/staging/stunserver"
________Compiling build/dbg/obj/base/macsocketserver_unittest.o
________Compiling build/dbg/obj/base/macutils_unittest.o
________Compiling build/dbg/obj/base/macwindowpicker_unittest.o
________Compiling build/dbg/obj/base/sslidentity_unittest.o
________Compiling build/dbg/obj/base/sslstreamadapter_unittest.o
________Compiling build/dbg/obj/base/asynchttprequest_unittest.o
________Compiling build/dbg/obj/base/atomicops_unittest.o
________Compiling build/dbg/obj/base/autodetectproxy_unittest.o
________Compiling build/dbg/obj/base/bandwidthsmoother_unittest.o
________Compiling build/dbg/obj/base/base64_unittest.o
________Compiling build/dbg/obj/base/buffer_unittest.o
________Compiling build/dbg/obj/base/bytebuffer_unittest.o
________Compiling build/dbg/obj/base/cpuid_unittest.o
________Compiling build/dbg/obj/base/cpumonitor_unittest.o
________Compiling build/dbg/obj/base/event_unittest.o
________Compiling build/dbg/obj/base/filelock_unittest.o
________Compiling build/dbg/obj/base/fileutils_unittest.o
________Compiling build/dbg/obj/base/helpers_unittest.o
________Compiling build/dbg/obj/base/host_unittest.o
________Compiling build/dbg/obj/base/httpbase_unittest.o
________Compiling build/dbg/obj/base/httpcommon_unittest.o
________Compiling build/dbg/obj/base/httpserver_unittest.o
________Compiling build/dbg/obj/base/ipaddress_unittest.o
________Compiling build/dbg/obj/base/logging_unittest.o
________Compiling build/dbg/obj/base/messagequeue_unittest.o
________Compiling build/dbg/obj/base/multipart_unittest.o
________Compiling build/dbg/obj/base/nat_unittest.o
________Compiling build/dbg/obj/base/network_unittest.o
________Compiling build/dbg/obj/base/optionsfile_unittest.o
________Compiling build/dbg/obj/base/pathutils_unittest.o
________Compiling build/dbg/obj/base/physicalsocketserver_unittest.o
________Compiling build/dbg/obj/base/proxy_unittest.o
________Compiling build/dbg/obj/base/proxydetect_unittest.o
________Compiling build/dbg/obj/base/ratetracker_unittest.o
________Compiling build/dbg/obj/base/referencecountedsingletonfactory_unittest.o
________Compiling build/dbg/obj/base/rollingaccumulator_unittest.o
________Compiling build/dbg/obj/base/sharedexclusivelock_unittest.o
________Compiling build/dbg/obj/base/signalthread_unittest.o
________Compiling build/dbg/obj/base/socket_unittest.o
________Compiling build/dbg/obj/base/socketaddress_unittest.o
________Compiling build/dbg/obj/base/stream_unittest.o
________Compiling build/dbg/obj/base/stringencode_unittest.o
________Compiling build/dbg/obj/base/stringutils_unittest.o
________Compiling build/dbg/obj/base/systeminfo_unittest.o
________Compiling build/dbg/obj/base/task_unittest.o
________Compiling build/dbg/obj/base/testclient_unittest.o
________Compiling build/dbg/obj/base/thread_unittest.o
________Compiling build/dbg/obj/base/timeutils_unittest.o
________Compiling build/dbg/obj/base/urlencode_unittest.o
________Compiling build/dbg/obj/base/versionparsing_unittest.o
________Compiling build/dbg/obj/base/virtualsocket_unittest.o
________Linking build/dbg/obj/base_unittest
Install file: "build/dbg/obj/base_unittest" as "build/dbg/tests/base_unittest"
________Compiling build/dbg/obj/p2p/base/p2ptransportchannel_unittest.o
________Compiling build/dbg/obj/p2p/base/port_unittest.o
________Compiling build/dbg/obj/p2p/base/pseudotcp_unittest.o
________Compiling build/dbg/obj/p2p/base/relayport_unittest.o
________Compiling build/dbg/obj/p2p/base/relayserver_unittest.o
________Compiling build/dbg/obj/p2p/base/session_unittest.o
________Compiling build/dbg/obj/p2p/base/stun_unittest.o
________Compiling build/dbg/obj/p2p/base/stunport_unittest.o
________Compiling build/dbg/obj/p2p/base/stunrequest_unittest.o
________Compiling build/dbg/obj/p2p/base/stunserver_unittest.o
________Compiling build/dbg/obj/p2p/base/transport_unittest.o
________Compiling build/dbg/obj/p2p/client/connectivitychecker_unittest.o
________Compiling build/dbg/obj/p2p/client/portallocator_unittest.o
________Linking build/dbg/obj/p2p_unittest
Install file: "build/dbg/obj/p2p_unittest" as "build/dbg/tests/p2p_unittest"
________Compiling build/dbg/obj/session/phone/channel_unittest.o
________Compiling build/dbg/obj/session/phone/channelmanager_unittest.o
________Compiling build/dbg/obj/session/phone/codec_unittest.o
________Compiling build/dbg/obj/session/phone/currentspeakermonitor_unittest.o
________Compiling build/dbg/obj/session/phone/devicemanager_unittest.o
________Compiling build/dbg/obj/session/phone/dummydevicemanager_unittest.o
________Compiling build/dbg/obj/session/phone/filemediaengine_unittest.o
________Compiling build/dbg/obj/session/phone/filevideocapturer_unittest.o
________Compiling build/dbg/obj/session/phone/mediarecorder_unittest.o
________Compiling build/dbg/obj/session/phone/mediamessages_unittest.o
________Compiling build/dbg/obj/session/phone/mediasession_unittest.o
________Compiling build/dbg/obj/session/phone/mediasessionclient_unittest.o
________Compiling build/dbg/obj/session/phone/rtcpmuxfilter_unittest.o
________Compiling build/dbg/obj/session/phone/rtpdump_unittest.o
________Compiling build/dbg/obj/session/phone/rtputils_unittest.o
________Compiling build/dbg/obj/session/phone/srtpfilter_unittest.o
________Compiling build/dbg/obj/session/phone/ssrcmuxfilter_unittest.o
________Compiling build/dbg/obj/session/phone/testutils.o
________Compiling build/dbg/obj/session/phone/videocapturer_unittest.o
________Compiling build/dbg/obj/session/phone/videocommon_unittest.o
________Linking build/dbg/obj/media_unittest
Install file: "build/dbg/obj/media_unittest" as "build/dbg/tests/media_unittest"
________Compiling build/dbg/obj/sound/automaticallychosensoundsystem_unittest.o
________Linking build/dbg/obj/sound_unittest
Install file: "build/dbg/obj/sound_unittest" as "build/dbg/tests/sound_unittest"
________Compiling build/dbg/obj/xmllite/qname_unittest.o
________Compiling build/dbg/obj/xmllite/xmlbuilder_unittest.o
________Compiling build/dbg/obj/xmllite/xmlelement_unittest.o
________Compiling build/dbg/obj/xmllite/xmlnsstack_unittest.o
________Compiling build/dbg/obj/xmllite/xmlparser_unittest.o
________Compiling build/dbg/obj/xmllite/xmlprinter_unittest.o
________Linking build/dbg/obj/xmllite_unittest
Install file: "build/dbg/obj/xmllite_unittest" as "build/dbg/tests/xmllite_unittest"
________Compiling build/dbg/obj/xmpp/hangoutpubsubclient_unittest.o
________Compiling build/dbg/obj/xmpp/jid_unittest.o
________Compiling build/dbg/obj/xmpp/mucroomconfigtask_unittest.o
________Compiling build/dbg/obj/xmpp/mucroomlookuptask_unittest.o
________Compiling build/dbg/obj/xmpp/pubsubclient_unittest.o
________Compiling build/dbg/obj/xmpp/pubsubtasks_unittest.o
________Compiling build/dbg/obj/xmpp/util_unittest.o
________Compiling build/dbg/obj/xmpp/xmppengine_unittest.o
________Compiling build/dbg/obj/xmpp/xmpplogintask_unittest.o
________Compiling build/dbg/obj/xmpp/xmppstanzaparser_unittest.o
________Linking build/dbg/obj/xmpp_unittest
Install file: "build/dbg/obj/xmpp_unittest" as "build/dbg/tests/xmpp_unittest"
scons: done building targets.
编译成功。
third_party/expat-2.0.1/lib/xmlparse.c:20:26: error: expat_config.h: No such file or directory
修改libjingle.scons中,(在顶端文字中查找)加入红色字段
"third_party/expat-2.0.1/lib",
"third_party/expat-2.0.1/vms", (或是third_party/expat-2.0.1)
"third_party/openssl-1.0.0", (或许可以不加)
],
win_cppdefines = [
"COMPILED_FROM_DSP",
],
MacmatoMacBook:talk Mac$ /swtoolkit/hammer.sh scons: Reading SConscript files ... /swtoolkit/site_scons/site_tools/component_targets_msvs.py:34: DeprecationWarning: the md5 module is deprecated; use hashlib insteadimport md5scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead. File "/swtoolkit/site_scons/site_init.py", line 203, in BuildEnvironmentSConscripts scons: done reading SConscript files. scons: Building targets ... ________Compiling build/dbg/obj/third_party/gtest/src/gtest-all.o In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/tr1/tuple:159,from third_party/gtest/include/gtest/internal/gtest-port.h:499,from third_party/gtest/include/gtest/internal/gtest-internal.h:40,from third_party/gtest/include/gtest/gtest.h:57,from third_party/gtest/src/gtest-all.cc:39: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/tr1/functional: In static member function ‘static bool std::tr1::_Function_base::_Base_manager<_Functor>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/tr1/functional:907: error: cannot use typeid with -fno-rtti /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/tr1/functional: In static member function ‘static bool std::tr1::_Function_base::_Ref_manager<_Functor>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/tr1/functional:985: error: cannot use typeid with -fno-rtti In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/tr1/repeat.h:74,from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/usr/include/c++/4.2.1/tr1/functional:1098,
刚开始以为是 RTTI没有activity ,测试下面的代码可以看是否打开
#include <iostream>class A
{
public:virtual ~A () { }
};class B : public A
{
};void rtti_test (A& a)
{try{B& b = dynamic_cast<B&> (a);
typeid(void);
} catch (std::bad_cast){std::cout << "Invalid cast.\n";}std::cout << "rtti is enabled in this compiler.\n";
}int
main ()
{A *a1 = new B;rtti_test (*a1);A *a2 = new A;rtti_test (*a2);return 0;
}
命令行输入命令。
g++ /mIOS/CommandLine2/mc.cpp
没错误,证明RTTI是Activity的,再想别的办法。
typeid
is an RTTI-feature. So turning off RTTI (-fno-rtti
) also disables features like typeid
. ----说是fno,但是测试是activity的,奇怪-isysroot', '/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk',
----还是不行,现在编译结果是,比原来编译的多了,但是还是原来的错误
MacmatoMacBook:talk Mac$ /swtoolkit/hammer.sh
scons: Reading SConscript files ...
/swtoolkit/site_scons/site_tools/component_targets_msvs.py:34: DeprecationWarning: the md5 module is deprecated; use hashlib insteadimport md5scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/swtoolkit/site_scons/site_init.py", line 203, in BuildEnvironmentSConscripts
scons: done reading SConscript files.
scons: Building targets ...
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlrole.o
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmltok.o
________Creating library build/dbg/obj/libexpat.a
________Indexing build/dbg/obj/libexpat.a
Install file: "build/dbg/obj/libexpat.a" as "build/dbg/lib/libexpat.a"
________Compiling build/dbg/obj/third_party/gtest/src/gtest-all.o
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/tr1/tuple:159,from third_party/gtest/include/gtest/internal/gtest-port.h:499,from third_party/gtest/include/gtest/internal/gtest-internal.h:40,from third_party/gtest/include/gtest/gtest.h:57,from third_party/gtest/src/gtest-all.cc:39:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/tr1/functional: In static member function ‘static bool std::tr1::_Function_base::_Base_manager<_Functor>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/tr1/functional:907: error: cannot use typeid with -fno-rtti
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/tr1/functional: In static member function ‘static bool std::tr1::_Function_base::_Ref_manager<_Functor>::_M_manager(std::tr1::_Any_data&, const std::tr1::_Any_data&, std::tr1::_Manager_operation)’:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/include/c++/4.2.1/tr1/functional:985: error: cannot use typeid with -fno-rtti
修改main.scons
CXXFLAGS = ['-Wno-non-virtual-dtor','-Wno-ctor-dtor-privacy','-fno-rtti', //改为-rtti],
结果为:
CXXFLAGS = ['-Wno-non-virtual-dtor','-Wno-ctor-dtor-privacy','-rtti',],
~/work/libjingle-read-only/talk $ hammer.sh
scons: Reading SConscript files ...scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/Users/serge/work/libjingle-0.5.8/swtoolkit/site_scons/site_init.py", line 203, in BuildEnvironmentSConscripts
scons: done reading SConscript files.
scons: Building targets ...
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlrole.o
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmltok.o
________Creating library build/dbg/obj/libexpat.a
________Indexing build/dbg/obj/libexpat.a
Install file: "build/dbg/obj/libexpat.a" as "build/dbg/lib/libexpat.a"
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/WebServicesCore.framework/Headers/WSMethodInvocation.h:759: error: ‘CFXMLTreeRef’ has not been declared
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/WebServicesCore.framework/Headers/WSMethodInvocation.h:759: error: ‘CFXMLTreeRef’ has not been declared
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/WebServicesCore.framework/Headers/WebServicesCore.h:19,from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37,from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,from /libjingle/talk/base/macsocketserver.h:9,from base/macasyncsocket.cc:18:
'-isysroot', '/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk',
将其改为 --- 注意,有两处,都得改 '-isysroot', '/Developer/SDKs/MacOSX10.6.sdk',
________Creating library build/dbg/obj/libunittest_main.a
________Indexing build/dbg/obj/libunittest_main.a
Install file: "build/dbg/obj/libunittest_main.a" as "build/dbg/lib/libunittest_main.a"
________Compiling build/dbg/obj/examples/login/xmppthread.o
________Compiling build/dbg/obj/examples/login/login_main.o
________Linking build/dbg/obj/login
ld: library not found for -lcrypto
collect2: ld returned 1 exit status
scons: *** [build/dbg/obj/login] Error 1
scons: building terminated because of errors.
lcrypto 这个东西没有找到,和之前在编译libjingle for iphone 的时候遇到的是同一个问题。
$ ./config$ make$ make test$ make install //这个如果遇到权限问题,使用sudo
现在openssl下面已经有了crypto等相关文件了,但还是报相同的error。 问题好像解决了
Install file: "build/dbg/obj/libjingle.a" as "build/dbg/lib/libjingle.a"
________Linking build/dbg/obj/login
ld: framework not found CoreServices
collect2: ld returned 1 exit status
scons: *** [build/dbg/obj/login] Error 1
scons: building terminated because of errors.
这个问题是我在issue A:中修改sdk的时候,两处只修改了一处,
MacmatoMacBook:talk Mac$ /swtoolkit/hammer.sh
scons: Reading SConscript files ...
/swtoolkit/site_scons/site_tools/component_targets_msvs.py:34: DeprecationWarning: the md5 module is deprecated; use hashlib insteadimport md5scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/swtoolkit/site_scons/site_init.py", line 203, in BuildEnvironmentSConscripts
scons: done reading SConscript files.
scons: Building targets ...
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlrole.o
________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmltok.o
________Creating library build/dbg/obj/libexpat.a
________Indexing build/dbg/obj/libexpat.a
Install file: "build/dbg/obj/libexpat.a" as "build/dbg/lib/libexpat.a"
________Compiling build/dbg/obj/third_party/gtest/src/gtest-all.o
________Creating library build/dbg/obj/libgunit.a
________Indexing build/dbg/obj/libgunit.a
Install file: "build/dbg/obj/libgunit.a" as "build/dbg/lib/libgunit.a"
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/aes.o
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/aes_cbc.o
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/aes_icm.o
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/cipher.o
________Compiling build/dbg/obj/third_party/srtp/crypto/cipher/null_cipher.o
________Compiling build/dbg/obj/third_party/srtp/crypto/hash/auth.o
________Compiling build/dbg/obj/third_party/srtp/crypto/hash/hmac.o
________Compiling build/dbg/obj/third_party/srtp/crypto/hash/null_auth.o
________Compiling build/dbg/obj/third_party/srtp/crypto/hash/sha1.o
________Compiling build/dbg/obj/third_party/srtp/crypto/replay/rdb.o
________Compiling build/dbg/obj/third_party/srtp/crypto/replay/rdbx.o
________Compiling build/dbg/obj/third_party/srtp/crypto/replay/ut_sim.o
________Compiling build/dbg/obj/third_party/srtp/crypto/math/datatypes.o
________Compiling build/dbg/obj/third_party/srtp/crypto/math/stat.o
________Compiling build/dbg/obj/third_party/srtp/crypto/kernel/alloc.o
________Compiling build/dbg/obj/third_party/srtp/crypto/kernel/crypto_kernel.o
________Compiling build/dbg/obj/third_party/srtp/crypto/kernel/err.o
________Compiling build/dbg/obj/third_party/srtp/crypto/kernel/key.o
________Compiling build/dbg/obj/third_party/srtp/crypto/rng/ctr_prng.o
________Compiling build/dbg/obj/third_party/srtp/crypto/rng/rand_source.o
________Compiling build/dbg/obj/third_party/srtp/srtp/ekt.o
________Compiling build/dbg/obj/third_party/srtp/srtp/srtp.o
________Creating library build/dbg/obj/libsrtp.a
________Indexing build/dbg/obj/libsrtp.a
Install file: "build/dbg/obj/libsrtp.a" as "build/dbg/lib/libsrtp.a"
________Compiling build/dbg/obj/base/macasyncsocket.o
________Linking build/dbg/obj/login
Install file: "build/dbg/obj/login" as "build/dbg/staging/login"
________Linking build/dbg/obj/call
Install file: "build/dbg/obj/call" as "build/dbg/staging/call"
________Linking build/dbg/obj/base_unittest
Install file: "build/dbg/obj/base_unittest" as "build/dbg/tests/base_unittest"
________Linking build/dbg/obj/p2p_unittest
Install file: "build/dbg/obj/p2p_unittest" as "build/dbg/tests/p2p_unittest"
________Linking build/dbg/obj/media_unittest
Install file: "build/dbg/obj/media_unittest" as "build/dbg/tests/media_unittest"
________Linking build/dbg/obj/sound_unittest
Install file: "build/dbg/obj/sound_unittest" as "build/dbg/tests/sound_unittest"
________Linking build/dbg/obj/xmllite_unittest
Install file: "build/dbg/obj/xmllite_unittest" as "build/dbg/tests/xmllite_unittest"
________Linking build/dbg/obj/xmpp_unittest
Install file: "build/dbg/obj/xmpp_unittest" as "build/dbg/tests/xmpp_unittest"
scons: done building targets.
这篇关于libjingle mac 编译错误 解决方案 (..完善中..)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!