warnings during installation of python2.3.1 on SCO_SV 3.2v5.0.5

R

Roger Erens

Dear list,

I'm trying to install python2.3.1 on an SCO-box.
After running ./configure --prefix=/usrdir/rogere
the output of make shows (among others:)

running build
running build_ext
building 'struct' extension
creating build
creating build/temp.sco_sv-3.2-i386-2.3
cc -DNDEBUG -O -Kpic -belf -belf -Ki486 -DSCO5 -I.
-I/usrdir/rogere/Python-2.3.1/./Include -I/usrdir/rogere/include
-I/usrdir/rogere/Python-2.3.1/Include -I/usrdir/rogere/Python-2.3.1 -c
/usrdir/rogere/Python-2.3.1/Modules/structmodule.c -o
build/temp.sco_sv-3.2-i386-2.3/structmodule.o
creating build/lib.sco_sv-3.2-i386-2.3
cc -Wl,-G,-Bexport build/temp.sco_sv-3.2-i386-2.3/structmodule.o
-L/usrdir/rogere/lib -L/usr/local/lib -o
build/lib.sco_sv-3.2-i386-2.3/struct.so
*** WARNING: importing extension "struct" failed with
exceptions.AttributeError: 'module' object has no attribute 'load_dynamic'

I also get lots of these warnings for other extensions, like 'regex',
'pcre', '_hotshot', etc, etc.
In the end I can start up the Python interpreter; however, importing one of
the above extensions fails:
Python 2.3.1 (#2, Sep 29 2003, 16:43:28) [C] on sco_sv3
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named regex

Does anyone have a clue about how I should resolve these warnings?
I'd be glad to send any extra needed information if required.

Best regards and thanks in advance,
Roger Erens

System = SCO_SV
Node = ontwik2
Release = 3.2v5.0.5
KernelID = 98/07/02
Machine = i80386
BusType = ISA
Serial = 5FL004745
Users = 30-user
OEM# = 0
Origin# = 1
NumCPU = 2
SCO UNIX Development System Release 5.1.1A 27Jul98
395 /usrdir/rogere/Python-2.3.1
SCO UNIX Development System Release 5.1.1A 27Jul98
 
J

Jarek Zgoda

Roger Erens said:
System = SCO_SV
Node = ontwik2
Release = 3.2v5.0.5
KernelID = 98/07/02
Machine = i80386
BusType = ISA
Serial = 5FL004745
Users = 30-user
OEM# = 0
Origin# = 1
NumCPU = 2

SCO UNIX Development System Release 5.1.1A 27Jul98
395 /usrdir/rogere/Python-2.3.1
SCO UNIX Development System Release 5.1.1A 27Jul98

I wouldn't be surprised, SCO systems is absolute crap. And they object
reality.

http://lwn.net/Articles/51374/
 
R

Richard Sharp

Dear list,

I'm trying to install python2.3.1 on an SCO-box.
After running ./configure --prefix=/usrdir/rogere
the output of make shows (among others:)

running build
running build_ext
building 'struct' extension
creating build
creating build/temp.sco_sv-3.2-i386-2.3
cc -DNDEBUG -O -Kpic -belf -belf -Ki486 -DSCO5 -I.
-I/usrdir/rogere/Python-2.3.1/./Include -I/usrdir/rogere/include
-I/usrdir/rogere/Python-2.3.1/Include -I/usrdir/rogere/Python-2.3.1 -c
/usrdir/rogere/Python-2.3.1/Modules/structmodule.c -o
build/temp.sco_sv-3.2-i386-2.3/structmodule.o
creating build/lib.sco_sv-3.2-i386-2.3
cc -Wl,-G,-Bexport build/temp.sco_sv-3.2-i386-2.3/structmodule.o
-L/usrdir/rogere/lib -L/usr/local/lib -o
build/lib.sco_sv-3.2-i386-2.3/struct.so
*** WARNING: importing extension "struct" failed with
exceptions.AttributeError: 'module' object has no attribute 'load_dynamic'

I also get lots of these warnings for other extensions, like 'regex',
'pcre', '_hotshot', etc, etc.
In the end I can start up the Python interpreter; however, importing one of
the above extensions fails:
Python 2.3.1 (#2, Sep 29 2003, 16:43:28) [C] on sco_sv3
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: No module named regex

Does anyone have a clue about how I should resolve these warnings?
I'd be glad to send any extra needed information if required.

Best regards and thanks in advance,
Roger Erens

System = SCO_SV
Node = ontwik2
Release = 3.2v5.0.5
KernelID = 98/07/02
Machine = i80386
BusType = ISA
Serial = 5FL004745
Users = 30-user
OEM# = 0
Origin# = 1
NumCPU = 2
SCO UNIX Development System Release 5.1.1A 27Jul98
395 /usrdir/rogere/Python-2.3.1
SCO UNIX Development System Release 5.1.1A 27Jul98

I also have an interest in the answer to this question. I can narrow it
down to the following:
1) Python 2.2.2b1 links find on the particular SCO-Machine I am using.
2) The problem must be somewhere in distutils. Its happening in the run in
distutils/command/build_ext.py. The routine build_extension is called. I
built a print right at the beginning of the routine and another one right
at the end. The warning is coming as it were in the middle of nowhere,
here is the extract from build_ext.py:

