PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 702 - environment.sh doesn't work in RHEL6 x86_64
: environment.sh doesn't work in RHEL6 x86_64
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-02-25 18:16 EET by fraph24
Modified: 2011-04-01 23:15 EEST (History)
9 users (show)

See Also:


Attachments
x86_64 support; qt sdk support; double slash fixed (1.07 KB, patch)
2011-02-28 17:17 EET, fraph24
Details
RedHat and Fedora support (178 bytes, patch)
2011-02-28 19:07 EET, fraph24
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fraph24 2011-02-25 18:16:56 EET
I'm on RedHat 6 x86_64, and environment.sh doesn't work.
$PYTHONPATH look for $PYSIDESANDBOXPATH/lib/ (etc.) but in my system I can see
both lib/ and lib64/ directories, and my programs works only with lib64
directory 

I propose to change $PYTHONPATH in order to recognize the correct architecture.
It should set lib64/ if lib64/ is present.

Another little bug: $PYSIDESANDBOXPATH shouldn't have the slash at the end.
Comment 1 Thomas Perl 2011-02-28 16:34:03 EET
Can you provide a patch against the Git master branch HEAD of the buildscripts?
I'll gladly review and merge your changes. Also, if you want, you can provide a
dependencies shell script for Red Hat if it isn't yet covered by one of the
existing dependency scripts (and if it is, tell me, and I'll update the README
accordingly).
Comment 2 fraph24 2011-02-28 17:17:55 EET
Created attachment 273 [details]
x86_64 support; qt sdk support; double slash fixed

This patch adds x86_64 support, checking if lib64 exists or not.
It also allows you to use QT SDK and it removes the "double slash" bug.

In order to build pyside in RedHat 6 (and Fedora 12) I needed those packages:
* cmake
* libxml2-devel
* libxslt-devel
* python-devel
* qt-devel (or QT SDK)

There're two ways to install those packages: using yum or using packagekit.
1. $ su -c "yum install $packages"
2. $ pkcon install $packages
...where $packages is the package list space-separated.

The second solution asks for root password only if needed, using graphics, but
it need, on x86_64 with multilib, to choose between packages version (i686 or
x86_64). It's possible to get different behaviour using pkcon options like
--plain or --filter "newest;arch".
Comment 3 Thomas Perl 2011-02-28 17:50:05 EET
(In reply to comment #2)
> Created an attachment (id=273) [details]
> x86_64 support; qt sdk support; double slash fixed
> 
> This patch adds x86_64 support, checking if lib64 exists or not.
> It also allows you to use QT SDK and it removes the "double slash" bug.

Slightly simplified patch merged:
http://qt.gitorious.org/pyside/buildscripts/commit/92b5ba688508638255c35e57f28e6547cc7756bc

As it doesn't hurt to have "lib64" in $PYTHONPATH, i've removed the check, and
just add both directories (lib and lib64) to $PYTHONPATH.

I've also simplified the part for the Qt SDK, as I think you have hardcoded the
SDK path in the second line instead of reusing the variable pointing to the Qt
SDK - please check if that still works for you :)

> In order to build pyside in RedHat 6 (and Fedora 12) I needed those packages:
> * cmake
> * libxml2-devel
> * libxslt-devel
> * python-devel
> * qt-devel (or QT SDK)
> 
> There're two ways to install those packages: using yum or using packagekit.
> 1. $ su -c "yum install $packages"
> 2. $ pkcon install $packages
> ...where $packages is the package list space-separated.

Can you provide a script like "dependencies.ubuntu.sh" (but for RedHat) that a
user can run as root or using "sudo"?
Comment 4 fraph24 2011-02-28 19:07:55 EET
Created attachment 274 [details]
RedHat and Fedora support

