build boost - Linux (Ubuntu)



  • Hey,

    ich brauche boost auf meinem Linuxsystem, und zwar auch die teile die man "baut", nun ist aber das Problem das egal wie ich bjam ausführe (ob mit oder ohne "sudo"), es werden Fehler über fehler geworfen die ich mir nicht erklären kann

    gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.3/release/link-static/threading-multi/converter/arg_to_python_base.o
    In file included from ./boost/python/detail/prefix.hpp:13,
                     from ./boost/python/handle.hpp:8,
                     from ./boost/python/converter/arg_to_python_base.hpp:7,
                     from libs/python/src/converter/arg_to_python_base.cpp:6:
    ./boost/python/detail/wrap_python.hpp:75:24: error: patchlevel.h: No such file or directory
    ./boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for this version of Boost.Python.
    ./boost/python/detail/wrap_python.hpp:142:21: error: Python.h: No such file or directory
    ./boost/python/detail/wrap_python.hpp:203:4: error: #error "HAVE_LONG_LONG defined but not PY_LONG_LONG or LONG_LONG"
    In file included from ./boost/python/cast.hpp:13,
                     from ./boost/python/handle.hpp:10,
                     from ./boost/python/converter/arg_to_python_base.hpp:7,
                     from libs/python/src/converter/arg_to_python_base.cpp:6:
    ./boost/python/base_type_traits.hpp:24: error: ‘PyObject’ was not declared in this scope
    ./boost/python/base_type_traits.hpp:24: error: template argument 1 is invalid
    ./boost/python/base_type_traits.hpp:30: error: ‘PyTypeObject’ was not declared in this scope
    ./boost/python/base_type_traits.hpp:30: error: template argument 1 is invalid
    ./boost/python/base_type_traits.hpp:36: error: ‘PyMethodObject’ was not declared in this scope
    ./boost/python/base_type_traits.hpp:36: error: template argument 1 is invalid
    In file included from ./boost/python/handle.hpp:11,
                     from ./boost/python/converter/arg_to_python_base.hpp:7,
                     from libs/python/src/converter/arg_to_python_base.cpp:6:
    ./boost/python/errors.hpp:51: error: expected constructor, destructor, or type conversion before ‘*’ token
    In file included from ./boost/python/handle.hpp:13,
                     from ./boost/python/converter/arg_to_python_base.hpp:7,
                     from libs/python/src/converter/arg_to_python_base.cpp:6:
    ./boost/python/handle_fwd.hpp:12: error: expected type-specifier before ‘PyObject’
    ./boost/python/handle_fwd.hpp:12: error: expected ‘>’ before ‘PyObject’
    In file included from ./boost/python/handle.hpp:14,
                     from ./boost/python/converter/arg_to_python_base.hpp:7,
                     from libs/python/src/converter/arg_to_python_base.cpp:6:
    ./boost/python/refcount.hpp: In function ‘T* boost::python::incref(T*)’:
    ./boost/python/refcount.hpp:16: error: ‘PyObject’ was not declared in this scope
    ./boost/python/refcount.hpp: In function ‘T* boost::python::xincref(T*)’:
    ./boost/python/refcount.hpp:23: error: ‘PyObject’ was not declared in this scope
    ./boost/python/refcount.hpp: In function ‘void boost::python::decref(T*)’:
    ./boost/python/refcount.hpp:30: error: ‘PyObject’ was not declared in this scope
    ./boost/python/refcount.hpp: In function ‘void boost::python::xdecref(T*)’:
    ./boost/python/refcount.hpp:36: error: ‘PyObject’ was not declared in this scope
    In file included from ./boost/python/converter/arg_to_python_base.hpp:7,
                     from libs/python/src/converter/arg_to_python_base.cpp:6:
    ./boost/python/handle.hpp: In constructor ‘boost::python::handle<T>::handle(boost::python::detail::borrowed_reference_t*)’:
    ./boost/python/handle.hpp:130: error: ‘PyObject’ was not declared in this scope
    ./boost/python/handle.hpp:130: error: expected primary-expression before ‘)’ token
    ./boost/python/handle.hpp: At global scope:
    ./boost/python/handle.hpp:157: error: ‘PyTypeObject’ was not declared in this scope
    ./boost/python/handle.hpp:157: error: template argument 1 is invalid
    ./boost/python/handle.hpp:157: error: invalid type in declaration before ‘;’ token
    ./boost/python/handle.hpp:256: error: expected initializer before ‘*’ token
    In file included from libs/python/src/converter/arg_to_python_base.cpp:6:
    ./boost/python/converter/arg_to_python_base.hpp:17: error: template argument 1 is invalid
    In file included from ./boost/python/converter/registrations.hpp:12,
                     from libs/python/src/converter/arg_to_python_base.cpp:8:
    ./boost/python/converter/convertible_function.hpp:10: error: typedef ‘boost::python::converter::convertible_function’ is initialized (use decltype instead)
    ./boost/python/converter/convertible_function.hpp:10: error: ‘PyObject’ was not declared in this scope
    ./boost/python/converter/convertible_function.hpp:10: error: expected primary-expression before ‘)’ token
    In file included from ./boost/python/converter/registrations.hpp:13,
                     from libs/python/src/converter/arg_to_python_base.cpp:8:
    ./boost/python/converter/constructor_function.hpp:13: error: typedef ‘boost::python::converter::constructor_function’ is initialized (use decltype instead)
    ./boost/python/converter/constructor_function.hpp:13: error: ‘PyObject’ was not declared in this scope
    ./boost/python/converter/constructor_function.hpp:13: error: ‘source’ was not declared in this scope
    ./boost/python/converter/constructor_function.hpp:13: error: expected primary-expression before ‘*’ token
    ./boost/python/converter/constructor_function.hpp:13: error: expected primary-expression before ‘)’ token
    In file included from ./boost/python/converter/registrations.hpp:14,
                     from libs/python/src/converter/arg_to_python_base.cpp:8:
    ./boost/python/converter/to_python_function_type.hpp:15: error: expected initializer before ‘*’ token
    In file included from libs/python/src/converter/arg_to_python_base.cpp:8:
    ./boost/python/converter/registrations.hpp:22: error: ‘convertible_function’ does not name a type
    ./boost/python/converter/registrations.hpp:28: error: ‘convertible_function’ does not name a type
    ./boost/python/converter/registrations.hpp:29: error: ‘constructor_function’ does not name a type
    ./boost/python/converter/registrations.hpp:30: error: ISO C++ forbids declaration of ‘PyTypeObject’ with no type
    ./boost/python/converter/registrations.hpp:30: error: expected ‘;’ before ‘const’
    ./boost/python/converter/registrations.hpp:41: error: ISO C++ forbids declaration of ‘PyObject’ with no type
    ./boost/python/converter/registrations.hpp:41: error: expected ‘;’ before ‘*’ token
    ./boost/python/converter/registrations.hpp:45: error: ISO C++ forbids declaration of ‘PyTypeObject’ with no type
    ./boost/python/converter/registrations.hpp:45: error: expected ‘;’ before ‘*’ token
    ./boost/python/converter/registrations.hpp:49: error: ISO C++ forbids declaration of ‘PyTypeObject’ with no type
    ./boost/python/converter/registrations.hpp:49: error: expected ‘;’ before ‘const’
    ./boost/python/converter/registrations.hpp:50: error: ISO C++ forbids declaration of ‘PyTypeObject’ with no type
    ./boost/python/converter/registrations.hpp:50: error: expected ‘;’ before ‘const’
    ./boost/python/converter/registrations.hpp:62: error: ISO C++ forbids declaration of ‘PyTypeObject’ with no type
    ./boost/python/converter/registrations.hpp:62: error: expected ‘;’ before ‘*’ token
    ./boost/python/converter/registrations.hpp:65: error: ‘to_python_function_t’ does not name a type
    ./boost/python/converter/registrations.hpp:66: error: ISO C++ forbids declaration of ‘PyTypeObject’ with no type
    ./boost/python/converter/registrations.hpp:66: error: expected ‘;’ before ‘const’
    ./boost/python/converter/registrations.hpp: In constructor ‘boost::python::converter::registration::registration(boost::python::type_info, bool)’:
    ./boost/python/converter/registrations.hpp:86: error: class ‘boost::python::converter::registration’ does not have any field named ‘m_class_object’
    ./boost/python/converter/registrations.hpp:87: error: class ‘boost::python::converter::registration’ does not have any field named ‘m_to_python’
    ./boost/python/converter/registrations.hpp:88: error: class ‘boost::python::converter::registration’ does not have any field named ‘m_to_python_target_type’
    libs/python/src/converter/arg_to_python_base.cpp: In constructor ‘boost::python::converter::detail::arg_to_python_base::arg_to_python_base(const volatile void*, const boost::python::converter::registration&)’:
    libs/python/src/converter/arg_to_python_base.cpp:19: error: template argument 1 is invalid
    libs/python/src/converter/arg_to_python_base.cpp:23: error: expected ‘{’ before ‘(’ token
    libs/python/src/converter/arg_to_python_base.cpp: At global scope:
    libs/python/src/converter/arg_to_python_base.cpp:23: error: expected ‘)’ before ‘.’ token
    

    kennt sich hier jemand damit aus? Ich bin echt ratlos, beim letzten mal als ich es unter Windows installiert habe hat es funktioniert...



  • siehe ./boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for this version of Boost.Python. . Entweder bau kein Boost.Python oder installiere eine aktuelle Python-Version bzw. die passenden Header.



  • hmmm ok, da hätten wir #1 aber das war nur exemplarisch, ich bekomme auch z.b bei multithreading unteranderem errors, bzw ich habe das Gefühl das ich bei jeder lib ein Error bekomme :S, aber ich kann ja nicht die ganzen Fehlermeldungen posten.

    ...failed updating 60 targets...
    ...skipped 12 targets...
    ...updated 666 targets...
    

    das ist die endmeldung von bjam, sehr satanistisch wenn ich das anmerken darf 😛



  • Vermutlich wäre das sinnvollste, Du installierst die Build-Dependencies mal per Paketmanager und kompilierst dann Boost selbst.

    Am besten einfach mal nach "DEINE_DISTRO install build dependencies" oder so googeln.



  • Habe ich auch schon gemacht:

    Aber das was ich gefunden habe war mager:

    http://packages.ubuntu.com/de/lucid/boost-build ich werde beim googlen dementsprechend immer auf deren make/build apdaption verwiesen.

    Was noch hinzu kommt, ist das die Ausgaben sehr unübersichtlich sind und ich somit nicht klar sehen kann wo die Probleme liegen, das mit Python war klar, aber sonst gibt es auch so Meldungen wie "expected error" oder "commen.output_test fail", und bei sowas weiß ich dann nicht was ich davon halten soll.

    Habe jezz einfach das Ubuntu package genommen, aber ich wüsste schon gerne wieso mir das selber machen so viele Probleme bereitet hat :S



  • Er baut ja Boost erfolgreich. Nur einige Pakete eben nicht. Wenn du Boost.Python bauen willst, dann installiere python-dev:

    sudo apt-get install python-dev

    und falls du es noch nicht gemacht hast

    sudo apt-get install build-essential



  • Dieser Thread wurde von Moderator/in rüdiger aus dem Forum Rund um die Programmierung in das Forum Linux/Unix verschoben.

    Im Zweifelsfall bitte auch folgende Hinweise beachten:
    C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?

    Dieses Posting wurde automatisch erzeugt.


Anmelden zum Antworten