#2882 closed bug (fixed)
Python support broken for 64 bit systems
Reported by: | volter | Owned by: | borysiasty |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.5.0 |
Component: | Python plugins and bindings | Version: | |
Keywords: | Cc: | ||
Must Fix for Release: | Yes | Platform: | Unix |
Platform Version: | Awaiting user input: | no |
Description
The patch for ticket #2618 introduced a static path to a library, that does not pay respect to 64 bit systems.
Attachments (2)
Change History (15)
comment:1 by , 14 years ago
follow-up: 3 comment:2 by , 14 years ago
Yes, the error message is:
Warning: Couldn't load Python support library: Cannot load library /usr/lib/qgispython: (/usr/lib/libqgispython.so: cannot open shared object file: No such file or directory)
The library is actually in /usr/lib64, not in /usr/lib.
comment:3 by , 14 years ago
Replying to volter:
Yes, the error message is:
Warning: Couldn't load Python support library: Cannot load library /usr/lib/qgispython: (/usr/lib/libqgispython.so: cannot open shared object file: No such file or directory)
The library is actually in /usr/lib64, not in /usr/lib.
The standard configuration wouldn't install into that directory - but QGIS_LIB_SUBDIR is configurable - so we should use the configured value. Does the attached patch help (also for #2618)?
by , 14 years ago
follow-ups: 6 8 comment:5 by , 14 years ago
A question: should QGIS_LIB_SUBDIR be used for all systems, including the current two special cases in the code for Mac and Mgwin32?
That is, rather than the defines, should the code just be
pythonlibName.prepend( QgsApplication::prefixPath() + "/" + QGIS_LIB_SUBDIR + "/" );
(with a suitable Qt function to get the right path separator?).
comment:6 by , 14 years ago
Replying to gjm:
A question: should QGIS_LIB_SUBDIR be used for all systems, including the current two special cases in the code for Mac and Mgwin32?
Well, for OSX there is the xcode project, which is used to create the packages. I don't know if it has/uses QGIS_LIB_SUBDIR. I also never uses MinGW to build QGIS. So IMHO better save than sorry ;)
(with a suitable Qt function to get the right path separator?).
I don't think we need to care about that. On Windows boths seperators work and IIRC in some circumstances Qt wouldn't work with backslashes.
follow-up: 9 comment:8 by , 14 years ago
Replying to gjm:
A question: should QGIS_LIB_SUBDIR be used for all systems, including the current two special cases in the code for Mac and Mgwin32?
QGIS_LIB_SUBDIR is used on the Mac build, in both cmake and xcode.
comment:9 by , 14 years ago
Replying to kyngchaos:
Replying to gjm:
A question: should QGIS_LIB_SUBDIR be used for all systems, including the current two special cases in the code for Mac and Mgwin32?
QGIS_LIB_SUBDIR is used on the Mac build, in both cmake and xcode.
But the code
#if defined(Q_WS_MAC) pythonlibName.prepend( QgsApplication::prefixPath() + "/lib/" );
in qgisapp.cpp is hard-coding in /lib/ for the location of the qgis libraries, rather than using QGIS_LIB_SUBDIR (r13912).
comment:10 by , 14 years ago
The second attached patch has been applied (r13912). The code for non-linux system remains unchanged (probably best to let someone who compiles under Mac or Mingw32 to change them if necessary).
comment:11 by , 14 years ago
I meant that it is defined, and used, within the project/cmake files, so it is available to use in source files. Go ahead and group Mac and Linux in qgisapp.cpp like in the original.
comment:12 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'd rather wait until after version 1.5.0 has been branched (aka, if it's not broken, don't fix it immediately before a version is released:).
I'll add it to ticket #2863, which is where I have a few other non-urgent patches waiting for the branch.
Can you give more details please?
Commit r13884 was developed and tested on my 64-bit OpenSUSE 11.2 system.