Opened 13 years ago

Closed 12 years ago

#30277 closed defect (worksforme)

python27: xml.sax does not work, preventing build of py27-libxml2

Reported by: lucaghera8@… Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: lion Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: python27 python26

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi all,

I'm trying to install py27-libxml2 but it doesn't work.

Find attached the log.

Thanks,
Luca

Attachments (1)

main.log (23.9 KB) - added by lucaghera8@… 13 years ago.
Main.log

Download all attachments as: .zip

Change History (17)

Changed 13 years ago by lucaghera8@…

Attachment: main.log added

Main.log

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: lion added
Owner: changed from macports-tickets@… to mcalhoun@…
Port: py27-libxml2 added
Summary: Error building py27-libxml2 2.7.8_0py27-libxml2 2.7.8_0 build error

Please fill in the Port field and Cc the port's maintainer.

comment:2 Changed 13 years ago by jmroot (Joshua Root)

Works fine for me. Did you maybe run restore_ports.tcl with a restrictive umask before it started setting its own?

comment:3 in reply to:  2 Changed 13 years ago by lucaghera8@…

Replying to jmr@…:

Works fine for me. Did you maybe run restore_ports.tcl with a restrictive umask before it started setting its own?

I don't think so...I don't know waht restore_ports.tcl is...I'm using porticus.

comment:4 Changed 13 years ago by jmroot (Joshua Root)

Are you able to run this in MacPorts python2.7?

import xml.sax
parser = xml.sax.make_parser()

comment:5 Changed 13 years ago by lucaghera8@…

Hi, thanks for your help.

I tried to run what you said in my shell. This is the result:

macbook-di-luca:Desktop luca$ python
Python 2.7.2 (default, Jul 21 2011, 10:46:54) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.sax
>>> parser = xml.sax.make_parser()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/__init__.py", line 93, in make_parser
    raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found

To be noticed that I didn't create a file with the commands. I directly entered them from the shell. I'm not sure this is what you mean in your previous message. Sorry but I'm not used to python, I've to setup it for a dependency.

Thanks, Luca

comment:6 Changed 13 years ago by jmroot (Joshua Root)

Cc: mcalhoun@… added
Owner: changed from mcalhoun@… to jwa@…
Port: python27 added; py27-libxml2 removed

OK, so it's actually python's built-in XML module that is not working.

comment:7 Changed 13 years ago by jmroot (Joshua Root)

Summary: py27-libxml2 2.7.8_0 build errorpython27: xml.sax does not work, preventing build of py27-libxml2

comment:8 Changed 13 years ago by lucaghera8@…

I still cannot compile and install py27-libxml2. Any news?

comment:9 Changed 13 years ago by marc.schlaich@…

I am quite sure you are doing something terrible wrong on Lion. Porticus is not supported anymore. Try using the CLI.

Porticus is not compatible with either Lion (Mac OS X 10.7) or MacPorts 2.0

http://porticus.alittledrop.com/

comment:10 in reply to:  9 Changed 13 years ago by lucaghera8@…

Hi Marc,

why are you saying that I'm working with Porticus? It was, but actually I also tried to install py26-libxml2 from the command line with the same result. Luca

Replying to marc.schlaich@…:

I am quite sure you are doing something terrible wrong on Lion. Porticus is not supported anymore. Try using the CLI.

Porticus is not compatible with either Lion (Mac OS X 10.7) or MacPorts 2.0

http://porticus.alittledrop.com/

comment:11 Changed 13 years ago by jmroot (Joshua Root)

Port: python26 added

Duplicate #30845 occurred with python26.

comment:12 in reply to:  11 Changed 13 years ago by lucaghera8@…

Replying to jmr@…:

Duplicate #30845 occurred with python26.

Yes, is the same problem...and it's going to be really annoying because a lot of ports depend (indirectly) to py26-libxml2.

comment:13 in reply to:  4 ; Changed 13 years ago by lucaghera8@…

Replying to jmr@…:

Are you able to run this in MacPorts python2.7?

import xml.sax
parser = xml.sax.make_parser()

Hi,

I have started with a new installation of macport but I have the same problem with both py{27,26}-libxml2.

However now I'm able to execute the commands you suggested without errors:

here is the execution:

macbook-di-luca:rviz luca$ python2.7
Python 2.7.2 (default, Aug 18 2011, 09:26:34) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.sax
>>> parser = xml.sax.make_parser()
>>> parser
<xml.sax.expatreader.ExpatParser instance at 0x102445ab8>
>>> quit()

macbook-di-luca:rviz luca$ python2.6
Python 2.6.7 (r267:88850, Aug 18 2011, 09:12:21) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.sax
>>> parser = xml.sax.make_parser()
>>> parser
<xml.sax.expatreader.ExpatParser instance at 0x106d97b90>
>>> quit()

comment:14 Changed 13 years ago by lucaghera8@…

I really don't know why but now I can compile both.

The only thing I did is deactivating py26-setuptools and installing py26-distribute. And I copied the _socket.so file to the lib-dynload directories of python26 and 27 because they were missing.

Can these actions be the solution??

Thanks, Luca

comment:15 in reply to:  13 Changed 13 years ago by jmroot (Joshua Root)

Replying to lucaghera8@…:

I have started with a new installation of macport but I have the same problem with both py{27,26}-libxml2.

However now I'm able to execute the commands you suggested without errors:

Really? You can now use xml.sax manually but you still get an error saying "<class 'xml.sax._exceptions.SAXReaderNotAvailable'> No parsers found" when you install py*-libxml2? Attach the full log from a new installation attempt.

comment:16 Changed 12 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: newclosed

No response; closing.

Note: See TracTickets for help on using tickets.