(In reply to comment #3)
> (In reply to comment #2)
> > Created an attachment (id=273) [details] [details]
> > x86_64 support; qt sdk support; double slash fixed
> > 
> > This patch adds x86_64 support, checking if lib64 exists or not.
> > It also allows you to use QT SDK and it removes the "double slash" bug.
> 
> Slightly simplified patch merged:
> http://qt.gitorious.org/pyside/buildscripts/commit/92b5ba688508638255c35e57f28e6547cc7756bc
> 
> As it doesn't hurt to have "lib64" in $PYTHONPATH, i've removed the check, and
> just add both directories (lib and lib64) to $PYTHONPATH.

Yes, it's better.

> I've also simplified the part for the Qt SDK, as I think you have hardcoded the
> SDK path in the second line instead of reusing the variable pointing to the Qt
> SDK - please check if that still works for you :)

Oh, yes, it was hardcoded :D It works perfectly.
Shouldn't build_and_install allow the user to compile using qt sdk using a
simple option like --qt-sdk=directory/?

> > In order to build pyside in RedHat 6 (and Fedora 12) I needed those packages:
> > * cmake
> > * libxml2-devel
> > * libxslt-devel
> > * python-devel
> > * qt-devel (or QT SDK)
> > 
> > There're two ways to install those packages: using yum or using packagekit.
> > 1. $ su -c "yum install $packages"
> > 2. $ pkcon install $packages
> > ...where $packages is the package list space-separated.
> 
> Can you provide a script like "dependencies.ubuntu.sh" (but for RedHat) that a
> user can run as root or using "sudo"?

The script uses the same packages of Meego (Meego is a fork of Fedora, like
Ubuntu with Debian). It works with Redhat 6.x and Fedora 12 (and above).
Comment 5 Thomas Perl 2011-02-28 20:37:22 EET
(In reply to comment #4)
> (In reply to comment #3)
> > I've also simplified the part for the Qt SDK, as I think you have hardcoded the
> > SDK path in the second line instead of reusing the variable pointing to the Qt
> > SDK - please check if that still works for you :)
> 
> Oh, yes, it was hardcoded :D It works perfectly.
> Shouldn't build_and_install allow the user to compile using qt sdk using a
> simple option like --qt-sdk=directory/?

The problem with this is that the user is also required to source the
"environment.sh" script every time he/she wants to use PySide. If we were to
add a command line option to build_and_install, it would also have to persist
the path to the Qt SDK into the environment script. I think the better option
would be to let the user export a QT_SDK_HOME environment variable, and if it's
set, use it automatically (this way, the user can add it in front of the
"source environment.sh" line in .profile or wherever).

I've now added support for this and described it in README.

> > > In order to build pyside in RedHat 6 (and Fedora 12) I needed those packages:
> > > * cmake
> > > * libxml2-devel
> > > * libxslt-devel
> > > * python-devel
> > > * qt-devel (or QT SDK)
> > > 
> > > There're two ways to install those packages: using yum or using packagekit.
> > > 1. $ su -c "yum install $packages"
> > > 2. $ pkcon install $packages
> > > ...where $packages is the package list space-separated.
> > 
> > Can you provide a script like "dependencies.ubuntu.sh" (but for RedHat) that a
> > user can run as root or using "sudo"?
> 
> The script uses the same packages of Meego (Meego is a fork of Fedora, like
> Ubuntu with Debian). It works with Redhat 6.x and Fedora 12 (and above).

Thanks, I've added it (removed the "su -c", as the user is supposed to do that
manually "outside" the script).

Resolving this bug as fixed, now that all requested changes have been
integrated into the buildscripts. Feel free to reopen if there's something
still missing or if there is a problem.
Comment 6 fraph24 2011-02-28 20:44:41 EET
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > I've also simplified the part for the Qt SDK, as I think you have hardcoded the
> > > SDK path in the second line instead of reusing the variable pointing to the Qt
> > > SDK - please check if that still works for you :)
> > 
> > Oh, yes, it was hardcoded :D It works perfectly.
> > Shouldn't build_and_install allow the user to compile using qt sdk using a
> > simple option like --qt-sdk=directory/?
> 
> The problem with this is that the user is also required to source the
> "environment.sh" script every time he/she wants to use PySide. If we were to
> add a command line option to build_and_install, it would also have to persist
> the path to the Qt SDK into the environment script. I think the better option
> would be to let the user export a QT_SDK_HOME environment variable, and if it's
> set, use it automatically (this way, the user can add it in front of the
> "source environment.sh" line in .profile or wherever).
> 
> I've now added support for this and described it in README.

Right, it's a good solution.

> > > > In order to build pyside in RedHat 6 (and Fedora 12) I needed those packages:
> > > > * cmake
> > > > * libxml2-devel
> > > > * libxslt-devel
> > > > * python-devel
> > > > * qt-devel (or QT SDK)
> > > > 
> > > > There're two ways to install those packages: using yum or using packagekit.
> > > > 1. $ su -c "yum install $packages"
> > > > 2. $ pkcon install $packages
> > > > ...where $packages is the package list space-separated.
> > > 
> > > Can you provide a script like "dependencies.ubuntu.sh" (but for RedHat) that a
> > > user can run as root or using "sudo"?
> > 
> > The script uses the same packages of Meego (Meego is a fork of Fedora, like
> > Ubuntu with Debian). It works with Redhat 6.x and Fedora 12 (and above).
> 
> Thanks, I've added it (removed the "su -c", as the user is supposed to do that
> manually "outside" the script).
> 
> Resolving this bug as fixed, now that all requested changes have been
> integrated into the buildscripts. Feel free to reopen if there's something
> still missing or if there is a problem.

It's fixed for me too. Good work :)
Comment 7 fraph24 2011-03-04 14:26:10 EET
Install build dependencies (README file) doesn't list Redhat/Centos 6 and
Fedora ne dependencies script.
Also, please check that dependencies.redhat.sh is set executable like the
others dependencies.*.sh files (here I have to do chmod +x *.sh)
Comment 8 Thomas Perl 2011-03-07 10:46:58 EET
(In reply to comment #7)
> Install build dependencies (README file) doesn't list Redhat/Centos 6 and
> Fedora ne dependencies script.
> Also, please check that dependencies.redhat.sh is set executable like the
> others dependencies.*.sh files (here I have to do chmod +x *.sh)

Fixed in:
http://qt.gitorious.org/pyside/buildscripts/commit/d3795cfba187925deed139650a909fb68c779b65

(there's no need to duplicate the "dependencies.fedora.sh" file for RHEL/CentOS
if it's the same content - the README states that it works for these other
distros as well)
Comment 9 fraph24 2011-03-07 11:38:09 EET
(In reply to comment #8)
> (In reply to comment #7)
> > Install build dependencies (README file) doesn't list Redhat/Centos 6 and
> > Fedora ne dependencies script.
> > Also, please check that dependencies.redhat.sh is set executable like the
> > others dependencies.*.sh files (here I have to do chmod +x *.sh)
> 
> Fixed in:
> http://qt.gitorious.org/pyside/buildscripts/commit/d3795cfba187925deed139650a909fb68c779b65
> 
> (there's no need to duplicate the "dependencies.fedora.sh" file for RHEL/CentOS
> if it's the same content - the README states that it works for these other
> distros as well)

VoilĂ ! Now it's perfect :D
Comment 10 Hugo Parente Lima 2011-04-01 23:15:57 EEST
Closing bug after release of PySide 1.0.1.