Ticket #26379 (closed defect: fixed)
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
Change History
comment:1 Changed 3 years ago by blb@…
- Owner changed from macports-tickets@… to jeremyhu@…
- Keywords mesa removed
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@…
- Attachment patch-mesa-MP26379.diff added
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:7 follow-up: ↓ 11 Changed 3 years ago by swordangel@…
Why not patch the print statements instead?
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.
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):
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.


main.log