[solved] Problem compialing boost python example on Arch.
I have bean trying to compile the basic boost.python example program on arch, but g++ is spitting out errors stating that it cannot find Python.h and so on.
#include <boost/python.hpp>
char const* greet()
return "hello, world";
BOOST_PYTHON_MODULE(hello_ext)
using namespace boost::python;
def("greet", greet);
g++ boost_python_test.cpp
In file included from /usr/include/boost/python/detail/prefix.hpp:13,
from /usr/include/boost/python/args.hpp:8,
from /usr/include/boost/python.hpp:11,
from boost_python_test.cpp:1:
/usr/include/boost/python/detail/wrap_python.hpp:50:23: error: pyconfig.h: No such file or directory
/usr/include/boost/python/detail/wrap_python.hpp:75:24: error: patchlevel.h: No such file or directory
/usr/include/boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for this version of Boost.Python.
/usr/include/boost/python/detail/wrap_python.hpp:142:21: error: Python.h: No such file or directory
^C
tonnes of errors.
Last edited by Hessiess (2009-04-30 21:25:26)
JK3mp wrote:Don't forget to put SOLVED in the title on your solved issue's please.
Done
Similar Messages
-
Hi Folks, I have problems with Boost Python!!
Here is my sourcecode:
char const* greet()
return "hello, world";
#include <boost/python.hpp>
BOOST_PYTHON_MODULE(hello_ext)
using namespace boost::python;
def("greet", greet);
When I compile this with gcc, I will get the following error:
In file included from /usr/include/boost/python/detail/prefix.hpp:13:0,
from /usr/include/boost/python/args.hpp:8,
from /usr/include/boost/python.hpp:11,
from test.cxx:1:
/usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
# include <pyconfig.h>
If I now specify the path to pyconfig, it will get even worse:
gcc -I/usr/local/include/python3.3/ test.cxx -o test
Because I get:
/usr/lib/gcc/x87_64-unknown-linux-gnu/4.8.2/../../../../lib/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/ccnN7atN.o: In function `PyInit_hello_ext':
test.cxx:(.text+0x21): undefined reference to `__cxa_guard_acquire'
test.cxx:(.text+0x7a): undefined reference to `__cxa_guard_release'
test.cxx:(.text+0x89): undefined reference to `boost::python::detail::init_module(PyModuleDef&, void (*)())'
/tmp/ccnN7atN.o: In function `__static_initialization_and_destruction_0(int, int)':
test.cxx:(.text+0xcf): undefined reference to `std::ios_base::Init::Init()'
test.cxx:(.text+0xde): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccnN7atN.o: In function `boost::python::type_info::name() const':
test.cxx:(.text._ZNK5boost6python9type_info4nameEv[_ZNK5boost6python9type_info4nameEv]+0x1f): undefined reference to `boost::python::detail::gcc_demangle(char const*)'
/tmp/ccnN7atN.o: In function `boost::python::to_python_value<char const* const&>::operator()(char const* const&) const':
test.cxx:(.text._ZNK5boost6python15to_python_valueIRKPKcEclES5_[_ZNK5boost6python15to_python_valueIRKPKcEclES5_]+0x1b): undefined reference to `boost::python::converter::do_return_to_python(char const*)'
/tmp/ccnN7atN.o: In function `boost::python::to_python_value<char const* const&>::get_pytype() const':
test.cxx:(.text._ZNK5boost6python15to_python_valueIRKPKcE10get_pytypeEv[_ZNK5boost6python15to_python_valueIRKPKcE10get_pytypeEv]+0x9): undefined reference to `PyUnicode_Type'
/tmp/ccnN7atN.o: In function `boost::python::api::object::object()':
test.cxx:(.text._ZN5boost6python3api6objectC2Ev[_ZN5boost6python3api6objectC5Ev]+0xd): undefined reference to `_Py_NoneStruct'
/tmp/ccnN7atN.o: In function `void boost::python::def<char const* (*)()>(char const*, char const* (*)())':
test.cxx:(.text._ZN5boost6python3defIPFPKcvEEEvS3_T_[_ZN5boost6python3defIPFPKcvEEEvS3_T_]+0x41): undefined reference to `boost::python::detail::scope_setattr_doc(char const*, boost::python::api::object const&, char const*)'
/tmp/ccnN7atN.o: In function `boost::python::api::object boost::python::detail::make_function_aux<char const* (*)(), boost::python::default_call_policies, boost::mpl::vector1<char const*> >(char const* (*)(), boost::python::default_call_policies const&, boost::mpl::vector1<char const*> const&)':
test.cxx:(.text._ZN5boost6python6detail17make_function_auxIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS4_EEEENS0_3api6objectET_RKT0_RKT1_[_ZN5boost6python6detail17make_function_auxIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS4_EEEENS0_3api6objectET_RKT0_RKT1_]+0x52): undefined reference to `boost::python::objects::function_object(boost::python::objects::py_function const&)'
/tmp/ccnN7atN.o: In function `boost::python::objects::py_function::py_function<boost::python::detail::caller<char const* (*)(), boost::python::default_call_policies, boost::mpl::vector1<char const*> > >(boost::python::detail::caller<char const* (*)(), boost::python::default_call_policies, boost::mpl::vector1<char const*> > const&)':
test.cxx:(.text._ZN5boost6python7objects11py_functionC2INS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS7_EEEEEERKT_[_ZN5boost6python7objects11py_functionC5INS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS7_EEEEEERKT_]+0x19): undefined reference to `operator new(unsigned long)'
test.cxx:(.text._ZN5boost6python7objects11py_functionC2INS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS7_EEEEEERKT_[_ZN5boost6python7objects11py_functionC5INS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS7_EEEEEERKT_]+0x47): undefined reference to `operator delete(void*)'
/tmp/ccnN7atN.o: In function `boost::python::objects::py_function_impl_base::py_function_impl_base()':
test.cxx:(.text._ZN5boost6python7objects21py_function_impl_baseC2Ev[_ZN5boost6python7objects21py_function_impl_baseC5Ev]+0xf): undefined reference to `vtable for boost::python::objects::py_function_impl_base'
/tmp/ccnN7atN.o:(.rodata._ZTVN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEEE[_ZTVN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEEE]+0x30): undefined reference to `boost::python::objects::py_function_impl_base::max_arity() const'
/tmp/ccnN7atN.o: In function `boost::python::objects::caller_py_function_impl<boost::python::detail::caller<char const* (*)(), boost::python::default_call_policies, boost::mpl::vector1<char const*> > >::~caller_py_function_impl()':
test.cxx:(.text._ZN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEED2Ev[_ZN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEED5Ev]+0x1f): undefined reference to `boost::python::objects::py_function_impl_base::~py_function_impl_base()'
test.cxx:(.text._ZN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEED2Ev[_ZN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEED5Ev]+0x34): undefined reference to `operator delete(void*)'
/tmp/ccnN7atN.o: In function `boost::python::objects::caller_py_function_impl<boost::python::detail::caller<char const* (*)(), boost::python::default_call_policies, boost::mpl::vector1<char const*> > >::~caller_py_function_impl()':
test.cxx:(.text._ZN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEED0Ev[_ZN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEED0Ev]+0x20): undefined reference to `operator delete(void*)'
/tmp/ccnN7atN.o:(.rodata._ZTIN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEEE[_ZTIN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEEE]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/tmp/ccnN7atN.o:(.rodata._ZTIN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEEE[_ZTIN5boost6python7objects23caller_py_function_implINS0_6detail6callerIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEEEEE]+0x10): undefined reference to `typeinfo for boost::python::objects::py_function_impl_base'
/tmp/ccnN7atN.o: In function `boost::python::detail::caller_arity<0u>::impl<char const* (*)(), boost::python::default_call_policies, boost::mpl::vector1<char const*> >::signature()':
test.cxx:(.text._ZN5boost6python6detail12caller_arityILj0EE4implIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEE9signatureEv[_ZN5boost6python6detail12caller_arityILj0EE4implIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEE9signatureEv]+0x26): undefined reference to `__cxa_guard_acquire'
test.cxx:(.text._ZN5boost6python6detail12caller_arityILj0EE4implIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEE9signatureEv[_ZN5boost6python6detail12caller_arityILj0EE4implIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEE9signatureEv]+0x5a): undefined reference to `__cxa_guard_release'
test.cxx:(.text._ZN5boost6python6detail12caller_arityILj0EE4implIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEE9signatureEv[_ZN5boost6python6detail12caller_arityILj0EE4implIPFPKcvENS0_21default_call_policiesENS_3mpl7vector1IS6_EEE9signatureEv]+0x95): undefined reference to `__cxa_guard_abort'
/tmp/ccnN7atN.o: In function `boost::python::detail::signature_arity<0u>::impl<boost::mpl::vector1<char const*> >::elements()':
test.cxx:(.text._ZN5boost6python6detail15signature_arityILj0EE4implINS_3mpl7vector1IPKcEEE8elementsEv[_ZN5boost6python6detail15signature_arityILj0EE4implINS_3mpl7vector1IPKcEEE8elementsEv]+0x1d): undefined reference to `__cxa_guard_acquire'
test.cxx:(.text._ZN5boost6python6detail15signature_arityILj0EE4implINS_3mpl7vector1IPKcEEE8elementsEv[_ZN5boost6python6detail15signature_arityILj0EE4implINS_3mpl7vector1IPKcEEE8elementsEv]+0x51): undefined reference to `__cxa_guard_release'
test.cxx:(.text._ZN5boost6python6detail15signature_arityILj0EE4implINS_3mpl7vector1IPKcEEE8elementsEv[_ZN5boost6python6detail15signature_arityILj0EE4implINS_3mpl7vector1IPKcEEE8elementsEv]+0x69): undefined reference to `__cxa_guard_abort'
/tmp/ccnN7atN.o: In function `boost::python::type_info boost::python::type_id<char const*>()':
test.cxx:(.text._ZN5boost6python7type_idIPKcEENS0_9type_infoEv[_ZN5boost6python7type_idIPKcEENS0_9type_infoEv]+0xd): undefined reference to `typeinfo for char const*'
/tmp/ccnN7atN.o: In function `boost::python::converter::expected_pytype_for_arg<char const*>::get_pytype()':
test.cxx:(.text._ZN5boost6python9converter23expected_pytype_for_argIPKcE10get_pytypeEv[_ZN5boost6python9converter23expected_pytype_for_argIPKcE10get_pytypeEv]+0x1b): undefined reference to `boost::python::converter::registry::query(boost::python::type_info)'
test.cxx:(.text._ZN5boost6python9converter23expected_pytype_for_argIPKcE10get_pytypeEv[_ZN5boost6python9converter23expected_pytype_for_argIPKcE10get_pytypeEv]+0x32): undefined reference to `boost::python::converter::registration::expected_from_python_type() const'
/tmp/ccnN7atN.o: In function `boost::python::type_info boost::python::type_id<char>()':
test.cxx:(.text._ZN5boost6python7type_idIcEENS0_9type_infoEv[_ZN5boost6python7type_idIcEENS0_9type_infoEv]+0xd): undefined reference to `typeinfo for char'
/tmp/ccnN7atN.o:(.eh_frame+0x42b): undefined reference to `__gxx_personality_v0'
collect2: error: ld returned 1 exit status
Shit happens but what I can I do now. The bad thing is also that I need this library as dependecy for graph-tool, therefore it is necessary that for it to work without user specified path during compilation!brewlius_cesar wrote:
Well, pks is half right I believe. Well maybe one third.
I assumed the poster was writing a python extension module, which is similar to a shared library. Shared libraries should not have a function called main with any signature.
Second, you are not required to resolve undefined symbols when linking a shared library. Only when you link against a final executable.
That said, pks is probably right for this particular circumstance. You should link your extension module against boost python. This is because there is no executable going to be built from your library, it is simply going to be loaded dynamically by Python and Python will not know how/where to get the necessarry libs for boost.
This last part may not be required, some boost libraries are entirely included in the header file, and do not require you to link against a shared library.
Well, I am not familiar with boost::python at all, just with generic C programming. So if you want to create a shared object you're correct. -
How to solve problem - " Safari cannot open page because it isn't connected to the internet" but the airport is ok. signal full and i have n IP address. and i m using Macbook pro.
OS snow leopard and above...Do you have this problem with all websites, or only some? If only some, which ones?
-
I upgraded to Maverick and now Time Machine will not connect to the external hard drive to back up files. The external hard drive is a Western Digital "My Book Live" 2 TB. How do I solve problem?
I also had problem accessing my WD MyBookLive after upgrading to Maverick.
To resolve the problem, I used Connect To Server (Cmd K) to specify the IP address.
Then I enter a user id and password I created in the MyBookLive.
You can also verify that you have admin access to the MyBookLive using Safari or Chrome.
Just enter the MyBookLive IP address as the URL. -
I've swapped to i5c (great phone) so my hubby has my i4s with pay as u go but now it won't load or sent e-mails! I've tried tech support suggested by Talkmobile for 'fix' but it hasn't solved problem,any ideas?..
Try this from MacFixIt as well:
In the case of drive directory damage or problems with permissions, the solution is usually to use Apple's Disk Utility to repair the disk. Of course, you won't be able to perform this operation normally (simply launching the Disk Utility application, located in Applications/Utilities, and initiating a disk repair) if your system will not startup. So two options exist:
* Insert your Mac OS X 10.4.x (Tiger) media (DVD or CD) and restart the computer while holding down the "C" key. Once the computer has booted from the installation disc, select "Utilities" from the menubar and open Disk Utility. Repair the disk, then quit Disk Utility and restart your system.
* Alternatively, you can repair the disk while booted in single user mode if you do not have access to a retail Mac OS X 10.4.x (Tiger) DVD/CD. To startup in single user mode, hold down the "Command" and "S" keys simultaneously at startup. Once properly booted, type the command fsck at the prompt. Repeat these process until no errors appear. -
How to solve problem :- rep-188-Report Server acccepts only Batch jobs
How to solve problem :- rep-188-Report Server acccepts only Batch jobs
Report server :- 10gR1Hello,
Could you give us some details about the command line ?
What is the value of DESTYPE ?
Regards -
same problem as everybody after having updated my apple tv. apple is to blame for this and should solve problem oe replace unit. lost confident with apple products.
What problem would that be? There are always going to be people who experience problems after an update and this is a community for helping with such things.
If you can elaborate on the issue it will make it easier for someone to help. -
Use CS4.
Switched computer with Win OS to iMac computer with OS X.
Downloaded CS4 on iMac.
But old product key entered is not recognised.
How to solve problem?There is nothing to resolve. Serial numbers are platform specific, but platform swaps only apply to current versions, meaning CS&. Your CS4 is not eligible for an upgrade, so your only option is to buy a new CS6 license or sign up for Creative Cloud.
Mylenium -
I bought ifiles app. But I paid a lot of time prize. I don't understand why... Please solve problem!
tuydun wrote:
.. Please solve problem!
To Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact -
Abs PKGBUILD does not create boost python
Hi there,
just a quick question. If I install boost with pacman, it installs also library for boost python bindings.
If I try to compile it through abs, and install afterwards, libboost_python is missing.
Is there any reason for that? Or am I doing something obviously stupid?
cheers
Vlado
Last edited by vlado (2007-04-03 04:48:50)It is not created automatically... Just create it if needed.
-
Getting "error reading settings" with the service profile manager in Lion server OS. Why and what can I do to solve problem?
I have also had the 'Error reading settings' problem in Profile Manager, despite trying everything in the discussions and clean reinstalls (which work for a little while only).
It seems that various different fixes work for some people but not others; and the underlying cause of the problem has not been resolved.
There are now numerous threads on this problem (there are yet others with similar problems):
https://discussions.apple.com/thread/3189397
https://discussions.apple.com/thread/3195100
https://discussions.apple.com/thread/3212015
https://discussions.apple.com/thread/3208533
https://discussions.apple.com/thread/3249062
https://discussions.apple.com/thread/3199734
https://discussions.apple.com/thread/3212304
I have posted this in each to try and pull things together a bit.
Does anyone know if Apple has acknowledged the issue and offered an official response? -
Steps followed: all Adobe products (CS6 Suite and CC) have been removed (w/uninstaller and manual Library cleanup) and reinstalled (from discs and downloads); permissions corrected as per KB note on Error 16, to no change. This occurred after updating Mac OS to 10.9x. The OS was then reinstalled, new admin & standard users created (MacPro hardware passes all tests). "Error 16" permission solution performed at every stage to no change in error generation. Adobe Reader, Lightroom 4, and CS6Bridge do launch, but Acrobat Professional, Photoshop (13, CS6), and CC Photoshop stop launch w/error 16. Stumped!
Thanks for the suggestion, Gene, but it had no affect on the ³error 16²
situation, I¹m afraid. I think I¹m going to have to start with a new drive
and import/update until I find the source of this issue.
Jim
"Error 16" solution doesn't solve problem, same error message pops up.
Further steps?
created by gener7 <https://forums.adobe.com/people/gener7> in Photoshop
General Discussion - View the full discussion
<https://forums.adobe.com/message/7154907#7154907>
Permissions problem. Open Terminal and copy/paste this line: sudo chmod -R
777 /Library/Application\ Support/Adobe Gene
If the reply above answers your question, please take a moment to mark this
answer as correct by visiting:
https://forums.adobe.com/message/7154907#7154907 and clicking Correct¹ below
the answer Replies to this message go to everyone subscribed to this thread,
not directly to the person who posted the message. To post a reply, either
reply to this email or visit the message page:
Please note that the Adobe
Forums do not accept email attachments. If you want to embed an image in your
message please visit the thread in the forum and click the camera icon:
https://forums.adobe.com/message/7154907#7154907 To unsubscribe from this
thread, please visit the message page at
, click "Following" at the
top right, & "Stop Following" Start a new discussion in Photoshop General
Discussion by email
<mailto:[email protected]> or
at Adobe Community
<https://forums.adobe.com/choose-container.jspa?contentType=1&containerType=14
&container=4694> For more information about maintaining your forum email
notifications please go to https://forums.adobe.com/thread/1516624.
> -
Details:
i have 15 dollar but i cant by gem on clash of clan game
when i want to buy gem this massage appear (your purchase could not be completed contract i tune store support to complete this transaction
please help me to solve problemرائد wrote:
please help me to solve problem
Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact -
i have 99 dollar but i cant by gem on clash of clan game when i want to buy gem this massage appear (your purchase could not be completed contract i tune store support to complete this transaction please help me to solve problem agen !!
halep meIf I were you, I would "Contact iTunes support to complete this transaction."
http://apple.com/emea/support/itunes/contact.html -
HT204266 how to solve problem 'your apple id has been disable'?
how to solve problem 'your apple id has been disable'?
Depending on why it's been disabled, you might be able to re-enable it via this page : http://appleid.apple.com
Or you might need to contact Apple : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page
Maybe you are looking for
-
ITunes locks PC during large downloads
This started happening about a month ago and there have been no major changes to my system (I've had this system for over a year). PC running Windows Home 7 Premium 64 bit with SP1 and all available Microsoft updates installed. iTunes is version 10.
-
System refresh from Production to Quality
Hi, We are going for system refresh from Production to Quality. We are at SAP NetWeaver 2004s with 700 release and at 0021 level. Our data base system is DB6 with the release 09.07.0000 I understand that there is a note 886102 available for the syste
-
E66 Loses date and time.
I set an alarm for work days. I switched the phone off with the alarm set. The alarm did not ring, but the display light flashed a couple of times at the approriate alarm time and then nothing .. No alarm. I swithced the phone on, it immediately asks
-
I need help with the settings that allow the iphone 3gs to autosynch when it is plugged in and run itunes. Have just had a nasty trojan and the IT people reset all of the security settings on this computer. Which settings need to be altered to get
-
Cannot apply Flash Builder 4.7 Premium upgrade license
We purchased Flash Builder 4.7 Premium upgrade license. When we entered the new key and then the original 4.0 Premium license key, it said "This serial number is not for a qualifying product. Please try again.". From the License Certificate paperwo