CCExtractor / ccextractor

CCExtractor - Official version maintained by the core team

Home Page:https://www.ccextractor.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Unable to build ccextractor on linux

Ranbato opened this issue · comments

CCExtractor version: master latest

Necessary information

  • Is this a regression (i.e. did it work before)? YES
  • What platform did you use? Linux
  • What were the used arguments?
git clone git://github.com/CCExtractor/ccextractor 
   cd ccextractor/linux 
   ./autogen.sh 
   ./configure --enable-ocr  
     make

also tried

git clone git://github.com/CCExtractor/ccextractor 
   cd ccextractor/linux 
   ./build

Additional information

autogen.sh and configure errors with the following (after I added cargo to my environment -- new dependency)

Running pre-build script...
Obtaining Git commit
Storing variables in file
Commit: 3a1851f90435ff094fae4b93f94e41acb23f3a90
Date: 2021-10-18
Stored all in compile_info_real.h
Done.
Trying to compile...
Checking for cargo...
Building rust files...
    Updating crates.io index
 Downloading crates ...
  Downloaded textwrap v0.11.0
  Downloaded which v3.1.1
  Downloaded version_check v0.9.3
  Downloaded atty v0.2.14
  Downloaded ansi_term v0.11.0
  Downloaded cfg-if v1.0.0
  Downloaded env_logger v0.8.4
  Downloaded humantime v2.1.0
  Downloaded lazycell v1.3.0
  Downloaded lazy_static v1.4.0
  Downloaded iconv v0.1.1
  Downloaded libc v0.2.98
  Downloaded termcolor v1.1.2
  Downloaded proc-macro2 v1.0.27
  Downloaded regex-syntax v0.6.25
  Downloaded dyn_buf v0.1.0
  Downloaded clang-sys v1.2.0
  Downloaded strsim v0.8.0
  Downloaded shlex v1.0.0
  Downloaded rustc-hash v1.1.0
  Downloaded regex v1.5.4
  Downloaded quote v1.0.9
  Downloaded peeking_take_while v0.1.2
  Downloaded nom v5.1.2
  Downloaded memchr v2.4.0
  Downloaded log v0.4.14
  Downloaded libloading v0.7.0
  Downloaded glob v0.3.0
  Downloaded clap v2.33.3
  Downloaded cexpr v0.4.0
  Downloaded bitflags v1.2.1
  Downloaded bindgen v0.58.1
  Downloaded aho-corasick v0.7.18
  Downloaded vec_map v0.8.2
  Downloaded unicode-xid v0.2.2
  Downloaded unicode-width v0.1.8
   Compiling libc v0.2.98
   Compiling memchr v2.4.0
   Compiling glob v0.3.0
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.3
   Compiling bitflags v1.2.1
   Compiling proc-macro2 v1.0.27
   Compiling log v0.4.14
   Compiling regex-syntax v0.6.25
   Compiling unicode-xid v0.2.2
   Compiling unicode-width v0.1.8
   Compiling vec_map v0.8.2
   Compiling strsim v0.8.0
   Compiling ansi_term v0.11.0
   Compiling bindgen v0.58.1
   Compiling humantime v2.1.0
   Compiling termcolor v1.1.2
   Compiling lazy_static v1.4.0
   Compiling peeking_take_while v0.1.2
   Compiling shlex v1.0.0
   Compiling lazycell v1.3.0
   Compiling rustc-hash v1.1.0
   Compiling dyn_buf v0.1.0
   Compiling libloading v0.7.0
   Compiling nom v5.1.2
   Compiling clang-sys v1.2.0
   Compiling textwrap v0.11.0
   Compiling aho-corasick v0.7.18
   Compiling quote v1.0.9
   Compiling atty v0.2.14
   Compiling which v3.1.1
   Compiling iconv v0.1.1
   Compiling regex v1.5.4
error[E0599]: no variant or associated item named `Unsupported` found for enum `ErrorKind` in the current scope
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/iconv-0.1.1/src/lib.rs:59:57
   |
59 |                 std::io::Error::new(std::io::ErrorKind::Unsupported, self)
   |                                                         ^^^^^^^^^^^ variant or associated item not found in `ErrorKind`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `iconv`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
cp: cannot stat 'rust/debug/libccx_rust.a': No such file or directory
Building ccextractor
gcc: error: ./libccx_rust.a: No such file or directory

Version info
rustc 1.51.0

In the meantime, I can build by passing in -without-rust

My bad, I am yet to update the docs and add checks for rust version. Minimum supported rust version is 1.54.0. Please upgrade your rust installation and try again

I installed Rust just for this build so it might be the latest version I have available in the Docker image I'm using as the base. I'll take a look and see.

Did it work out?

I haven't had a chance to go back and play with it yet. All I did is apt install cargo though so I assume it installed the latest version of Rust available for the version of Ubuntu I'm on.

You should try installing using rustup, https://www.rust-lang.org/tools/install. Ubuntu might not have the latest version

I've got the correct version of rust installing, now fighting through missing dependencies one by one.
Latest was adding libclang-dev to my build image, now i'm looking into a complaint about missing stddef.h from rust.
I'm already building ffmpeg, handbrake, ccextractor without Rust and 20+ libraries for the image so I know it is there...

Installing rustup, clang and libclang-dev seems to have resolved the build issues.

A quick execution has exposed no additional runtime dependencies

Closing as it seems the issue was resolved.