i' have downloaded boost 1.45.0, installed Python 3.1.3 on my mac.
I have the build Boost with Python succesfully.
For this i had to edit my "project-config.jam" and add "using python : 3.1 : /Library/Frameworks/Python.framework/Versions/3.1;" into it.
At this point all seems to be allright.
Now when i try to use this lib in an xcode project, i have link errors:
Undefined symbols:
"boost::python::objects::make_nurse_and_patient(_object*, _object*)", referenced from:
_object* boost::python::with_custodian_and_ward_postcall<0ul, 1ul, boost::python::default_call_policies>::postcall<_object*>(_object* const&, _object*)in libFluxCore.a(Python.o)
"boost::python::objects::enum_base::enum_base(char const*, _object* ()(void const), void* (*)(_object*), void (*)(_object*, boost::python::converter::rvalue_from_python_stage1_data*), boost::python::type_info, char const*)", referenced from:
sandbox::BindComponentState() in libFluxCore.a(Python.o)
sandbox::BindCallOptions() in libFluxCore.a(Python.o)
sandbox::BindFrameRate() in libFluxCore.a(Python.o)
And lot of more...
Paths and lib are well set in my project.
Does someone have an idea of what can happen ?
Thanks.
I'v finally found this error. buid boost python with
./bjam toolset=darwin-4.2 architecture=x86 address-model=32 link=static threading=multi runtime-link=static
did the job, as i am on i86 arch.
Related
I need to use the Single Shot Multibox Detector implemented in Caffe. After cloning the repository, I've switched to the correct branch and I've installed all the dependencies required (by following the guide on caffe website). Unfortunately, when I compile at certain point I get this error:
.build_release/lib/libcaffe.so: undefined reference to "boost::re_detail_106200::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const"
But boost is installed. How can I resolve?
Add boost_regex to LIBRARIES variable in Makefile in case you use Makefile.config compilation, or to find_package(Boost 1.54 REQUIRED COMPONENTS system thread filesystem) line in caffe/cmake/Dependencies.cmake
While trying to build the latest GnuPG (2.1.1 modern), my build fails when trying to link t-stringhelp. make outputs:
ld: warning: ignoring file libcommon.a, file was built for archive which is not the architecture being linked (x86_64): libcommon.a
Undefined symbols for architecture x86_64:
"_compare_filenames", referenced from:
_main in t-stringhelp.o
"_make_absfilename_try", referenced from:
_main in t-stringhelp.o
"_make_filename_try", referenced from:
_main in t-stringhelp.o
"_percent_escape", referenced from:
_main in t-stringhelp.o
"_strconcat", referenced from:
_main in t-stringhelp.o
"_xstrconcat", referenced from:
_main in t-stringhelp.o
I don't know how to fix this as libcommon is part of the source, so it should build fine. When building with CFLAGS="-m64" (-arch x86_64 does nothing), I get this:
ld: warning: ignoring file ../common/libgpgrl.a, file was built for archive which is not the architecture being linked (x86_64): ../common/libgpgrl.a
Undefined symbols for architecture x86_64:
"_gnupg_rl_initialize", referenced from:
_main in gpg.o
I've also rebuilt all the depandancies (as I built them on Mavericks), except pinentry, as it can't find libiconv which is also installed. My configure outputs that its target is Darwin (x86_64-apple-darwin14.0.0), so this should work. I have also got all the latest prerequisites, tried to install everything in its own directory (--prefix=/usr/local/gnupg-2.1.1), build all the dependancies and GnuPG as 32 bits (again, fails on same error), created a separate build folder and tried to build in there, but only one thing so far has solved the error: looking at how libgpgrl.a is being built - it's only component is common/gpgrlhelp.c - so I cd'ed into g10 and tried to build gpg2, replacing ../common/libgpgrl.a with ../common/gpgrlhelp.o, the lib common.a with all of its object files, for all the libraries that didn't work. Then some programs weren't linking to libksba libgcrypt and libassuan, so I changed the Makefiles, so that they could link. I can now compile all the code well, I installed everything, but I get a new error, when I try to run gpg2:
dyld: lazy symbol binding failed: Symbol not found: __gcry_mpi_init
Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
Expected in: flat namespace
dyld: Symbol not found: __gcry_mpi_init
Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
Expected in: flat namespace
I have everything in my path, which is:
/usr/local/gnupg-2.1.1/bin:/usr/local/gnupg-2.1.1/lib:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
I could compile GnuPG-2.0.22 on Mavericks, but no version of GnuPG builds on Yosemite.
Please help, I'm really confused.
I’ve been running GnuPG 2.1 on Yosemite 10.10.2 (the latest public beta of as of this writing) for about a week and it’s been fine.
You can follow these directions for using brew tap or you can use the raw URL: brew install https://github.com/mtigas/homebrew-gpg21/raw/master/Formula/gnupg2.rb.
Note this formula installs GnuPG 2.1; not GnuPG 2.1.1, the version originally asked about. I can confirm this bug where gpg2 --refresh-keys fails with some keyservers using 2.1 (apparently fixed in 2.1.1) but it’ll get you 90% there.
It shouldn’t be hard to update the formula to install 2.1.1.
Update
Someone submitted a pull request for GNuPG 2.1.1 support—I just tried it and it worked great. Short answer: brew install https://raw.githubusercontent.com/calebthompson/homebrew-gpg21/2.1.1/Formula/gnupg2.rb.
Personally, I would install homebrew, which is a one-liner pasted from their website (http://brew.sh) then do
brew install gnupg
If therw are any problems, run
brew doctor
and heed the good doctor's advice.
Turns out I had a ranlib in /usr/local/bin/ranlib. It was broken, I don't know how it got there (I did try to build gcc at some point, it doesn't support make uninstall, so that's probably why). I just ran:
sudo mv /usr/local/ranlib /usr/local/ranlib_old
Then I just rebuilt all the dependancies, and it worked!
I am working on an OpenCV-based project on Xcode 5.02, OS X 10.9.
My OpenCV was installed using homebrew.
I get the following error
Undefined symbols for architecture x86_64:
"cv::namedWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int)"
I have added Header Search Paths /usr/local/include nonrecursive and /usr/local/include/opencv2 nonrecursive;
I have added Library Search Paths /usr/local/lib;
I have added all .dylib file under /usr/local/Cellar/opencv/2.4.3/lib to the project.
From what I can see, you are trying to run an Objective-C++ project, right? I presume that because cv::nameWindow is a c++ function of OpenCV.
You can have a look on this question, where I had a similar issue and solved it configuring the project properly.
This error means your XCode project is not finding the cv::namedWindow function. Are u sure OpenCV is properly installed in your PC? Can you run the C++ opencv functions from a standard c++ project? If so, the problem is just about your project configuration.
I have been using OpenCV for a while and also the imwrite function, but unfortunately this is not working any more.
I am running with OpenCV 2.4.3 with following sample code:
imwrite("somepath/somefile.png", myMat);
The error:
Undefined symbols for architecture x86_64:
"cv::imwrite(std::string const&, cv::_InputArray const&, std::__debug::vector<int, std::allocator<int> > const&)", referenced from:
MyProject::this_callback(int, void*) in MyProject.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The error looks somewhat familiar but i cannot determine whats wrong.
Yes, I've thought you were using XCode. I had the same problem. :)
If you change the project setup so that:
you use GNU++11 as C++ language dialect
libstdc++ (GNU C++ standard) as C++ standard library
your linking problem will go away.
I use Apple LLVM 4.1.
When I had this problem, I have tried just adding a new target to one of my old projects I knew, worked. Then I've just made that target a one-source-file program.
This must be a "magic" part of XCode as I think there was a time I could not get the same project working after a restart. :S
I did what Barnabas did and also got the issue on cvdef.h. I was getting desperate so and what I did was just changed the header file.
in /usr/local/cvdef.h line 205:
I changed
include <cstdint>
typedef std::uint32_t uint;
to:
include <tr1/cstdint>
typedef std::tr1::uint32_t uint;
based on this post
I think opencv devs should apply some changes to the code for 64bit..
use something like clang version 3.8.0 (trunk 257459), instead of gcc version 4.9.2 (MacPorts gcc49 4.9.2_1+universal) to compile
for reference, cmd: clang++ -std=c++11 `pkg-config --cflags --libs opencv` code.cpp -o code
I'm using Qt4.8 on OSX Leopard and instead of qmake+QtCreator I want to compile a very simple project using CMake on OSX to understand how to do a package.
While the very same project compiles and links smoothly under Linux, under my OSX box, this is the error message I always get in the linking phase:
ld warning: in /Library/Frameworks//QtGui.framework/QtGui, file is not of required architecture
ld warning: in /Library/Frameworks//QtCore.framework/QtCore, file is not of required architecture
Undefined symbols:
"QWidget::mousePressEvent(QMouseEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QObject::childEvent(QChildEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QWidget::actionEvent(QActionEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QCoreApplication::translate(char const*, char const*, char const*, QCoreApplication::Encoding)", referenced from:
etcetera etcetera.
This happens for every project I want to compile with cmake.
Any idea of what's going on?
Check what architecture (i386,x86_64) is being used by cmake (CMAKE_OSX_ARCHITECTURES). Try suggesting the architecture to cmake:
cmake -DCMAKE_OSX_ARCHITECTURES=x86_64