LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-23-2023, 12:50 PM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,078

Rep: Reputation: Disabled
How to build rust 1.67.1 on a system based on Slackware64-15.0?


I tried to build from the source files in: http://ftp.slackware.com/pub/slackwa...source/d/rust/ and failed. Here is the build log:
Code:
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- ./compiler/rustc_llvm/build.rs.orig    2020-11-16 08:01:53.000000000 -0600
|+++ ./compiler/rustc_llvm/build.rs    2020-11-19 13:46:21.222785372 -0600
--------------------------
patching file compiler/rustc_llvm/build.rs
Using Plan A...
Hunk #1 succeeded at 286 (offset 52 lines).
done
Building rustbuild
error: failed to get `cc` as a dependency of package `bootstrap v0.0.0 (/repo/x86_64/slint-15.0/source/rust/rustc-1.67.1-src/src/bootstrap)`

Caused by:
  failed to load source for dependency `cc`

Caused by:
  Unable to update registry `crates-io`

Caused by:
  failed to update replaced source registry `crates-io`

Caused by:
  failed to parse manifest at `/repo/x86_64/slint-15.0/source/rust/rustc-1.67.1-src/vendor/env_logger/Cargo.toml`

Caused by:
  namespaced features with the `dep:` prefix are only allowed on the nightly channel and requires the `-Z namespaced-features` flag on the command-line
failed to run: /usr/bin/cargo build --manifest-path /repo/x86_64/slint-15.0/source/rust/rustc-1.67.1-src/src/bootstrap/Cargo.toml --frozen
Build completed unsuccessfully in 0:00:00
I never tried to build rust before. Any clue appreciated.

Last edited by Didier Spaier; 03-23-2023 at 03:01 PM. Reason: Typo fix.
 
Old 03-23-2023, 02:14 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,556

Rep: Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572
If you're not already running the specified version of the rust compiler that's able to build rust 1.67.1, then your best bet is to run the bottom part of rust.url (everything below the "exit 0") to download the bootstrap compiler from upstream. Then try running the SlackBuild again.
 
3 members found this post helpful.
Old 03-23-2023, 02:15 PM   #3
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,453

Rep: Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211
Hi Didier,

Download the 3 pkg (x86_64 BOOTSTRAP) a the end of rust.url
and
build rust
 
2 members found this post helpful.
Old 03-23-2023, 02:15 PM   #4
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,556

Rep: Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572Reputation: 8572
Quote:
Originally Posted by marav View Post
and
build rust with LOCAL_BOOTSTRAP=yes
If the bootstrap packages are present, LOCAL_BOOTSTRAP=yes is automatic.
 
4 members found this post helpful.
Old 03-23-2023, 02:16 PM   #5
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 785

Rep: Reputation: 482Reputation: 482Reputation: 482Reputation: 482Reputation: 482
SBO has a rust package for 15.0 which will build: 15.0 > Development > rust16 (1.67.1)
Worked for me.
HTH
j

Last edited by AlleyTrotter; 03-23-2023 at 02:18 PM.
 
3 members found this post helpful.
Old 03-23-2023, 02:40 PM   #6
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,453

Rep: Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211
Quote:
Originally Posted by volkerdi View Post
If the bootstrap packages are present, LOCAL_BOOTSTRAP=yes is automatic.
yep, I corrected
Anyway, you beat me to it

Last edited by marav; 03-23-2023 at 02:44 PM.
 
2 members found this post helpful.
Old 03-23-2023, 03:01 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,078

Original Poster
Rep: Reputation: Disabled
Thanks Patrick and marav and also Alley Trotter, building now. Will mark this thread as [SOLVED] when built.
 
Old 03-23-2023, 03:33 PM   #8
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,078

Original Poster
Rep: Reputation: Disabled
Successfully built. Now I can try again to build odilia: https://github.com/odilia-app/odilia/issues/111
 
2 members found this post helpful.
Old 03-23-2023, 04:06 PM   #9
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
I know this is already marked [SOLVED], but are you aware of https://slackbuilds.org/repository/1...pment/rust16/?
 
Old 03-23-2023, 04:11 PM   #10
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,078

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by drumz View Post
I know this is already marked [SOLVED], but are you aware of https://slackbuilds.org/repository/1...pment/rust16/?
Yes, already mentioned by Alley Trotter, thanks anyway.
 
Old 03-23-2023, 04:16 PM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,078

Original Poster
Rep: Reputation: Disabled
Maybe off topic, but building odilia software failed with a strange error:

(signal: 11, SIGSEGV: invalid memory reference)

I know it's beta software but I would really try this new screen reader.

Last edited by Didier Spaier; 03-23-2023 at 04:54 PM.
 
Old 03-23-2023, 06:35 PM   #12
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 462

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
From the log file on the GitHub issue:
Quote:
...
/usr/lib64/librustc_driver-88df3683475b2000.so(+0x702b73)[0x7fdf2cf02b73]
/lib64/libc.so.6(+0x3b8d0)[0x7fdf2c4948d0]
/usr/lib64/libLLVMCore.so.13(_ZN4llvm11PointerType3getEPNS_4TypeEj+0x14)[0x7fdf29244204]
...
I've seen this error before, and it seems to be related to an LLVM version mismatch. The workaround is to use a rust build with a bundled LLVM library. Any one of the following should work:
  • Rebuild rust with SYSTEM_LLVM=NO
  • Install rust16 from SBo and use the export statements in the README file
  • Build rustup from SBo; install a 1.65+ stable toolchain and use that

EDIT: rust-1.68.1 (now in /testing) doesn't appear to have this problem, at least when building on -current.

Last edited by pghvlaans; 03-23-2023 at 07:40 PM.
 
3 members found this post helpful.
Old 03-24-2023, 02:10 AM   #13
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,078

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pghvlaans View Post
Rebuild rust with SYSTEM_LLVM=NO
This did the trick and now odilia speaks to me, thanks!
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Learn Rust by debugging Rust LXer Syndicated Linux News 0 07-30-2022 01:09 PM
LXer: Rust Foundation launches Rust Community Grants program LXer Syndicated Linux News 0 04-01-2022 03:30 PM
[SOLVED] slackware64-current: ldconfig message related to rust package tomac.pl Slackware 2 04-25-2020 02:37 PM
LXer: Snips Uses Rust to Build an Embedded Voice Assistant LXer Syndicated Linux News 0 02-21-2018 11:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration