[GH-ISSUE #8] error: Could not compile syntex_syntax #3

Closed
opened 2026-02-27 19:28:12 +03:00 by kerem · 26 comments
Owner

Originally created by @lionas89 on GitHub (Jan 3, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/8

Originally assigned to: @ComlOnline on GitHub.

Good day,

can you help me compile it? I get an error: Could not compile syntex_syntax.

Originally created by @lionas89 on GitHub (Jan 3, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/8 Originally assigned to: @ComlOnline on GitHub. Good day, can you help me compile it? I get an error: Could not compile syntex_syntax.
kerem 2026-02-27 19:28:12 +03:00
Author
Owner

@ComlOnline commented on GitHub (Jan 6, 2018):

I had this exact error once.
I think this is what helped.

From memory is was due to a versioning issue.

Let me know if you need more help.

Coml

<!-- gh-comment-id:355782545 --> @ComlOnline commented on GitHub (Jan 6, 2018): I had this exact error once. I think [this ](https://github.com/racer-rust/racer/issues/388)is what helped. From memory is was due to a versioning issue. Let me know if you need more help. Coml
Author
Owner

@lionas89 commented on GitHub (Jan 7, 2018):

Thank you for the reply I will try to update rustup and check it if it helps.

<!-- gh-comment-id:355835020 --> @lionas89 commented on GitHub (Jan 7, 2018): Thank you for the reply I will try to update rustup and check it if it helps.
Author
Owner

@lionas89 commented on GitHub (Jan 8, 2018):

Hello,

I need help, I can't find how to downgrade rust. I'm using rustup.

<!-- gh-comment-id:356056428 --> @lionas89 commented on GitHub (Jan 8, 2018): Hello, I need help, I can't find how to downgrade rust. I'm using rustup.
Author
Owner

@ComlOnline commented on GitHub (Jan 8, 2018):

Hey @lionas89,

Just wondering why you are downgrading rust?

I've just complied it on the latest to check and also made Travis do it again to confirm.

Can you share more of the errors you are getting. (If they are very ling use a gist or pastebin)

Coml

<!-- gh-comment-id:356089668 --> @ComlOnline commented on GitHub (Jan 8, 2018): Hey @lionas89, Just wondering why you are downgrading rust? I've just complied it on the latest to check and also made Travis do it again to confirm. Can you share more of the errors you are getting. (If they are very ling use a gist or pastebin) Coml
Author
Owner

@lionas89 commented on GitHub (Jan 9, 2018):

Hello,

Thank you for the response.

In the link you provided, one user message was:

But then I had to brew switch rust 1.1.0 backwards because bad cargo is in the homebrew rust 1.2.0 package: Homebrew/homebrew#42992

Sure I can:
Compiling syntex_syntax v0.58.1
Running rustc --crate-name syntex_syntax /root/.cargo/registry/src/github. com-1ecc6299db9ec823/syntex_syntax-0.58.1/src/lib.rs --crate-type lib --emit=dep -info,link -C opt-level=3 -C metadata=1b8dae9622393ef1 -C extra-filename=-1b8dae 9622393ef1 --out-dir /root/librespot/target/release/deps -L dependency=/root/lib respot/target/release/deps --extern log=/root/librespot/target/release/deps/libl og-e39aafb8710f86e3.rlib --extern unicode_xid=/root/librespot/target/release/dep s/libunicode_xid-b0d47ff4e5256777.rlib --extern rustc_serialize=/root/librespot/ target/release/deps/librustc_serialize-c2609f6283a547ab.rlib --extern syntex_pos =/root/librespot/target/release/deps/libsyntex_pos-0f2ee0f823e73c39.rlib --exter n syntex_errors=/root/librespot/target/release/deps/libsyntex_errors-3ba41ee7b60 654b8.rlib --extern bitflags=/root/librespot/target/release/deps/libbitflags-2f9 abeef2a0eea3e.rlib --cap-lints allow
error: Could not compile syntex_syntax.

Caused by:
process didn't exit successfully: rustc --crate-name syntex_syntax /root/.car go/registry/src/github.com-1ecc6299db9ec823/syntex_syntax-0.58.1/src/lib.rs --cr ate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=1b8dae9622393ef1 -C extra-filename=-1b8dae9622393ef1 --out-dir /root/librespot/target/release/deps -L dependency=/root/librespot/target/release/deps --extern log=/root/librespot/t arget/release/deps/liblog-e39aafb8710f86e3.rlib --extern unicode_xid=/root/libre spot/target/release/deps/libunicode_xid-b0d47ff4e5256777.rlib --extern rustc_ser ialize=/root/librespot/target/release/deps/librustc_serialize-c2609f6283a547ab.r lib --extern syntex_pos=/root/librespot/target/release/deps/libsyntex_pos-0f2ee0 f823e73c39.rlib --extern syntex_errors=/root/librespot/target/release/deps/libsy ntex_errors-3ba41ee7b60654b8.rlib --extern bitflags=/root/librespot/target/relea se/deps/libbitflags-2f9abeef2a0eea3e.rlib --cap-lints allow (signal: 9, SIGKILL : kill)

<!-- gh-comment-id:356192707 --> @lionas89 commented on GitHub (Jan 9, 2018): Hello, Thank you for the response. In the link you provided, one user message was: > But then I had to brew switch rust 1.1.0 backwards because bad cargo is in the homebrew rust 1.2.0 package: Homebrew/homebrew#42992 Sure I can: Compiling syntex_syntax v0.58.1 Running `rustc --crate-name syntex_syntax /root/.cargo/registry/src/github. com-1ecc6299db9ec823/syntex_syntax-0.58.1/src/lib.rs --crate-type lib --emit=dep -info,link -C opt-level=3 -C metadata=1b8dae9622393ef1 -C extra-filename=-1b8dae 9622393ef1 --out-dir /root/librespot/target/release/deps -L dependency=/root/lib respot/target/release/deps --extern log=/root/librespot/target/release/deps/libl og-e39aafb8710f86e3.rlib --extern unicode_xid=/root/librespot/target/release/dep s/libunicode_xid-b0d47ff4e5256777.rlib --extern rustc_serialize=/root/librespot/ target/release/deps/librustc_serialize-c2609f6283a547ab.rlib --extern syntex_pos =/root/librespot/target/release/deps/libsyntex_pos-0f2ee0f823e73c39.rlib --exter n syntex_errors=/root/librespot/target/release/deps/libsyntex_errors-3ba41ee7b60 654b8.rlib --extern bitflags=/root/librespot/target/release/deps/libbitflags-2f9 abeef2a0eea3e.rlib --cap-lints allow` error: Could not compile `syntex_syntax`. Caused by: process didn't exit successfully: `rustc --crate-name syntex_syntax /root/.car go/registry/src/github.com-1ecc6299db9ec823/syntex_syntax-0.58.1/src/lib.rs --cr ate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=1b8dae9622393ef1 -C extra-filename=-1b8dae9622393ef1 --out-dir /root/librespot/target/release/deps -L dependency=/root/librespot/target/release/deps --extern log=/root/librespot/t arget/release/deps/liblog-e39aafb8710f86e3.rlib --extern unicode_xid=/root/libre spot/target/release/deps/libunicode_xid-b0d47ff4e5256777.rlib --extern rustc_ser ialize=/root/librespot/target/release/deps/librustc_serialize-c2609f6283a547ab.r lib --extern syntex_pos=/root/librespot/target/release/deps/libsyntex_pos-0f2ee0 f823e73c39.rlib --extern syntex_errors=/root/librespot/target/release/deps/libsy ntex_errors-3ba41ee7b60654b8.rlib --extern bitflags=/root/librespot/target/relea se/deps/libbitflags-2f9abeef2a0eea3e.rlib --cap-lints allow` (signal: 9, SIGKILL : kill)
Author
Owner

@ComlOnline commented on GitHub (Jan 9, 2018):

Ah I see what's happened, from what I've seen the latest release is fine.

What operating system are you using?
Have you tried running "rustup update"?

<!-- gh-comment-id:356251111 --> @ComlOnline commented on GitHub (Jan 9, 2018): Ah I see what's happened, from what I've seen the latest release is fine. What operating system are you using? Have you tried running "rustup update"?
Author
Owner

@lionas89 commented on GitHub (Jan 9, 2018):

Here is information:
https://pastebin.com/XGcdVvQy

root@chip:~# rustup update
info: syncing channel updates for 'stable-armv7-unknown-linux-gnueabihf'
info: checking for self-updates

stable-armv7-unknown-linux-gnueabihf unchanged - rustc 1.23.0 (766bd11c8 2018-01-01)

I followed steps in this tutorial:
https://bbs.nextthing.co/t/howto-chip-or-chip-pro-as-spotify-connect-radio/17621

<!-- gh-comment-id:356346743 --> @lionas89 commented on GitHub (Jan 9, 2018): Here is information: https://pastebin.com/XGcdVvQy root@chip:~# rustup update info: syncing channel updates for 'stable-armv7-unknown-linux-gnueabihf' info: checking for self-updates stable-armv7-unknown-linux-gnueabihf unchanged - rustc 1.23.0 (766bd11c8 2018-01-01) I followed steps in this tutorial: https://bbs.nextthing.co/t/howto-chip-or-chip-pro-as-spotify-connect-radio/17621
Author
Owner

@ComlOnline commented on GitHub (Jan 11, 2018):

And you got the same error after the update?
Have you tried from a fresh install?
And did you run:
sudo apt-get update
sudo apt-get upgrade
to get it all up to date?
I presume you are running CHIP Operating System?

(Note: I don'r have a CHIP to help you but am looking at buying one. Also I think the above commands are correct from the documentation.)

<!-- gh-comment-id:357024419 --> @ComlOnline commented on GitHub (Jan 11, 2018): And you got the same error after the update? Have you tried from a fresh install? And did you run: `sudo apt-get update` `sudo apt-get upgrade` to get it all up to date? I presume you are running CHIP Operating System? (Note: I don'r have a CHIP to help you but am looking at buying one. Also I think the above commands are correct from the documentation.)
Author
Owner

@lionas89 commented on GitHub (Jan 12, 2018):

Yes,
here is the output:
https://pastebin.com/pcdKPTt1

I think I'm faced the low memory issue. Is there a way to compile on PC and transfer it to CHIP?

<!-- gh-comment-id:357317043 --> @lionas89 commented on GitHub (Jan 12, 2018): Yes, here is the output: https://pastebin.com/pcdKPTt1 I think I'm faced the low memory issue. Is there a way to compile on PC and transfer it to CHIP?
Author
Owner

@ComlOnline commented on GitHub (Jan 21, 2018):

Sorry for the long wait for a reply!

I'm looking at your logs now

<!-- gh-comment-id:359290408 --> @ComlOnline commented on GitHub (Jan 21, 2018): Sorry for the long wait for a reply! I'm looking at your logs now
Author
Owner

@lionas89 commented on GitHub (Jan 22, 2018):

Hello,

Thank you. I'm waiting for your response. :)

<!-- gh-comment-id:359349510 --> @lionas89 commented on GitHub (Jan 22, 2018): Hello, Thank you. I'm waiting for your response. :)
Author
Owner

@ComlOnline commented on GitHub (Jan 22, 2018):

Just to confirm you have tried a complete reinstall of CHIP OS and install of rust using rustup?

<!-- gh-comment-id:359409625 --> @ComlOnline commented on GitHub (Jan 22, 2018): Just to confirm you have tried a complete reinstall of CHIP OS and install of rust using rustup?
Author
Owner

@ComlOnline commented on GitHub (Jan 22, 2018):

Also I'll try cross compiling it for you later tonight, it's not ideal but it would be a short cut.

Many thanks

Coml

<!-- gh-comment-id:359510285 --> @ComlOnline commented on GitHub (Jan 22, 2018): Also I'll try cross compiling it for you later tonight, it's not ideal but it would be a short cut. Many thanks Coml
Author
Owner

@lionas89 commented on GitHub (Jan 22, 2018):

Yes, I have tried fresh CHI and install using rustup. I followed @Brat steps. Tried his compiled version of @Brat, but I got an error:
root@chip:~/Downloads# ./librespot --name "CHIP" --username "xxxxx" --password "xxxxx" RUST_BACKTRACE=1
INFO:librespot: librespot 67deb07 (2017-06-30). Built on 2017-07-05.
INFO:librespot::session: Connecting to AP "gew1-accesspoint-b-kzpq.ap.spotify.com:4070"
INFO:librespot::session: Authenticated as "xxxxxxx" !
INFO:librespot::session: Country: "LT"
thread '' panicked at 'called Result::unwrap() on an Err value: WireError("invalid value for enum: 13")', /checkout/src/libcore/result.rs:859
note: Run with RUST_BACKTRACE=1 for a backtrace.
thread 'main' panicked at 'called Result::unwrap() on an Err value: "SendError(..)"', /checkout/src/libcore/result.rs:859

Thank you very much for help. 👍

<!-- gh-comment-id:359537873 --> @lionas89 commented on GitHub (Jan 22, 2018): Yes, I have tried fresh CHI and install using rustup. I followed @Brat steps. Tried his compiled version of @Brat, but I got an error: root@chip:~/Downloads# ./librespot --name "CHIP" --username "xxxxx" --password "xxxxx" RUST_BACKTRACE=1 INFO:librespot: librespot 67deb07 (2017-06-30). Built on 2017-07-05. INFO:librespot::session: Connecting to AP "gew1-accesspoint-b-kzpq.ap.spotify.com:4070" INFO:librespot::session: Authenticated as "xxxxxxx" ! INFO:librespot::session: Country: "LT" thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: WireError("invalid value for enum: 13")', /checkout/src/libcore/result.rs:859 note: Run with `RUST_BACKTRACE=1` for a backtrace. thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', /checkout/src/libcore/result.rs:859 Thank you very much for help. 👍
Author
Owner

@ComlOnline commented on GitHub (Jan 22, 2018):

Try running it without the username and password so just

./librespot --name "CHIP"
<!-- gh-comment-id:359548594 --> @ComlOnline commented on GitHub (Jan 22, 2018): Try running it without the username and password so just ``` ./librespot --name "CHIP" ```
Author
Owner

@lionas89 commented on GitHub (Jan 22, 2018):

Same issue. This appears when I try to connect with remote device to play song.

<!-- gh-comment-id:359549681 --> @lionas89 commented on GitHub (Jan 22, 2018): Same issue. This appears when I try to connect with remote device to play song.
Author
Owner

@ComlOnline commented on GitHub (Jan 22, 2018):

OK I'm running a cross compiling job now and will upload the version that may work for you.

And as you saw I have commented asking if brad had any success with this fork.

<!-- gh-comment-id:359570465 --> @ComlOnline commented on GitHub (Jan 22, 2018): OK I'm running a cross compiling job now and will upload the version that may work for you. And as you saw I have commented asking if brad had any success with this fork.
Author
Owner

@ComlOnline commented on GitHub (Jan 23, 2018):

MD5: e732d71c2b8a36c22c3aae71a96aa059
SHA256:7b9b50d93c8e628bc7b55f36a6fbbb305229f7c77af98919c2ca132b71657946
librespot.zip

Try that it may work, though I won't get our hopes up.

<!-- gh-comment-id:359623866 --> @ComlOnline commented on GitHub (Jan 23, 2018): MD5: e732d71c2b8a36c22c3aae71a96aa059 SHA256:7b9b50d93c8e628bc7b55f36a6fbbb305229f7c77af98919c2ca132b71657946 [librespot.zip](https://github.com/ComlOnline/librespot/files/1654037/librespot.zip) Try that it may work, though I won't get our hopes up.
Author
Owner

@lionas89 commented on GitHub (Jan 23, 2018):

It is working at the moment. I can control it on my phone and it's what I need. Thank you very much. If I will face any issue I will let you know. Honestly, BIG THANK YOU!!! 🥇

<!-- gh-comment-id:359859324 --> @lionas89 commented on GitHub (Jan 23, 2018): It is working at the moment. I can control it on my phone and it's what I need. Thank you very much. If I will face any issue I will let you know. Honestly, BIG THANK YOU!!! 🥇
Author
Owner

@ComlOnline commented on GitHub (Jan 23, 2018):

No problem :) That's good to hear! Not quite sure what caused your issue but Glad you have it sorted.

I'll close this for now. Let me know if you have any other issues.

<!-- gh-comment-id:359889917 --> @ComlOnline commented on GitHub (Jan 23, 2018): No problem :) That's good to hear! Not quite sure what caused your issue but Glad you have it sorted. I'll close this for now. Let me know if you have any other issues.
Author
Owner

@crushert commented on GitHub (Mar 3, 2018):

This seems to be exactly the problem I'm stuck with. Wanted to give the cross-compiled download a few posts up a try, but it doesn't seem to be available anymore. Not sure it would be the right platform anyway, though, I'm on a raspberry B+, not sure if that matches the CHIP.

While compiling the syntex_syntax, kswapd takes over all processing power at a certain moment, processor load goes up to 30+, and at some point the build process fails.

P.S. the reason I'm trying to compile my own librespot on the raspberry B+ is that the precompiled one I'm using now results in the following error shortly after starting it:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: WireError("invalid value for enum: 13")', /checkout/src/libcore/result.rs:859

P.P.S. I realise I'm replying to a closed issue, but since it seems to match the issue I'm having, I thought this would be better than opening a new issue. My apologies if that's not the desired way.

<!-- gh-comment-id:370185976 --> @crushert commented on GitHub (Mar 3, 2018): This seems to be exactly the problem I'm stuck with. Wanted to give the cross-compiled download a few posts up a try, but it doesn't seem to be available anymore. Not sure it would be the right platform anyway, though, I'm on a raspberry B+, not sure if that matches the CHIP. While compiling the syntex_syntax, kswapd takes over all processing power at a certain moment, processor load goes up to 30+, and at some point the build process fails. P.S. the reason I'm trying to compile my own librespot on the raspberry B+ is that the precompiled one I'm using now results in the following error shortly after starting it: ```thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: WireError("invalid value for enum: 13")', /checkout/src/libcore/result.rs:859``` P.P.S. I realise I'm replying to a closed issue, but since it seems to match the issue I'm having, I thought this would be better than opening a new issue. My apologies if that's not the desired way.
Author
Owner

@ComlOnline commented on GitHub (Mar 3, 2018):

Just as a nice easy solution have you had a look at Raspotify?
It is basically a wrapper for librespot and will save you compiling it yourself?

If you want to try the version above (I'm not sure it would work) The link changed and can now be found here.

Let me know how it goes!

<!-- gh-comment-id:370187853 --> @ComlOnline commented on GitHub (Mar 3, 2018): Just as a nice easy solution have you had a look at [Raspotify](https://github.com/dtcooper/raspotify)? It is basically a wrapper for librespot and will save you compiling it yourself? If you want to try the version above (I'm not sure it would work) The link changed and can now be found [here](https://github.com/librespot-org/librespot/files/1654037/librespot.zip). Let me know how it goes!
Author
Owner

@crushert commented on GitHub (Mar 4, 2018):

The precompiled librespot is clearly not matching my architecture, it segfaults upon startup. Raspotify, I had not heard of that, but that sounds very promising, I'll be sure to take a look at that! Thanks for pointing me there!

<!-- gh-comment-id:370210416 --> @crushert commented on GitHub (Mar 4, 2018): The precompiled librespot is clearly not matching my architecture, it segfaults upon startup. Raspotify, I had not heard of that, but that sounds very promising, I'll be sure to take a look at that! Thanks for pointing me there!
Author
Owner

@ComlOnline commented on GitHub (Mar 4, 2018):

Let me know if you have any more issues and I can cross compile one for the pi but Raspotify should sort you out.

<!-- gh-comment-id:370223874 --> @ComlOnline commented on GitHub (Mar 4, 2018): Let me know if you have any more issues and I can cross compile one for the pi but Raspotify should sort you out.
Author
Owner

@crushert commented on GitHub (Mar 4, 2018):

Raspotify sorts me out, 98%. Now I'm stuck with an alsa issue, probably some other sound-related process preventing raspotify/librespot from accessing the device.

Mar 04 12:58:09 max2play librespot[3045]: ERROR:librespot_playback::audio_backend::alsa: Alsa error PCM open -16
Mar 04 12:58:09 max2play librespot[3045]: ERROR:librespot_playback::player: Could not start audio: Alsa error: PCM open failed

But now I'm diverting quite a bit from the original issue posted here, and I hope with some more searching on the internet and trying out I can figure this out... So, thanks for the help, issue closed for me.

Raspotify was an excellent suggestion, thanks for that!

Edit: got it working at last. Note to self: if you kill other processes that claim alsa, make sure there's no automatic restart for these processes in place... ;)

<!-- gh-comment-id:370228500 --> @crushert commented on GitHub (Mar 4, 2018): Raspotify sorts me out, 98%. Now I'm stuck with an alsa issue, probably some other sound-related process preventing raspotify/librespot from accessing the device. `Mar 04 12:58:09 max2play librespot[3045]: ERROR:librespot_playback::audio_backend::alsa: Alsa error PCM open -16` `Mar 04 12:58:09 max2play librespot[3045]: ERROR:librespot_playback::player: Could not start audio: Alsa error: PCM open failed` But now I'm diverting quite a bit from the original issue posted here, and I hope with some more searching on the internet and trying out I can figure this out... So, thanks for the help, issue closed for me. Raspotify was an excellent suggestion, thanks for that! Edit: got it working at last. Note to self: if you kill other processes that claim alsa, make sure there's no automatic restart for these processes in place... ;)
Author
Owner

@ComlOnline commented on GitHub (Mar 4, 2018):

@crushert good to hear!

<!-- gh-comment-id:370241803 --> @ComlOnline commented on GitHub (Mar 4, 2018): @crushert good to hear!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#3
No description provided.