Hi,
to keep you updated:
I changed ~73 lfs files by adding the line "cd $(DIR_APP) && rm -f Cargo.toml.orig".
Brutal, needs optimization, but effective: build is running and building 'rust 1.65'. No more errors.
Example:
***SNIP*** diff --git a/lfs/rust-ryu b/lfs/rust-ryu index 7faec1aa6..f120c032b 100644 --- a/lfs/rust-ryu +++ b/lfs/rust-ryu @@ -73,6 +73,9 @@ $(subst %,%_BLAKE2,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + + cd $(DIR_APP) && rm -f Cargo.toml.orig + cd $(DIR_APP) && $(CARGO_PREPARE) cd $(DIR_APP) && $(CARGO_BUILD) cd $(DIR_APP) && $(CARGO_INSTALL) ***SNAP***
Excerpt from 'suricata 6.0.9' log:
***SNIP*** Rust support: yes Rust strict mode: no Rust compiler path: /usr/bin/rustc Rust compiler version: rustc 1.65.0 (897e37553 2022-11-02) Cargo path: /usr/bin/cargo Cargo version: cargo 1.65.0 (4bc8f24d3 2022-10-20) Cargo vendor: yes ***SNAP***
Eyerolling may start NOW. ;-)
Best, Matthias
On 30.11.2022 15:50, Matthias Fischer wrote:
EDIT:
I had to remove the attachments, they were too big. I'll send them - shortened.
But:
I've added:
cd $(DIR_APP) && rm -f Cargo.toml.orig
to (e.g.) 'lfs/rust-crypto-common'. In other words: "I got the axe out".
Right now I'm doing this for every lfs file that gives me the 'invalid inclusion' error.
Build is running...
On 30.11.2022 09:46, Adolf Belka wrote:
Hi Matthias,
Hi Adolf,
When you moved rust-crypto-common to just before rust-cipher did you do a full clean build?
Simpliest question first:
Yes. I always did a clean build, based on current 'next'.
Regards,
Adolf
On 30/11/2022 09:31, Adolf Belka wrote:
Hi Matthias,
On 30/11/2022 08:20, Matthias Fischer wrote:
Hi,
I looked through my logs - line by line:
"warning: No (git) VCS found for..." is a "common" warning, coming up with every rust-package - until building stops.
That's might be just because we are running isolated and so it can't connect to the git repository for the package.
It's only a *warning*. Ok then. Sunglasses ON, ignore.
There are lots of warnings in the build if you look even when everything build successfully. So yes ignore the warnings.>>> The main goal is:
... error: invalid inclusion of reserved file name Cargo.toml.orig in package source ...
This is an error but my feeling is that this is more of a result rather than a cause. Are there ant errors earlier in the log for the build of that rust package.
IMHO, '_build.ipfire.log' shows no - severe - errors until "Building rust-crypto-common crypto-common-0.1.1.tar.gz checksum OK" starts at line 135989 and then stops with "error: invalid inclusion..." in line 136012.
This just came to my view while wandering through the logs again: in 'make.sh', "lfsmake2 rust" appears *twice*.
This doesn't make sense, and the second call just does nothing: "make: Nothing to be done for 'install'."
Best, Matthias
You need to find the first error that triggers all the rest. I have found that sometimes I have to look quite a way back, because many of the objects being compiled are being done in parallel so the faulty one can be a way back.
Followed by:
... make: *** [rust-crypto-common:78: /usr/src/log/crypto-common-0.1.1] Error 123 [Building stops] ...
And yes, in 'crypto-common-0.1.1.tar.gz' there is a file named 'Cargo.toml.orig'.
And furthermore, the contents of 'crypto-common' look a bit different compared to (e.g.!) 'cfg-if-1.0.0.tar.gz':
cfg-if looks different than the other rust packages in not having the Cargo.toml.orig file
All the ones I looked at (five) have that file present. The Cargo.toml file in those packages that have a .orig version have the following comment in them.
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents.
So I don't think removing Cargo.toml.orig from the crypto-common source file will fix things, just move the problem further down the chain. I have never had to do anything with the rust source files when building any of the additional packages I have had to do.
Can you provide a copy of the whole of the Building crypto-common section of the log file. Maybe with more people looking at it someone will be able to identify what is causing the problem.
See above.
Have patience, you will eventually be successful.
I know, its just a matter of time. But.
But sometimes "you have to let off a little steam..." ;-)
I attached lfs and rootfile for 'rust 1.65', if you'd like to test.
Regards, Adolf.
***SNIP*** root@Devel64-1: /tmp/expand # ls crypto-common-0.1.1/ -l total 36 -rw-r--r-- 1 root root 1045 Jan 1 1970 Cargo.toml -rw-r--r-- 1 root root 619 Nov 29 1973 Cargo.toml.orig -rw-r--r-- 1 root root 474 Nov 29 1973 CHANGELOG.md -rw-r--r-- 1 root root 10849 Nov 29 1973 LICENSE-APACHE -rw-r--r-- 1 root root 1065 Nov 29 1973 LICENSE-MIT -rw-r--r-- 1 root root 1882 Nov 29 1973 README.md drwxr-xr-x 2 root root 4096 Nov 30 08:10 src root@Devel64-1: /tmp/expand # ls cfg-if-1.0.0/ -l total 32 -rw-r--r-- 1 root root 792 Oct 6 2020 Cargo.toml -rw-r--r-- 1 root root 10847 Oct 6 2020 LICENSE-APACHE -rw-r--r-- 1 root root 1057 Oct 6 2020 LICENSE-MIT -rw-r--r-- 1 root root 1123 Oct 6 2020 README.md drwxr-xr-x 2 root root 4096 Nov 30 08:10 src drwxr-xr-x 2 root root 4096 Nov 30 08:10 tests ***SNAP***
It sounds...brutal...but with the next clean build, I'll delete this file during build process of 'crypto-common' and see what happens...
Better ideas?
Best, Matthias