Michal Drozd wrote:
> Hi all,
>> I have a problem importing libsip during startup of a python/qt
> application on AIX 5.1.
>> Some background:
> I am trying to get a GUI running on several platforms. The
> application was originally developed using python and qt on Solaris
> and Windows, with future platform support in mind. So far, I have
> managed to get it working on HP-UX 11, without major obstacles.
>> On AIX, everything started fairly well - I only had to modify few
> makefiles to add python2.2 to the LIBS list for the tools to build
> (maybe this was a first indication of some mistake on my part -
> shouldn't libpython2.2 be included in the LIBS list if it was necessary?).
>> Once I had all the supporting tools and libraries built, my app built
> without problems.
> But an attempt to run the application resulted in "ImportError: no
> module named libsip" from qt.py, line "import libsip"
>> A quick investigation revealed that python searches for libsip.so, but
> the sip installation only created a link libsip.a -> libsip.so.10.1.0
>> I tried creating libsip.so -> libsip.so.10.1.0, just to see what would
> happen, and got a Segmentation Fault on "import libsip"
>> It appears that my sip library is not built correctly for use on AIX,
> but I cannot figure out what I am doing wrong.
>> Can anyone help me out with this problem? Is anyone using
> python/qt/sip/pyqt on AIX? (there does not seem to be many AIX related
> posts in the arvchive).
>> My configuration:
> - AIX 5.1
> - python 2.2.3
> - Qt 3.1.2
> - sip 3.7
> - PyQt 3.7
> - qscintilla 1.53
>> All tools were built with --prefix=... (since I cannot write to
> /usr/local), python was built with --disable-ipv6 and qt was built
> with -thread. Other than that, default settings were used.
>> Thanks in advance,
> Michal
>For AIX 4.3.3 the story is, a shared library on AIX is an archive
library containing a shared object, not the shared object itself. I
think this is the same for AIX 5.1. To create real shared objects, you
have to change the 'dll' template to 'plugin' in the *.pro files of sip
and PyQt. If you do this, you have the next problem, because the linker
searches for *.a and not for *.so files by default, you have to enable
runtime linking to do this. This means, that you also have to enable
runtime linking for Python.
I had success building Python/Qt/sip/PyQt with VisualAge C++ V6.0 on AIX
4.3.3. If you are using VisualAge C++, the attached patches contain the
neccessary changes for Python-2.3, sip-3.8 and PyQt-3.8.1 (This should
also work for Python-2.2.3, sip-3.7 and PyQt-3.7) . If you are using GNU
g++, the patches may give you at least some hints how to solve the problem.
To understand the whole story read
http://www.redbooks.ibm.com/abstracts/sg245674.html (specially the
chapter about runtime linking).
Python was configured with the following command:
CC="xlc_r" CXX="xlC_r" LIBS="-lC" ./configure --with-threads
--with-cxx=xlC_r --prefix=/usr/local
When building PyQt you will get a lot of warning messages about
duplicate symbols, simply ignore them. After building, it is safe to
strip the libqt*cmodule.so files.
Good luck,
Ulli
-------------- next part --------------
diff -uNr Python-2.3.orig/configure Python-2.3/configure
--- Python-2.3.orig/configure 2003-07-24 00:17:27.000000000 +0200
+++ Python-2.3/configure 2003-09-11 12:50:30.000000000 +0200
@@ -1377,6 +1377,9 @@
# but used in struct sockaddr.sa_family. Reported by Tim Rice.
SCO_SV/3.2)
define_xopen_source=no;;
+ #
+ AIX/4*)
+ define_xopen_source=no;;
esac
if test $define_xopen_source = yes
@@ -1473,7 +1476,8 @@
else
case $ac_sys_system in
- AIX*) CC=cc_r
+ AIX*) CC=xlc_r
+ OPT="$OPT -O2 -qmaxmem=8000"
without_gcc=;;
BeOS*)
case $BE_HOST_CPU in
@@ -3213,7 +3217,7 @@
$ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
exp_extra="."
fi
- LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
+ LINKCC="CreateExportList Modules/python.exp \$(LIBRARY); $LINKCC";;
dgux*)
LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Monterey64*)
@@ -9602,8 +9606,8 @@
then
case $ac_sys_system/$ac_sys_release in
AIX*)
- BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
- LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ BLDSHARED="ld -bnoentry -G -bexpall -lc -lm"
+ LDSHARED="ld -bnoentry -G -bexpall -lc -lm"
;;
BeOS*)
BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
@@ -9709,7 +9713,7 @@
if test -z "$LINKFORSHARED"
then
case $ac_sys_system/$ac_sys_release in
- AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
+ AIX*) LINKFORSHARED='-brtl -bE:Modules/python.exp';;
hp*|HP*)
LINKFORSHARED="-Wl,-E -Wl,+s";;
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
@@ -10099,10 +10103,11 @@
case "$ac_sys_system" in
AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
+ LIBS="-lC $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
-#include "/usr/lpp/xlC/include/load.h"
+#include <load.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
@@ -12347,7 +12352,7 @@
if test -z "$DYNLOADFILE"
then
case $ac_sys_system/$ac_sys_release in
- AIX*) DYNLOADFILE="dynload_aix.o";;
+ AIX*) DYNLOADFILE="dynload_shlib.o";;
BeOS*) DYNLOADFILE="dynload_beos.o";;
hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Darwin/*) DYNLOADFILE="dynload_next.o";;
-------------- next part --------------
diff -uNr sip-x11-commercial-3.8.orig/build.py sip-x11-commercial-3.8/build.py
--- sip-x11-commercial-3.8.orig/build.py 2003-08-17 11:24:16.000000000 +0200
+++ sip-x11-commercial-3.8/build.py 2003-09-11 12:44:48.000000000 +0200
@@ -45,7 +45,7 @@
debugMode = "release"
licType = None
gccFlags = []
-blx_config = ["dll"]
+blx_config = ["plugin"]
def usage(rcode = 2):
@@ -1098,12 +1098,21 @@
fixInstallTarget()
popDir(olddir)
+ global platPyLibDir, platPyLibName
+ if sys.platform == 'aix4':
+ makefilePatches["LINK"] = [re.compile("(^LINK.*)$",re.M), "LINK = cc -qmkshrobj=0 -G "]
+ makefilePatches["LINK_TARGET"] = [re.compile("(^[ \\t]*makeC\\+\\+SharedLib.*)$",re.M), '\t$(LINK) -o $(TARGET) $(LFLAGS) $(OBJECTS) $(OBJMOC) $(LIBS)']
+
inform("Creating SIP module Makefile.")
olddir = pushDir("siplib")
buildMakefile("siplib.pro")
fixInstallTarget(1)
popDir(olddir)
+ if sys.platform == 'aix4':
+ del makefilePatches["LINK"]
+ del makefilePatches["LINK_TARGET"]
+
# Generate the top-level Makefile.
inform("Creating top level Makefile.")
copyToFile("sip.pro.in","TEMPLATE = subdirs\nSUBDIRS = sipgen siplib\n")
-------------- next part --------------
diff -uNr PyQt-x11-commercial-3.8.1.orig/build.py PyQt-x11-commercial-3.8.1/build.py
--- PyQt-x11-commercial-3.8.1.orig/build.py 2003-09-06 15:36:16.000000000 +0200
+++ PyQt-x11-commercial-3.8.1/build.py 2003-09-11 12:59:40.000000000 +0200
@@ -839,7 +839,7 @@
elif sipVersion == 4:
proPatches["DLL"] = [re.compile("@BL_DLL@",re.M), "plugin"]
else:
- proPatches["DLL"] = [re.compile("@BL_DLL@",re.M), "dll"]
+ proPatches["DLL"] = [re.compile("@BL_DLL@",re.M), "plugin"]
proPatches["LIBS"] = [re.compile("@BL_SIPMODDIR@",re.M), escape(sipModuleDir)]
# Check the Qt installation.
@@ -1184,6 +1184,13 @@
else:
target = target + "module"
+ if sys.platform == 'aix4':
+ add_opt = ""
+ if mname == "qt":
+ add_opt = "-Wl,-bbigtoc"
+ makefilePatches["LINK"] = [re.compile("(^LINK.*)$",re.M), "LINK = cc -qmkshrobj=0 -G %s " % add_opt]
+ makefilePatches["LINK_TARGET"] = [re.compile("(^[ \\t]*makeC\\+\\+SharedLib.*)$",re.M), '\t$(LINK) -o $(TARGET) $(LFLAGS) $(OBJECTS) $(OBJMOC) $(LIBS)']
+
# Generate the Makefile.
inform("Generating the Makefile for the %s module." % (mname))
@@ -1206,6 +1213,10 @@
except:
pass
+ if sys.platform == 'aix4':
+ del makefilePatches["LINK"]
+ del makefilePatches["LINK_TARGET"]
+
if sipVersion == 3:
# Compile the Python part of the module.
pyname = mname + ".py"
More information about the PyQt
mailing list
‘She has never mentioned her father to me. Was he—well, the sort of man whom the County Club would not have blackballed?’ "We walked by the side of our teams or behind the wagons, we slept on the ground at night, we did our own cooking, we washed our knives by sticking them into the ground rapidly a few times, and we washed our plates with sand and wisps of grass. When we stopped, we arranged our wagons in a circle, and thus formed a 'corral,' or yard, where we drove our oxen to yoke them up. And the corral was often very useful as a fort, or camp, for defending ourselves against the Indians. Do you see that little hollow down there?" he asked, pointing to a depression in the ground a short distance to the right of the train. "Well, in that hollow our wagon-train was kept three days and nights by the Indians. Three days and nights they stayed around, and made several attacks. Two of our men were killed and three were wounded by their arrows, and others had narrow escapes. One arrow hit me on the throat, but I was saved by the knot of my neckerchief, and the point only tore the skin a little. Since that time I have always had a fondness for large neckties. I don't know how many of the Indians we killed, as they carried off their dead and wounded, to save them from being scalped. Next to getting the scalps of their enemies, the most important thing with the Indians is to save their own. We had several fights during our journey, but that one was the worst. Once a little party of us were surrounded in a small 'wallow,' and had a tough time to defend ourselves successfully. Luckily for us, the Indians had no fire-arms then, and their bows and arrows were no match for our rifles. Nowadays they are well armed, but there are[Pg 41] not so many of them, and they are not inclined to trouble the railway trains. They used to do a great deal of mischief in the old times, and many a poor fellow has been killed by them." As dusk came on nearly the whole population of Maastricht, with all their temporary guests, formed an endless procession and went to invoke God's mercy by the Virgin Mary's intercession. They went to Our Lady's Church, in which stands the miraculous statue of Sancta Maria Stella Maris. The procession filled all the principal streets and squares of the town. I took my stand at the corner of the Vrijthof, where all marched past me, men, women, and children, all praying aloud, with loud voices beseeching: "Our Lady, Star of the Sea, pray for us ... pray for us ... pray for us ...!" It had not occurred to her for some hours after Mrs. Campbell had told her of Landor's death that she was free now to give herself to Cairness. She had gasped, indeed, when she did remember it, and had put the thought away, angrily and self-reproachfully. But it returned now, and she felt that she might cling to it. She had been grateful, and she had been faithful, too.[Pg 286] She remembered only that Landor had been kind to her, and forgot that for the last two years she had borne with much harsh coldness, and with a sort of contempt which she felt in her unanalyzing mind to have been entirely unmerited. Gradually she raised herself until she sat quite erect by the side of the mound, the old exultation of her half-wild girlhood shining in her face as she planned the future, which only a few minutes before had seemed so hopeless. After he had gloated over Sergeant Ramsey, Shorty got his men into the road ready to start. Si placed himself in front of the squad and deliberately loaded his musket in their sight. Shorty took his place in the rear, and gave out: The groups about each gun thinned out, as the shrieking fragments of shell mowed down man after man, but the rapidity of the fire did not slacken in the least. One of the Lieutenants turned and motioned with his saber to the riders seated on their horses in the line of limbers under the cover of the slope. One rider sprang from each team and ran up to take the place of men who had fallen. "As long as there's men and women in the world, the men 'ull be top and the women bottom." Then, in the house, the little girls were useful. Mrs. Backfield was not so energetic as she used to be. She had never been a robust woman, and though her husband's care had kept her well and strong, her frame was not equal to Reuben's demands; after fourteen years' hard labour, she suffered from rheumatism, which though seldom acute, was inclined to make her stiff and slow. It was here that Caro and Tilly came in, and Reuben began to appreciate his girls. After all, girls were needed in a house—and as for young men and marriage, their father could easily see that such follies did not spoil their usefulness or take them from him. Caro and Tilly helped their grandmother in all sorts of ways—they dusted, they watched pots, they shelled peas and peeled potatoes, they darned house-linen, they could even make a bed between them. HoME一级毛片视频免费公开
ENTER NUMBET 0018www.b032.com.cn www.892786.com.cn cqcq01.com.cn www.sgcn77mx.com.cn ttjrtravel.com.cn www.lnga110.com.cn www.yzx666.com.cn www.nfra.com.cn www.postna.com.cn www.fqjj.net.cn