Opened 13 years ago

Closed 13 years ago

#29737 closed update (fixed)

mesa upgrade fails due to "missing" libxml2

Reported by: aeronova Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), jendave@…, sewebster@…, dershow
Port: mesa

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

Hello,

I'm using Mac 10.6.7, and I had the following error when I update the mesa library.

mklib: Making Darwin shared library:  libGL.1.2.dylib
mklib: Installing libGL.1.2.dylib libGL.1.dylib libGL.dylib in ../../../lib
python -t -O -O main/es_generator.py -S main/APIspec.xml -V GLES1.1 > main/api_exec_es1.c
python -t -O -O main/es_generator.py -S main/APIspec.xml -V GLES2.0 > main/api_exec_es2.c
Traceback (most recent call last):
  File "main/es_generator.py", line 26, in <module>
    import APIspecutil as apiutil
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_mesa/work/Mesa-7.10.2/src/mesa/main/APIspecutil.py", line 28, in <module>
    import libxml2
ImportError: No module named libxml2
Traceback (most recent call last):
  File "main/es_generator.py", line 26, in <module>
    import APIspecutil as apiutil
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_mesa/work/Mesa-7.10.2/src/mesa/main/APIspecutil.py", line 28, in <module>
    import libxml2
ImportError: No module named libxml2
make[2]: *** No rule to make target `depend', needed by `default'.  Stop.
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_mesa/work/Mesa-7.10.2" && /usr/bin/make -j2 default INSTALL_DIR=/opt/local RC_CFLAGS="-arch x86_64" CC="/usr/bin/gcc-4.2 " CXX="/usr/bin/g++-4.2 " " returned error 2
Error: Target org.macports.build returned: shell command failed (see log for details)
Warning: the following items did not execute (for mesa): org.macports.destroot org.macports.build
Log for mesa is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_mesa/main.log
Error: Unable to upgrade port: 1
To report a bug, see <http://guide.macports.org/#project.tickets>

The error says there is no libxml2, but I think I have it installed from the following check:

$ port installed | grep libxml2
  libxml2 @2.7.8_0 (active)
  py26-libxml2 @2.6.21_0 (active)
  py27-libxml2 @2.6.21_0 (active)

Please help me with this problem. Thank you in adv.

  1. Lee.

Attachments (1)

mesa_main.log (76.8 KB) - added by dershow 13 years ago.

Download all attachments as: .zip

Change History (21)

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

Cc: ryandesign@… added
Description: modified (diff)
Keywords: mesa removed
Owner: changed from macports-tickets@… to jeremyhu@…
Port: mesa added

Which version of python is selected (with "port select python")?

comment:2 Changed 13 years ago by michelle.lynn.gill@…

Same issue here. I'm using python 2.6.

comment:3 in reply to:  2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to michelle.lynn.gill@…:

Same issue here. I'm using python 2.6.

MacPorts python 2.6 or Apple python 2.6? And do you have py26-libxml2 installed?

comment:4 Changed 13 years ago by jendave@…

The build fails for me as well

:info:build /usr/bin/gcc-4.2  -c -I../../../include -I../../../src/mapi -I../../../src/mesa -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -I/opt/local/include -I/opt/local/include  -fPIC -arch x86_64 -arch i386  -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE -DGLX_ALIAS_UNSUPPORTED -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL -DMAPI_GLAPI_CURRENT ../../../src/mapi/mapi/u_thread.c -o u_thread.o
:info:build mklib: Making Darwin static library:  libglapi.a
:info:build ar: creating archive libglapi.a
:info:build /usr/bin/ranlib: archive library: libglapi.a will be fat and ar(1) will not be able to operate on it
:info:build python -t -O -O ../../../src/mapi/mapi/mapi_abi.py \
:info:build             --printer vgapi --mode lib vgapi.csv > vgapi_tmp.h
:info:build   File "../../../src/mapi/mapi/mapi_abi.py", line 398
:info:build     print self.c_header()
:info:build              ^
:info:build SyntaxError: invalid syntax
:info:build make[2]: *** No rule to make target `depend', needed by `default'.  Stop.
:info:build make[1]: *** [subdirs] Error 1
:info:build make: *** [default] Error 1
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_mesa/work/Mesa-7.10.2" && /usr/bin/make -j2 default INSTALL_DIR=/opt/local RC_CFLAGS="-arch x86_64 -arch i386" CC="/usr/bin/gcc-4.2 " CXX="/usr/bin/g++-4.2 " " returned error 2

