New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #26379 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

mesa @7.10.2 build error with python 3

Reported by: ericl54291@… Owned by: jeremyhu@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: kimuraw@…
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

main.log (22.7 KB) - added by ericl54291@… 3 years ago.
main.log
patch-mesa-MP26379.diff (1.8 KB) - added by kimuraw@… 3 years ago.
use `/usr/bin/python' in building
Portfile.diff (341 bytes) - added by jmr@… 2 years ago.
mesa-python3.diff (232.6 KB) - added by jmr@… 2 years ago.

Change History

Changed 3 years ago by ericl54291@…

main.log

comment:1 Changed 3 years ago by blb@…

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

comment:2 Changed 3 years ago by jeremyhu@…

It builds fine for me with Leopard/G5

comment:3 Changed 3 years ago by jeremyhu@…

  • Status changed from new to closed
  • Resolution set to worksforme

comment:4 Changed 3 years ago by kimuraw@…

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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 3 years ago by kimuraw@…

use `/usr/bin/python' in building

comment:5 Changed 3 years ago by jmr@…

  • Keywords leopard ppc powerpc removed
  • Summary changed from mesa @7.8.2 build error shell command failed to mesa @7.8.2 build error with python 3 selected

comment:6 Changed 3 years ago by kimuraw@…

  • Cc kimuraw@… added

CC me!

comment:7 follow-up: ↓ 11 Changed 3 years ago by swordangel@…

Why not patch the print statements instead?

comment:8 Changed 2 years ago by jeremyhu@…

Can you give me an updated patch for this?

comment:9 Changed 2 years ago by jeremyhu@…

  • Summary changed from mesa @7.8.2 build error with python 3 selected to python3: mesa @7.8.2 build error

comment:10 Changed 2 years ago by jeremyhu@…

#27550 also reporting python31 issues.

comment:11 in reply to: ↑ 7 Changed 2 years ago by jmr@…

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 2 years ago by jmr@…

Changed 2 years ago by jmr@…

comment:12 Changed 2 years ago by ryandesign@…

Did this issue ever get resolved upstream?

comment:13 Changed 2 years ago by ryandesign@…

  • Summary changed from python3: mesa @7.8.2 build error to mesa @7.8.2 build error with python 3

comment:14 Changed 2 years ago by jeremyhu@…

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

comment:15 Changed 2 years ago by jeremyhu@…

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 2 years ago by jeremyhu@…

  • Summary changed from mesa @7.8.2 build error with python 3 to mesa @7.10.2 build error with python 3

comment:17 Changed 2 years ago by jeremyhu@…

  • Status changed from reopened to closed
  • Resolution set to fixed

r79299 should fix this by choosing python2

comment:18 Changed 2 years ago by jmr@…

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.