#64318 closed defect (fixed)
Aseprite @1.2.30: SyntaxError: invalid syntax
Reported by: | RaidUpgrade | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | RaidUpgrade | |
Port: | Aseprite |
Description
---> Attempting to fetch Aseprite-1.2.30_1.darwin_21.x86_64.tbz2 from https://nue.de.packages.macports.org/Aseprite ---> Fetching distfiles for Aseprite ---> Verifying checksums for Aseprite ---> Extracting Aseprite ---> Applying patches to Aseprite ---> Configuring Aseprite Error: Failed to configure Aseprite: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_Aseprite/Aseprite/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port Aseprite failed ---> Some of the ports you installed have notes: libpsl has the following notes: libpsl API documentation is provided by the port 'libpsl-docs'. python39 has the following notes: To make this the default Python or Python 3 (i.e., the version run by the 'python' or 'python3' commands), run one or both of: sudo port select --set python python39 sudo port select --set python3 python39
Attachments (1)
Change History (11)
comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign removed |
---|---|
Owner: | set to ryandesign |
Priority: | High → Normal |
Status: | new → assigned |
comment:2 Changed 3 years ago by RaidUpgrade
I think theres something wrong with the port, i was successfully able to compile Aseprite from the github instructions on my second macbook
comment:3 Changed 3 years ago by RaidUpgrade
Cc: | RaidUpgrade added |
---|
comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | bigsur removed |
---|---|
Status: | assigned → accepted |
Summary: | Aseprite @1.2.30 configuration error after extraction of aseprite → Aseprite @1.2.30: SyntaxError: invalid syntax |
The error message from the log is:
ERROR at //gn/BUILD.gn:42:7: Script returned non-zero exit code. exec_script("find_xcode_sysroot.py", [ "macosx" ], "trim string") ^---------- Current dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_Aseprite/Aseprite/work/skia/out/Release/ Command: python /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_Aseprite/Aseprite/work/skia/gn/find_xcode_sysroot.py macosx Returned 1. stderr: File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_Aseprite/Aseprite/work/skia/gn/find_xcode_sysroot.py", line 13 print subprocess.check_output(['xcrun', '--sdk', sdk, '--show-sdk-path']) ^ SyntaxError: invalid syntax See //gn/BUILDCONFIG.gn:172:3: which caused the file to be included. "//gn:default", ^-------------
This makes me think the find_xcode_sysroot.py script is expecting to be run with python 2 (which is Apple's system python version) but you might have used port select
to select a version of python 3 as your python. I am able to reproduce the problem if I do that.
Let me see if I can either fix the build to work with python 3 or else convince the build to use python 2.
comment:5 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Here's the commit where skia's gn was fixed for python 3 compatibility:
https://github.com/aseprite/skia/commit/beaaf4700f50e5f4760e45dbf4e82dca61f8c652
Aseprite has been using an older branch of skia that doesn't have that fix yet.
comment:6 follow-up: 7 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:7 Changed 3 years ago by RaidUpgrade
Replying to ryandesign:
I dont know if i understand what youre saying, i tried to compile it again but it returned the same error.
Also, if it wants to use python2 then why does it fetch python3 in the first place??
comment:8 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Run sudo port selfupdate
to receive the fix I committed.
Aseprite is a complicated software program depending on many libraries, many of which are built as a part of building Aseprite because they are not available as separate ports in MacPorts or because the build system makes it difficult to use the MacPorts versions. Some parts of this complicated build have been updated to use python 3 while other parts still require python 2. Hopefully in a future version of Aseprite all of the build will have been updated to use python 3.
comment:9 Changed 3 years ago by RaidUpgrade
Thank you so much Ryan, it worked and i was able to build Aseprite again. I do have one last question though, when i built Aseprite from the source code on github, i got a unix executable file, how does your script on macports turn it into a .app file??
Thank you again for all the help, i really appreciate it!!
comment:10 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Yes. I couldn't find any way to make the build system create an app bundle. However, the executable that it did produce works fine when placed within an app bundle. So in the Aseprite Portfile I just make the app bundle manually. MacPorts has some support for creating generic app bundles in the app portgroup which the Aseprite Portfile uses, controlled by the settings in the Portfile that start with app.
. If you're interested in what all the port does, or in recreating it yourself outside of MacPorts, check out the destroot
and post-destroot
blocks, and also the contents of the extra-Info.plist file in the files directory, which the port adds to the standard Info.plist created by the app portgroup. To find these extra settings, I had downloaded the trial version of Aseprite and looked at its Info.plist.
Please attach the main.log.