#macOS Cargo build error

39 messages · Page 1 of 1 (latest)

spare escarp
#

cloning the repo then building with cargo build -p typst-cli --release as per README gives the following error:

Compiling proc-macro2 v1.0.52
   Compiling unicode-ident v1.0.8
   Compiling quote v1.0.26
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling syn v1.0.109
   Compiling adler v1.0.2
   Compiling crc32fast v1.3.2
[...]
Compiling elsa v1.8.0
   Compiling notify v5.1.0
   Compiling codespan-reporting v0.11.1
   Compiling dirs v4.0.0
   Compiling memmap2 v0.5.10
error: failed to run custom build command for `typst-cli v0.0.0 (/Users/gourmas/typst/cli)`

Caused by:
  process didn't exit successfully: `/Users/<user>/typst/target/release/build/typst-cli-23cf5a5dfdd30611/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...

setup: MacBook Pro w/ M1 Max, macOS 13.2.1 (22D68), rustc 1.68.1 (8460ca823 2023-03-20).

is this an issue with apple silicon being unsupported or is there something i can do to fix the build error?

uncut jetty
#

does it happen even if you try it multiple times?

#

Apple Silicon shouldnt be the issue

spare escarp
#

yup the same error instantly

#

i get the same error with cargo install --path cli

uncut jetty
#

huh that's weird 🤔

spare escarp
#

it doesn't make any difference whether i do git clone, or gh repo clone

#

rebuilding just gives

Compiling typst-cli v0.0.0 (/Users/gourmas/typst/cli)
error: failed to run custom build command for `typst-cli v0.0.0 (/Users/<user>/typst/cli)`

Caused by:
  process didn't exit successfully: `/Users/gourmas/typst/target/release/build/typst-cli-23cf5a5dfdd30611/build-script-build` (signal: 9, SIGKILL: kill)
uncut jetty
#

are you using some kind of special shell

spare escarp
#

i'm using zsh in iterm, i'll try it in the system terminal if you think it'll help

#

ah, same error i'm afraid

uncut jetty
#

:(

#

I still think something's probably wrong with your rust installation

spare escarp
#

ok so the only relevant thing i'm finding is that rustup is installed through brew

#

which i'll try and uninstall and reinstall directly instead

#

damn, still nothing

uncut jetty
#

:/ sorry then I dont know either...

#

other cargo builds work?

spare escarp
#

yeah and the weird thing is that just running cargo buiuld in the typst directory works fine

#

but cargo build -p typst-cli --release does not

#

actually so does cargo build -p typst-cli

#

for some reason it's the --release flag that throws SIGKILL??

uncut jetty
#

interesting 🤔

#

can you try removing that from Cargo.toml?

spare escarp
#

will do

#

i'm afk for a few mins but i'll keep you posted when i do

#

btw when i do are you gonna want me to remove the whole profile or just the strip = true line?

uncut jetty
#

I guess all of it

#

I think this was added in a PR recently

#

im not sure if its gonna change anything but since you only seem to have problems with the release flag it might be worth trying 🤔

#

I don't actually know what it does

spare escarp
#

okay

#

so

spare escarp
# uncut jetty I guess all of it

i was gonna try comment out the strip = true line first and see if it worked and if it didn't just delete both lines, but commenting the line out worked!

#

so if i just leave [profile.release.package."typst-cli" there with nothing underneath, it builds successfully

uncut jetty
#

Huh okay interesting

#

I have Apple silicon too but it didn’t cause any issues for me

spare escarp
#

completely bizarre