I hope the ugly hacks don't stay in for too long...at this point I would prefer cross platform to slightly reduced size.
On Fri, Sep 11, 2009 at 8:14 AM, Hugo Parente Lima <hugo.l...@openbossa.org>wrote: > On Friday 11 September 2009 03:00:28 Brendan Duncan wrote: > > All the bugs have been submitted. I made sure to test against a clean > copy > > of pySide, with Qt in the standard install locations. So I believe > fixing > > the bugs I submitted should make pySide buildable on all Macs. > > Nice, renato already fixed some reported bugs. > > > I'm going to work on getting it to build on Windows next. (I work on all > > three platforms, so I'm eager to get PySide in all three so I can start > > using it in my projects). > > You can compile under Windows, but you will not be able to link the > bindings > due to an ugly hack we did to reduce the library size a bit. > > > > > > > On Thu, Sep 10, 2009 at 6:08 AM, Hugo Parente Lima > > > > <hugo.l...@openbossa.org>wrote: > > > On Wednesday 09 September 2009 20:21:13 Brendan Duncan wrote: > > > > I finally got PySide built for the Mac. It was an effort. When I > get > > > > a chance, I'll put together a more coherent set of notes. But for > now, > > > > > > here > > > > > > > are the changes I needed to make to get it built. > > > > > > Nice, many items are easy to fix in PySide. Can you file a bug report > for > > > each > > > item? > > > > > > > * Because the generator was picking up the wrong atomic_*.h > > > > > > system-specific > > > > > > > headers, I had to remove the ones I didn't want picked up from the Qt > > > > includes directory. Maybe these should just be ignored by the > > > > generator alltogether, or figure out how to get the generator to pick > > > > up the header for the correct architecture.... > > > > > > The parser in APIExtractor is executed without define Q_WS_MAC, so the > > > wrong > > > atomic_*.h were found. > > > > > > The solution is to generate the globa.h file (used by the parser) using > > > cmake > > > (configure_file command) and define Q_WS_MAC, Q_WS_WIN, etc, if needed. > > > > > > We can do this, just file a bug report :-) > > > > > > About the linker flags, they are specific to GCC, so we really need to > > > when compiling in other plataforms/compilers. > > > > > > > * QtCore will build fine, but QtGui complains about not being able to > > > > > > find > > > > > > > the Qt headers for some reason. I had to add > > > > set(QT_INCLUDE_DIR "/usr/local/Trolltech/Qt-4.5.2/include") > > > > to the top level CMakeLists.txt for it to build. I can re-look into > > > > > > this, > > > > > > > because PySide should build using only what's available from the > binary > > > > install of Qt on OSX (which means CMake should find things in the > > > > /Library/Frameworks directories). > > > > > > > > * QtUiTools doesn't get installed as a Framework on OSX, so I had to > > > > add: set(QT_QTUITOOLS_INCLUDE_DIR > > > > "/usr/local/Trolltech/Qt-4.5.2/include/QtUiTools") > > > > in order for CMake to find those headers. Like the previous issue, a > > > > better solution should be found that rely only on the binary install > > > > of Qt. > > > > > > > > * There are some unsupported linker flags being used in > > > > CMAKE_CXX_FLAGS_RELEASE in the top level CMakeLists.txt, so I had to > > > > take those out by removing the -Wl,* flags: > > > > set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fvisibility=hidden > > > > -fvisibility-inlines-hidden -Os -finline-limit=600 > -ffunction-sections > > > > -fomit-frame-pointer -fno-default-inline -fconserve-space > > > > -fno-enforce-eh-specs -fno-threadsafe-statics > > > > -fno-implicit-inline-templates -DNDEBUG > > > > > > -DBOOST_PYTHON_NO_PY_SIGNATURES") > > > > > > > * boost::python is having trouble with some class methods that return > > > > Qt::Handle, because it's an alias for void*, and there is no return > > > > > > policy > > > > > > > defined for void*. For now, I just had the scanner ignore those > > > > methods > > > > > > by > > > > > > > adding the following. > > > > > > > > data/typesystem/typesystem_core.xml: > > > > <rejection class="QThread" function-name="currentThreadId"/> > > > > > > > > data/typesystem/typesystem_gui.xml: > > > > <rejection class="QFont" function-name="handle"/> > > > > > > > > data/typesystem/typesystem_network.xml: > > > > <rejection class="QSslCertificate" function-name="handle"/> > > > > <rejection class="QSslKey" function-name="handle"/> > > > > > > > > data/typesystem/typesystem_opengl.xml > > > > <rejection class="QGLColormap" function-name="handle"/> > > > > <rejection class="QGLPixelBuffer" function-name="handle"/> > > > > > > > > > > > > * QtGui: qx11_info is not available on OSX or windows: > > > > PySide/QtGui/CMakeLists.txt > > > > Comment out the qx11_wrapper lines: > > > > > #${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtGui/qx11info_wrapper.cpp > > > > > #${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtGui/qx11info_wrapper.hpp > > > > > > > > > > > > * QtGui: Unknown linker option: --reduce-memory-overheads > > > > PySide/QtGui/CMakeLists.txt > > > > Comment out the "LINK_FLAGS" line: > > > > #set_target_properties(QtGui PROPERTIES PREFIX "" LINK_FLAGS > > > > "-Wl,--reduce-memory-overheads") > > > > > > > > > > > > * QtOpenGL: Missing link to QtGui library (causes undefined QWidget > > > > symbols). > > > > PySide/QtOpenGL/CMakeLists.txt > > > > Add ${QT_QTGUI_LIBRARY} to target_link_libraries. > > > > target_link_libraries(QtOpenGL > > > > ${Boost_PYTHON_LIBRARY} > > > > ${PYTHON_LIBRARIES} > > > > ${QT_QTCORE_LIBRARY} > > > > ${QT_QTGUI_LIBRARY} > > > > ${QT_QTOPENGL_LIBRARY} > > > > pysidebase) > > > > > > > > > > > > * QtHelp: Missing link to QtGUi library. > > > > PySide/QtHelp/CMakeLists.txt > > > > Add ${QT_QTGUI_LIBRARY} to target_link_libraries. > > > > target_link_libraries(QtHelp > > > > ${Boost_PYTHON_LIBRARY} > > > > ${PYTHON_LIBRARIES} > > > > ${QT_QTCORE_LIBRARY} > > > > ${QT_QTGUI_LIBRARY} > > > > ${QT_QTHELP_LIBRARY} > > > > pysidebase) > > > > > > > > > > > > * QtScriptTools: The "ugly workaround" in QtScriptTools > CMakeLists.txt > > > > > > does > > > > > > > not work for OSX. > > > > PySide/QtScriptTools/CMakeLists.txt > > > > Replace > > > > set (QT_QTSCRIPTTOOLS_INCLUDE_DIR ${QT_QTSCRIPT_INCLUDE_DIR}Tools) > > > > set (QT_QTSCRIPTTOOLS_LIBRARY -lQtScriptTools) > > > > With > > > > set(QT_QTSCRIPTTOOLS_INCLUDE_DIR > > > > "/Library/Frameworks/QtScriptTools.framework/Headers") > > > > set (QT_QTSCRIPTTOOLS_LIBRARY "-framework QtScriptTools") > > > > > > > > > > > > * QtScriptTools: Missing link to QtGui and QtScript libraries. > > > > PySide/QtScriptTools/CMakeLists.txt > > > > Add ${QT_QTGUI_LIBRARY} and ${QT_QTSCRIPT_LIBRARY} to > > > > target_link_libraries. target_link_libraries(QtScriptTools > > > > ${Boost_PYTHON_LIBRARY} > > > > ${PYTHON_LIBRARIES} > > > > ${QT_QTCORE_LIBRARY} > > > > ${QT_QTGUI_LIBRARY} > > > > ${QT_QTSCRIPT_LIBRARY} > > > > ${QT_QTSCRIPTTOOLS_LIBRARY} > > > > pysidebase) > > > > > > > > > > > > > > > > * QtUiTools: Missing link to QtUiTools library. > > > > OSX doesn't install QtUiTools as a Framework (because QtUiTools is a > > > > > > static > > > > > > > library and not a shared library). This also means that (as far as I > > > > > > know) > > > > > > > Qt does not include the QtUiTools library with the binary > installation > > > > of Qt on OSX! > > > > > > > > QtUiTools needs to be manually added to the libraries to link: > > > > PySide/QtUiTools/CMakeLists.txt > > > > Add the QtUiTools library. > > > > set (QT_QTUITOOLS_LIBRARY "-L/usr/local/Trolltech/Qt-4.5.2/lib > > > > -lQtUiTools") > > > > > > > > > > > > * QtGui creates libQtGui.so, but the install is trying to copy > > > > QtGui.so. PySide/QtGui/CMakeLists.txt > > > > Change > > > > install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtGui.so > > > > To > > > > install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libQtGui.so > > > > > > -- > > > Hugo Parente Lima > > > INdT - Instituto Nokia de Tecnologia > > > > > > _______________________________________________ > > > PySide mailing list > > > PySide@lists.openbossa.org > > > http://lists.openbossa.org/listinfo/pyside > > > > -- > Hugo Parente Lima > INdT - Instituto Nokia de Tecnologia > > _______________________________________________ > PySide mailing list > PySide@lists.openbossa.org > http://lists.openbossa.org/listinfo/pyside > >
_______________________________________________ PySide mailing list PySide@lists.openbossa.org http://lists.openbossa.org/listinfo/pyside