def build_extensions(self):
# First, sanity-check the 'extensions' list
self.check_extensions_list(self.extensions)

for ext in self.extensions:
self.build_extension(ext)

def build_extension(self, ext):
print "RNS----------------- Begin of Extension ",ext.name

....
self.compiler.link_shared_object(
objects, ext_filename,
libraries=self.get_libraries(ext),
library_dirs=ext.library_dirs,
runtime_library_dirs=ext.runtime_library_dirs,
extra_postargs=extra_args,
export_symbols=self.get_export_symbols(ext),
debug=self.debug,
build_temp=self.build_temp,
target_lang=language)
print "RNS----------------- End of Extension ",ext.name

And here is the output:

sharp@charlie:/u/users/sharp/Python-2.3.1 > make clean
find . -name '*.o' -exec rm -f {} ';'
find . -name '*.s[ol]' -exec rm -f {} ';'
find . -name '*.py[co]' -exec rm -f {} ';'
sharp@charlie:/u/users/sharp/Python-2.3.1 > ./python -E ./setup.py build
running build
running build_ext
RNS----------------- Begin of Extension regex
building 'regex' extension
cc -DNDEBUG -O -Kpic -belf -belf -Ki486 -DSCO5 -I. -I/u/users/sharp/Python-2.3.1
/./Include -I/usr/local/include -I/u/users/sharp/Python-2.3.1/Include -I/u/users
/sharp/Python-2.3.1 -c /u/users/sharp/Python-2.3.1/Modules/regexmodule.c -o buil
d/temp.sco_sv-3.2-i386-2.3/regexmodule.o
cc -DNDEBUG -O -Kpic -belf -belf -Ki486 -DSCO5 -I. -I/u/users/sharp/Python-2.3.1
/./Include -I/usr/local/include -I/u/users/sharp/Python-2.3.1/Include -I/u/users
/sharp/Python-2.3.1 -c /u/users/sharp/Python-2.3.1/Modules/regexpr.c -o build/te
mp.sco_sv-3.2-i386-2.3/regexpr.o
UnixCompiler
cc -Wl,-G,-Bexport build/temp.sco_sv-3.2-i386-2.3/regexmodule.o build/temp.sco_s
v-3.2-i386-2.3/regexpr.o -L/usr/local/lib -o build/lib.sco_sv-3.2-i386-2.3/regex
..so
UnixCompiler End
RNS----------------- End of Extension regex
*** WARNING: importing extension "regex" failed with exceptions.AttributeError:
'module' object has no attribute 'load_dynamic'
RNS----------------- Begin of Extension pcre


Now what is being processed that throws up the warning and why?
Considering that the commands, if set off on their own, give no warning.

It is now late in Germany and I am tired and may have missed something
obvious, but I would also be glad of a hint, since, think what I may of
SCO, I would greatly prefer to work with the newest version.

regards,

Richard Sharp
 
R

Richard Sharp

For anyone interested here is the solution to the problem. ./configure is
not setting HAVE_DYNAMIC_LOADING. This is because libdl.a is not being
found.
To keep it short, unless you specify CLFLAG="-b elf", SCO will only search
for libdl.a and not for libdl.so. libdl.a is not there and then
HAVE_DYNAMIC_LOADING will not be set. This will lead to a problem in
setup.py, which subclasses build_extension and, after building the
library, tries to import it, with imp.load_dynamic(..). If you look at
Python/import.c, then it is obvious that without HAVE_DYNAMIC_LOADING
there will be no method load_dynamic and thence the error message.

So to start - CLFLAG="-b elf";export CLFLAG or the appropriate for your
shell.

The other problems you may get are with socketmodule.c.

1. On my SCO IPv6 is not there. This means ./configure --enable-ipv6=no.

2. SCO does not supply h_errno and this has to be defined.
3. INET_ADDRSTRLEN is not defined but required.


at line 230, the following appears
# ifndef RISCOS
# include <fcntl.h>
# else
# include <sys/ioctl.h>
# include <socklib.h>
# define NO_DUP
int h_errno; /* not used */
# define INET_ADDRSTRLEN 16
# endif

I just borrowed the two lines below NO_DUP and put them right above the
first ifndef. It would of course be better to make the definitions
dependant on SCO.

At line 2971 we have this:

#ifndef ENABLE_IPV6
if(af == AF_INET6) {
PyErr_SetString(socket_error,
"can't use AF_INET6, IPv6 is disabled");
return NULL;
}
#endif

If I may be pardoned, I think it is just plain wrong. I commented it out
to get moving.

I couldn't get readline.c to compile because I didn't have
readline/history.h.
I couldn't get the bz2-module to compile, but never mind.

What I couldn't build was a static version of Python-2.3.1 which I, for
obscure reasons, need. Something has happened between Python-2.2.3 and
Python 2.3.1, probably in the import area, but I know not what.

That was my bundle of fun with SCO, but perhaps the experience will be
helpful for others.

Richard Sharp
 
R

Richard Sharp

And because it's late again in Germany:

I meant CFLAGS and not CFLAG

I do apologise,

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top