Question
I have got a browser plugin created from firebreath worked fine on mac osx 10.8. But I got an "could not load UploaderPlugin(the name of my plugin)" error from Chrome on mac osx 10.7.
Several external libraries are included in my plugin project. After several hours of work I found that when I removed the libcurl library from my project the error went away, and the same error appears each time I try to include the libcurl library.
So it is quite clear that the error has something to do with the libcurl library. Since libcurl relies on openssl and zlib. I compiled the three libraries from source code again but the same error remains unresolved.
error message from the console
13-10-10 下午12:56:33.500 Google Chrome Helper EH: Error loading /Users/admin/Library/Internet Plug-Ins/npUploaderPlugin.plugin/Contents/MacOS/npUploaderPlugin: dlopen(/Users/admin/Library/Internet Plug-Ins/npUploaderPlugin.plugin/Contents/MacOS/npUploaderPlugin, 262): Symbol not found: _CAST_ecb_encrypt
Referenced from: /Users/admin/Library/Internet Plug-Ins/npUploaderPlugin.plugin/Contents/MacOS/npUploaderPlugin
Expected in: /usr/lib/libSystem.B.dylib
in /Users/admin/Library/Internet Plug-Ins/npUploaderPlugin.plugin/Contents/MacOS/npUploaderPlugin
13-10-10 下午12:56:33.501 [0x0-0x2a82a8].com.google.Chrome: [10071:2819:1010/125633:ERROR:webplugin_delegate_proxy.cc(390)] PluginMsg_Init returned false
13-10-10 下午12:56:33.501 [0x0-0x2a82a8].com.google.Chrome: [10071:2819:1010/125633:ERROR:webplugin_impl.cc(258)] Couldn't initialize plug-in
Deciding from the error msg I can see that the main problem is that the symbol _CAST_ecb_encrypt could not be found. I googled it and got nothing concerned.
envrionment
mac os x 10.8 + chrome 28.0.1500.71 (works fine)
mac os x 10.7 + chrome 29.0.1547.22 beta (got the error msg)
firebreath version: 1.7
libcurl version: 7.26.0
openssl version: 1.0.1c
zlib version: 1.2.7
c-ares version: 1.10.0
Any kind of advice would be appreciated. And plz do not hesitate to inform me if you need more detailed information.
It actually may or may not be directly related to libcurl; it could be something that curl is causing to be linked in because of how you're linking it. My first guess would be that you need to set your deployment target to 10.7; if you build on 10.8, by default the target and SDK you will use are the 10.8 target and 10.8 sdk. usually you can safely use the 10.8 sdk to build for 10.7, but you may need to set the deployment target.
You can do that by adding -D CMAKE_OSX_DEPLOYMENT_TARGET=10.8 to your prep script:
../firebreath/prepmac.sh ./projectDir ./buildDir -D CMAKE_OSX_DEPLOYMENT_TARGET=10.8
Related
I am on a Mac using CodeLite for C++ and am trying to install the SFML library. I followed a tutorial (found here: https://en.sfml-dev.org/forums/index.php?topic=18820.0) and I get the following error after doing everything the tutorial say:
dyld: Library not loaded: #rpath/libsfml-graphics.2.5.dylib
Referenced from: /Users/willbur/Desktop/School/CompSci142/SFML-
Demo/Debug/SFML-Demo
Reason: image not found
Abort trap: 6
Does anyone know how to fix this? I copied all the .dylib files to the debug folder and I still get the error. The SFML version is the 2.5 MacOS Clang.
Thanks!
After running into this same issue I deleted my downloaded version of SFML and re-installed using Homebrew
brew install sfml
Homebrew will automatically put the sfml folders at:
/usr/local/Cellar/sfml/{installed_version_number}/
From here setup your project in the same manner as in the listed tutorial you followed except replacing the Compiler Include Paths with:
/usr/local/Cellar/sfml/{installed_version_number}/include
and the Linker Libraries search path with:
/usr/local/Cellar/sfml/{installed_version_numer}/lib
You can also follow along with this resource to get it setup: SFML with CodeLite on Mac OS
I am trying to deploy a Qt program on Mac according to this link. After going through with otool -L on my executable and all of the libraries that it depends on, which I copied into the application bundle, I get this error in QtCreator's application output when I try to run it.
This application failed to start because it could not find or load the Qt platform plugin "cocoa".
Reinstalling the application may fix this problem.
The program has unexpectedly finished.
I've tried copying the qt platform plugins libqcocoa.dylib and changing the plugins directory in qt.conf, according to this, but it still fails.
Also worth pointing out, I first tried to use qt's macdeployqt tool, but it fails with this message, despite being the first time I run it on the executable:
ERROR: Could not find bundle binary for "MyProgram.app/Contents/MacOS/MyProgram"
ERROR: "otool: can't open file: (No such file or directory)"
WARNING:
WARNING: Could not find any external Qt frameworks to deploy in "MyProgram.app/Contents/MacOS/MyProgram"
WARNING: Perhaps macdeployqt was already used on "MyProgram.app/Contents/MacOS/MyProgram" ?
WARNING: If so, you will need to rebuild "MyProgram.app/Contents/MacOS/MyProgram" before trying again.
ERROR: Could not find bundle binary for "MyProgram.app/Contents/MacOS/MyProgram"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/platforms/libqcocoa.dylib"
ERROR: to "MyProgram.app/Contents/MacOS/MyProgram/Contents/PlugIns/platforms/libqcocoa.dylib"
ERROR: file copy failed from "/Developer/Applications/Qt/plugins/printsupport/libcocoaprintersupport.dylib"
ERROR: to "MyProgram.app/Contents/MacOS/GraphiteMiniEditor/Contents/PlugIns/printsupport/libcocoaprintersupport.dylib"
Re macdeployqt fails: it seems like, for the argument to macdeployqt you are passing the path to the executable instead of the path to the bundle. I.e. just pass .../MyProgram.app instead of .../MyProgram.app/Contents/MacOS/MyProgram.
(But I am also unable to get it find libqcocoa, in a sandboxed app. I may resort to linking that statically into my app.)
To give Kamil Klimek's solution some more attention (It solved the problem for me):
I had the same problem when I installed QtCreator (Qt 5.x) with the offline installer, but apparently also had Qt (4.x) installed through Homebrew (probably pulled in as a dependency). Compiling the code with 5.x, and deploying it with the 4.x macdeployqt script doesn't work.
So, make sure that e.g.:
which macdeployqt
calls macdeployqt from the same Qt version / path used to compile the code.
I had this error with OS X Lion, using Qt 5.4.2. When I installed the Xcode command line utilities, then the error went away and macdeployqt worked.
I installed macports and 5 required libraries and can't get this SDK to compile in a C++ command line application inside XCode.
The 5 libraries are
libcryptopp
openssl
readline
freeimage
curl
XCode is generating errors about undefined symbols for architecture x86_64. I started with about 100 but trimmed it down to 22 by correctly importing the libraries and setting the correct header search paths (/opt/local/include). I really want to start playing with this SDK and I'm about at my wits end. There is no support on the site, no repo or version control, just a zip with some source files. Documentation doesn't spell out how the SDK works either.
If you can help I would be forever grateful. The SDK can be found by following this link
https://mega.co.nz/#dev
If it's still relevant you can check my Mega formulae pull request for Homebrew project.
Like many others, I'm taking the CS106B class on iTunes and, although the class is old, I am attempting to use the Stanford C++ libraries that are current. They are found here: http://www.stanford.edu/class/cs106b/.
During the Build Phase of projects, I have inserted into "Link Binary with Libraries" the files "random.h" and "libStanfordCPPlib.a". When I do this, I get the following error messages:
Check dependencies
warning: skipping file '/Users/lewis/Documents/Think Like a Programmer/CS106/VotingSimulation/../../../Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/random.h' (unexpected file type 'sourcecode.c.h' in Frameworks & Libraries build phase)
ld: warning: ignoring file /Users/lewis/Documents/Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/libStanfordCPPLib.a, file was built for archive which is not the architecture being linked (x86_64): /Users/lewis/Documents/Programming Abstractions/Assignment 1/Assignment1-xcode/0 - Warmup/StanfordCPPLib/libStanfordCPPLib.a
Undefined symbols for architecture x86_64:
"randomChance(double)", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Mac OS X 10.7.5 and XCode 4.6.2. I have set the Build Settings Base SDK to OS X 10.7 for both the Project and the Target.
It appears to me that the "libStanfordCPPlib.a" file may be an archive file that I have to unarchive before I can link the implementation code for the header files. Is this what I need to do, and if so, how do I do it? Am I doing something else wrong in linking the files?
I'm a noob and I'd appreciate help from anyone who has been successful in getting the current Stanford CS106B C++ libraries to work in XCode 4.6.2.
I just ran into this problem myself after upgrading to the newest version of xcode (ver. 5.0, OSX ver. 10.8.5).
Try switching the architecture of the project to 32-bit Intel (i386). The default is "Standard Architectures 64-bit Intel (x86_64)".
I'm currently using xcode 6.4 and trying to work through the cs 106b course work, I had the same issue of not being able to run the sample files and assignment files (can be found here btw http://web.stanford.edu/class/archive/cs/cs106b/cs106b.1136/ ). After changing the Architectures for both the Project and Target to 32-bit-intel as listed above I still received errors. I had to take the additional step of changing the OSX deployment target from 10.10 to 10.8 under the Project info.
This allowed the program to build but I received a notification that i needed to install the Java Runtime Environment, and there was no consult output. Installing this did not resolve the issue. I was only able to fully execute the code after installing the Java Development Kit. I am now able to compile all files for the course.
I hope this update helps more recent attempts to access this info.
I hope you've found an answer to your problem by now, but as I was suffering from a similar problem, trying to get xcode 5.1 to compile Warmup.cpp, I thought I'd post my solution for those others trying to get xcode to work with the cs106b libraries.
After struggling with xcode 5.1.1 and 5.0.2, I downloaded xcode 4.6.3 off of the apple dev site, www.developer.apple.com, and trashed the later versions. After installing 4.6.3, I still got errors, but after switching the Architecures for the Project and for the Target, to "32-bit-Intel", as messysaurus suggests, the warmupp.cpp compiled fine. Trying this same technique with xcode 5.1.1 and 5.0.2 yielded no results.
Hope this helps anyone else running into problems.
I have successfully Built and compiled VTK with Qt on Mac osx 10.6.7. Then according to the requirements I changed configuration in CMAKE so that the target version is 10.5. I compiled VTK with Qt again and it was successful, with cones tutorials examples running. But whenever i compile my own application which is built using QVTK Widget i got this error
"Check with the developer to make sure
Application works with this version of MacOS
X. You may need to reinstall the
application ..."
Following is my CMAKE Configuration
BUILD_EXAMPLES checked
BUILD_SHARED_LIBS checked
CMAKE_OSX_ARCHITECTURES x86_64
CMAKE_OSX_DEPLOYMENT_TARGET 10.5
CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk
VTK_USE_COCOA checked
VTK_USE_CARBON unchecked
VTK_USE_QT checked
VTK_USE_QVT_QTOPENGL checked
I have also ran following command on the terminal
export MACOSX_DEPLOYMENT_TARGET=10.5
Every thing in my application compiles with both QtCreator and XCode but does not execute by giving the error as mentioned above.
In the above if i change everything from 10.5 to 10.6 everything start working. But according to requirement i need to have it compatible with 10.5.
Can someone please let me know is there anything else i need to do? Am i missing something here?
Regards,
Rashid