Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#26379 closed defect (fixed)

mesa @7.10.2 build error with python 3

Reported by: ericl54291@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: kimuraw (kimura wataru)
Port: mesa

Description

I am trying to install mesa on my iBook g4, PowerPC processor, running 10.5.8 leopard, with Xcode 3.1.4 installed. The terminal output is

--->  Building mesa
Error: Target org.macports.build returned: shell command failed
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: Status 1 encountered during processing.

Attachments (4)

main.log (22.7 KB) - added by ericl54291@… 14 years ago.
main.log
patch-mesa-MP26379.diff (1.8 KB) - added by kimuraw (kimura wataru) 14 years ago.
use `/usr/bin/python' in building
Portfile.diff (341 bytes) - added by jmroot (Joshua Root) 14 years ago.
mesa-python3.diff (232.6 KB) - added by jmroot (Joshua Root) 14 years ago.

Download all attachments as: .zip

Change History (22)

Changed 14 years ago by ericl54291@…

Attachment: main.log added

main.log

comment:1 Changed 14 years ago by blb@…

Keywords: mesa removed
Owner: changed from macports-tickets@… to jeremyhu@…

comment:2 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

It builds fine for me with Leopard/G5

comment:3 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: newclosed

comment:4 Changed 14 years ago by kimuraw (kimura wataru)

Resolution: worksforme
Status: closedreopened

The same error was occurred on my Mac. This error was caused by incompatibility of "print" between python 2.x and 3.x.

  print "foo bar"  # 2.x => OK, 3.x => NG
  print("foo bar") # 2.x => OK, 3.x => OK

If `python' is 3.x, then "port install mesa" fails.

  % python --version
  Python 2.6.6
  % python_select -s
  python26
  % sudo port install mesa
  # => OK

  % python --version
  Python 3.1.2
  % python_select -s
  python31
  % sudo port install mesa 
  # => FAIL with the error of util/u_format_table.py

I made a patch to use apple's python (/usr/bin/python) in src/gallium/auxiliary/Makefile.

Changed 14 years ago by kimuraw (kimura wataru)

Attachment: patch-mesa-MP26379.diff added

use `/usr/bin/python' in building

comment:5 Changed 14 years ago by jmroot (Joshua Root)

Keywords: leopard ppc powerpc removed
Summary: mesa @7.8.2 build error shell command failedmesa @7.8.2 build error with python 3 selected

comment:6 Changed 14 years ago by kimuraw (kimura wataru)

Cc: kimuraw@… added

CC me!

comment:7 Changed 14 years ago by ksze (Kal Sze)

Why not patch the print statements instead?

comment:8 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Can you give me an updated patch for this?

comment:9 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Summary: mesa @7.8.2 build error with python 3 selectedpython3: mesa @7.8.2 build error

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

#27550 also reporting python31 issues.

comment:11 in reply to:  7 Changed 14 years ago by jmroot (Joshua Root)

Replying to swordangel@…:

Why not patch the print statements instead?

Well I just found out why not. (It's a huge pain.)

Attached patch makes mesa build with either python 2.x or 3.x selected (tested with 2.6 and 3.1), and should be suitable for sending upstream.

Changed 14 years ago by jmroot (Joshua Root)

Attachment: Portfile.diff added

Changed 14 years ago by jmroot (Joshua Root)

Attachment: mesa-python3.diff added

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

Did this issue ever get resolved upstream?

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

Summary: python3: mesa @7.8.2 build errormesa @7.8.2 build error with python 3

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

I'm pretty sure this is fixed in 7.10.2 ...

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

ugg... no, it didn't ... any much of the patch no longer applies.

Now that we're actually able to use master, they'll probably be more receptive to a patch.

jmr, would you mind updating your patch to mesa master (and hopefully it'll apply to the 7.10 branch):

http://cgit.freedesktop.org/mesa/mesa/

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

Summary: mesa @7.8.2 build error with python 3mesa @7.10.2 build error with python 3

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

Resolution: fixed
Status: reopenedclosed

r79299 should fix this by choosing python2

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

Checking the python version and running 2to3 as needed is probably a better approach for upstream. I'll see if I can throw together a patch if I have time.

Note: See TracTickets for help on using tickets.