You can try to use some functions inside your "~/.bashrc" script, to
ease this kind of setup. Modify them as you wish :)

function useQt48() {
    export QTDIR="/home/luck/work/sandbox/qt48"
    echo "Using Qt4.8 at '$QTDIR'"
    export PATH="${QTDIR}/bin:${PATH}"
    export LD_LIBRARY_PATH="${QTDIR}/lib"
    export CMAKE_PREFIX_PATH="${QTDIR}"
    export PKG_CONFIG_PATH="${QTDIR}/lib/pkgconfig"
    export M_THEME_DIR=${QTDIR}/themes
}

function pyside-environment {
    export PYSIDESANDBOXPATH=/home/luck/work/sandbox
    export PATH=$PYSIDESANDBOXPATH/bin:$PATH
    export PYTHONPATH=$PYSIDESANDBOXPATH/lib/python2.7/site-packages:$PYTHONPATH
    export LD_LIBRARY_PATH=$PYSIDESANDBOXPATH/lib:$LD_LIBRARY_PATH
    export PKG_CONFIG_PATH=$PYSIDESANDBOXPATH/lib/pkgconfig:$PKG_CONFIG_PATH
    export ICECC_CC=g++
    alias pyside-cmake='cmake ..
-DCMAKE_INSTALL_PREFIX=$PYSIDESANDBOXPATH -DCMAKE_BUILD_TYPE=Debug
-DENABLE_ICECC=1'
    alias pyside-cmake-release='cmake ..
-DCMAKE_INSTALL_PREFIX=$PYSIDESANDBOXPATH -DCMAKE_BUILD_TYPE=Release
-DENABLE_ICECC=1'
    alias pyside-clear-sandbox='rm $PYSIDESANDBOXPATH/* -rf'
}

Maybe you forgot to set some of these variables. Hope that it helps you!


On Fri, Nov 11, 2011 at 4:13 PM, Erik Janssens
<[email protected]> wrote:
> this really odd, the CMake logs look like this :
>
> -- Found Qt4: /11-11-debug/bin/qmake (found suitable version "4.7.4",
> required is "4.5.0")
> -- Detected OS: x11
> -- PySide will be generated using the protected hack!
> -- Checking for QAbstractPageSetupDialog in QtGui -- found
> -- Checking for QAbstractPrintDialog in QtGui -- found
> -- Checking for QGtkStyle in QtGui -- found
>
> So it takes the qmake of the custom Qt build, but it finds the
> QGtkStyle, so it must be looking at the system Qt build
>
> The CMakeCache.txt file contains plenty of lines like :
>
> //Path to a file.
> QT_QTGUI_INCLUDE_DIR:PATH=/usr/include/qt4/QtGui
> //The Qt QTGUI library
> QT_QTGUI_LIBRARY:STRING=/usr/lib/libQtGui.so
>
> I have set the cmake options DQT_LIBRARY_DIR etc, but
> without any effect
>
> is this one or another cmake weirdness ?
>
> On Tue, 2011-11-08 at 13:36 -0300, Luciano Wolf wrote:
>> Ok, I've managed to compile and import QtGui. Could you check if
>> during the cmake step at PySide it shows:
>> "
>> ...
>> -- Checking for QGtkStyle in QtGui -- not found
>> ...
>> "
>>
>> Luciano
>>
>>
>> On Tue, Nov 8, 2011 at 9:32 AM, Luciano Wolf <[email protected]> 
>> wrote:
>> > Looks like it's getting the right Qt library. I'll try to replicate
>> > your problem here on my machine. I'm also using Ubuntu 11.10 with
>> > qt4.7.4. As I get something I tell you.
>> >
>> > You can find further info into the log files - inside the directory
>> > where you're running the "make" command. I don't know exactly which
>> > file(s) to look into so some "grep"s are welcome :)
>> >
>> >
>> > Luciano
>> >
>> >
>> > On Mon, Nov 7, 2011 at 2:10 PM, Erik Janssens
>> > <[email protected]> wrote:
>> >> Hello Luciano,
>> >>
>> >> how can I check this ?
>> >>
>> >> the log says :
>> >>
>> >> [  3%] Running generator for QtCore...
>> >>
>> >> while the configuration step says
>> >>
>> >> -- Found Qt4: /11-11-debug/bin/qmake (found suitable version "4.7.4",
>> >> required is "4.5.0")
>> >>
>> >> which is correct
>> >>
>> >> the build PySide mentions as version '4.7.4' which is correct, as the 
>> >> system
>> >> one is 4.7.0
>> >>
>> >> so I think it links correct, but you are right in that the generation
>> >> of the bindings might
>> >> still be against a faulty Qt
>> >>
>> >> is there some place to look what exactly happens ?
>> >>
>> >> Thx,
>> >>
>> >> Erik
>> >>
>> >> On Mon, Nov 7, 2011 at 3:35 PM, Luciano Wolf <[email protected]> 
>> >> wrote:
>> >>> Hi,
>> >>>
>> >>> Could you double check to ensure that PySide generator is looking into
>> >>> the right place (install path of your custom Qt), not the system's Qt
>> >>> path?
>> >>>
>> >>> Regards,
>> >>> Luciano
>> >>>
>> >>> On Sat, Nov 5, 2011 at 4:14 AM, Erik Janssens
>> >>> <[email protected]> wrote:
>> >>>> Hi,
>> >>>>
>> >>>> I'm trying to build PySide from sources on Ubuntu Linux
>> >>>> against a custom Qt 4.7.4 build.  The Qt build has the
>> >>>> gtk style option turned off, as I don't want any dependencies
>> >>>> between gtk and Qt.
>> >>>>
>> >>>> This process worked fine for Qt 4.7.2 and some earlier
>> >>>> version of PySide.
>> >>>>
>> >>>> The build process itself goes fine, I have the impression
>> >>>> that no wrapper for QGtkStyle is generated, as expected.
>> >>>>
>> >>>> However, when importing the build QtGui library, there is
>> >>>> a missing symbol exception :
>> >>>>
>> >>>>>>> from PySide import QtGui
>> >>>> Traceback (most recent call last):
>> >>>>  File "<stdin>", line 1, in <module>
>> >>>> ImportError: /11-11-debug/lib/python2.7/site-packages/PySide/QtGui.so:
>> >>>> undefined symbol: _ZTI9QGtkStyle
>> >>>>>>>
>> >>>>
>> >>>> What can I do about this apart from building Qt with Gtk
>> >>>> dependencies ?
>> >>>>
>> >>>> Thanks,
>> >>>>
>> >>>> Erik
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> PySide mailing list
>> >>>> [email protected]
>> >>>> http://lists.pyside.org/listinfo/pyside
>> >>>>
>> >>>
>> >>
>> >
>
>
>
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to