comment:5 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Cc: jendave@… added
Status: newassigned

jendave: Your issue is completely unrelated to this one. Please file a new bug report including the full build log

Changed 13 years ago by dershow

Attachment: mesa_main.log added

comment:6 Changed 13 years ago by dershow

I can't update on a dual G4 PPC with 10.5.8. I get the error log that is attached. But, I tried the upgrade on a dual G5 machine, also with 10.5.8, and that upgrade succeeded. I also don't have a problem on an Intel machine with 10.6.

comment:7 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Summary: mesa upgrade failure (from mesa 7.8.2_2 to 7.10.2_2)mesa upgrade fails due to "missing" libxml2

comment:8 Changed 13 years ago by sewebster@…

I have this problem too.

comment:9 Changed 13 years ago by sewebster@…

Cc: sewebster@… added

Cc Me!

comment:10 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Rather than everyone "me too"ing, could someone please answer Ryan's question above about which python you have installed and selected. Run the following:

port installed | grep libxml2
port select python

comment:11 Changed 13 years ago by sewebster@…

[/Users/swebster@skadi]$ port installed | grep libxml2
  libxml2 @2.7.8_0+universal (active)
  py26-libxml2 @2.6.21_0 (active)
  py27-libxml2 @2.6.21_0 (active)
[/Users/swebster@skadi]$  port select python
Available versions for python:
	none (active)
	python25-apple
	python26
	python26-apple
	python27
[/Users/swebster@skadi]$ 

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

Cc: dersh@… added

comment:13 Changed 13 years ago by dershow

The one that fails reports:

$ port installed | grep libxml2
  libxml2 @2.7.8_0 (active)
  py25-libxml2 @2.6.21_1 (active)
  py26-libxml2 @2.6.21_0 (active)
  py27-libxml2 @2.6.21_0 (active)
$ port select python
Available versions for python:
	none
	python25
	python25-apple (active)
	python26
	python27

While the PPC computer that does update reports:

$ port installed | grep libxml2
  libxml2 @2.7.8_0 (active)
  py25-libxml2 @2.6.21_1 (active)
  py26-libxml2 @2.6.21_0 (active)
  py27-libxml2 @2.6.21_0 (active)
$ port select python
Available versions for python:
	none
	python25 (active)
	python25-apple
	python26
	python27

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

Ok, so what's been shown above confirms that mesa needs a python with the libxml2 module. Apple's presumably doesn't come with it. So mesa needs a dependency on a py*-libxml2 port, and needs to use the corresponding versioned python binary (and not just use "python" as it does currently).

comment:15 Changed 13 years ago by sewebster@…

yeah it works once I just select python27

comment:16 in reply to:  14 Changed 13 years ago by afb@…

Replying to ryandesign@…:

Ok, so what's been shown above confirms that mesa needs a python with the libxml2 module. Apple's presumably doesn't come with it.

Apple disables python in their libxml2, unless you rebuild it:

Extra_Configure_Flags = --enable-static=no --with-python=no --with-iconv=no --with-icu=yes

10.6: http://opensource.apple.com/source/libxml2/libxml2-21.11.1/ 10.5: http://opensource.apple.com/source/libxml2/libxml2-17.7.8/

comment:17 Changed 13 years ago by gallafent

So just to help others who find this bug before it's fixed, to get things working you need to install and select a macports version of python (not an apple one):

$ port install python26
$ port select python python26
$ port install py26-libxml2

… then the mesa build will succeed.

comment:18 Changed 13 years ago by michelle.lynn.gill@…

A quick note that "port select python python26" MUST be run even if python26 is the only python installed from MacPorts AND it is set as the default via $PYTHONHOME in a .bashrc/.zshrc:

 % port installed python26
The following ports are currently installed:
  python26 @2.6.6_1+universal
  python26 @2.6.6_2+universal
  python26 @2.6.6_3+universal (active)
% port installed py26-libxml2
The following ports are currently installed:
  py26-libxml2 @2.6.21_0 (active)
% which python
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python
% echo $PYTHONHOME
/opt/local/Library/Frameworks/Python.framework/Versions/2.6
% sudo echo $PYTHONHOME
/opt/local/Library/Frameworks/Python.framework/Versions/2.6

Despite having met all requirements except the seemingly arbitrary "python select," my mesa installation was failing. After running the command, it worked.

comment:19 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

r79299 should fix this problem. Please confirm.

comment:20 Changed 13 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: assignedclosed

Closing since someone confirmed this fix via email. Thanks.

Note: See TracTickets for help on using tickets.