To: xmlschema-dev@w3.org
X-Mailer: Apple Mail (2.337)
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Apple Message framework v337)

<=
flushleft><fontfamily><param>Helvetica</param><x-tabstops><param>28L;56L;8=
4L;112L;140L;168L;196L;224L;252L;280L;308L;336L;</param>I am cross =
posting this to the xmlschema folks and to the MacOSX-dev folks in hopes

that somebody can resolve this Python related dynamic loading problem I =
am having.=20


I am trying to get the xmlschema validator (aka XSV) to build and run

on a UNIX machine.   Specifically MacOS X public beta.


When I try to run my shell script wrapper:

- - - - - - - -=20

#!/bin/sh

export PYTHONPATH=3D"/usr/local/lib/ltxml12:/Apps/org/xml/ltxml"=20

python "/Apps/org/xml/xmlschema/applyschema.py" $1 $2

- - - - - - - -=20

I get this:


- - - - - - -

% xsv

['/Apps/org/xml/xmlschema', '/usr/local/lib/ltxml12', =
'/Apps/org/xml/ltxml', '/usr/local/lib/python1.6/', =
'/usr/local/lib/python1.6/plat-next', '/usr/local/lib/python1.6/lib-tk', =
'/usr/local/lib/python1.6/lib-dynload', =
'/usr/local/lib/python1.6/site-packages']

Traceback (most recent call last):

  File "/Apps/org/xml/xmlschema/applyschema.py", line 10, in ?

    from PyLTXML import *

  File "/Apps/org/xml/ltxml/PyLTXML/__init__.py", line 1, in ?

    from LTXMLinter import *

ImportError: Inappropriate file type for dynamic loading

- - - - - - -


I have sucessfully downloaded, built, and installed Python 1.6.

I also have downloaded an built PyLTXML-1.2.tar  and=20

ltxml-1.2.tar.   It looks like the ltxml build and install put=20

the following libraries in /usr/local/lib:=20


-rw-r--r--    1 root  wheel  237228 Oct 17 17:47 libltapi12.a

-rw-r--r--    1 root  wheel  129488 Oct 17 17:47 libltstd12.a


along side those files is an ltxml12 directory containing:


ls -l /usr/local/lib/ltxml12

total 48

-rw-r--r--  1 root  wheel  1015 Oct 17 17:47 Makefile.usr

-rw-r--r--  1 root  wheel  2632 Oct 17 17:47 intersect.ddb

-rw-r--r--  1 root  wheel  1774 Oct 17 17:47 intersect.dtd

-rw-r--r--  1 root  wheel  2992 Oct 17 17:47 sgrpg.ddb

-rw-r--r--  1 root  wheel  2981 Oct 17 17:47 sgrpg.dtd

-rw-r--r--  1 root  wheel  1131 Oct 17 17:47 sgrpg.dtd,xml


When I look at my successfully running copy on WinNT

I see in C:\Program Files\HCRC LTG\LT XML\Python\lib\PyLTXML=20

THREE dlls:  ltapi12.dll, ltstd12.dll, and LTXMLinter.dll=20


I am guessing that the ltapi12.dll and ltstd12.dll  correspond to

my /usr/local/lib files libltapi12.a and libltstd12.a  which leads=20

me to believe that I should also find a libLTXMLinter.a  there=20

too. =20


I found that the PyLTXML build created and installed a file

into /usr/local/lib/python1.6/site-packages/PyLTXML8

named LTXMLintermodule.so

-rw-r--r--  1 root  wheel  3975436 Oct 23 11:54 LTXMLintermodule.so


I had some difficulty getting that to build and had to mess with ld =
switches

some.  Specifically I had to put a -r switch on it so the .so file would

remain even if there were unresolved references.   Here is my command:


/usr/bin/ld -arch ppc -r -o XMLintermodule8.so -lcrt1.o -L/usr/local/lib =
NSLintermodule8.o alloc.o block_alloc.o hash.o -lltapi12 -lltstd12 =
-lcc_dynamic -framework System=20


And here is what 'file' has to say about these .so files:

[localhost:xml/ltxml/PyLTXML] root# file *.so

LTXMLintermodule.so: Mach-O object ppc

XMLintermodule8.so:  Mach-O object ppc


Once I got that installed I now get a different complaint:


  File "/Apps/org/xml/ltxml/PyLTXML/__init__.py", line 1, in ?

    from LTXMLinter import *

ImportError: Inappropriate file type for dynamic loading



One other note, when I built python1.6 I had to add a '-DWITH_DYLD' on =
the compile for=20

dynload_next.c  to get it to compile successfully.=20


Any clues? =20

=
</x-tabstops></fontfamily><fontfamily><param>Geneva</param><x-tabstops><pa=
ram>28L;56L;84L;112L;140L;168L;196L;224L;252L;280L;308L;336L;</param>-----=
-------------------------------------------------------------------

Michael Burns                                email: =
<underline><color><param>0000,0000,FFFF</param>Michael.Burns@sas.com</colo=
r></underline>

Principal Systems Developer           home: =
<underline><color><param>0000,0000,FFFF</param>mburns@bga.com</color></und=
erline>=20

Metadata Integration Technology    voice: (512)258-5171x3264

SAS Institute, Inc.                             fax: (512)258-3906

11920 Wilson Parke Ave.                www: =
<underline><color><param>0000,0000,FFFF</param>http://www.realtime.net/~mb=
urns</color></underline>

Austin, TX 78726-4052                   sww: =
<underline><color><param>0000,0000,FFFF</param>http://sww.sas.com/~sasmkb<=
/color></underline>

"choose for yourselves today whom you will serve;...

 but as for me and my house, we will serve the Lord." Joshua =
24:15</x-tabstops></fontfamily></flushleft>=

