GithubHelp home page GithubHelp logo

Don't execute example function, why? about plrust HOT 2 CLOSED

tcdi avatar tcdi commented on August 22, 2024
Don't execute example function, why?

from plrust.

Comments (2)

panchove avatar panchove commented on August 22, 2024

I miss the final step

sudo apt install cargo -y

and now

ERROR:  compilation failed
    Updating crates.io index
 Downloading crates ...
  Downloaded owo-colors v1.3.0
  Downloaded ansi_term v0.12.1
  Downloaded ppv-lite86 v0.2.15
  Downloaded dirs-sys v0.3.6
  Downloaded quote v1.0.10
  Downloaded rand v0.7.3
  Downloaded rustc_version v0.3.3
  Downloaded rustc-hash v1.1.0
  Downloaded rayon-core v1.9.1
  Downloaded semver v0.11.0
  Downloaded bitflags v1.3.2
  Downloaded regex-automata v0.1.10
  Downloaded clang-sys v1.3.0
  Downloaded regex-syntax v0.6.25
  Downloaded cfg-if v1.0.0
  Downloaded color-spantrace v0.1.6
  Downloaded base64 v0.11.0
  Downloaded crossbeam-deque v0.8.1
  Downloaded fixedbitset v0.4.0
  Downloaded hash32 v0.2.1
  Downloaded matchers v0.1.0
  Downloaded lazycell v1.3.0
  Downloaded minimal-lexical v0.2.1
  Downloaded lock_api v0.4.5
  Downloaded num-traits v0.2.14
  Downloaded nom v7.1.0
  Downloaded miniz_oxide v0.4.4
  Downloaded scopeguard v1.1.0
  Downloaded rustc-demangle v0.1.21
  Downloaded rand_core v0.5.1
  Downloaded serde-xml-rs v0.5.1
  Downloaded semver-parser v0.10.2
  Downloaded serde v1.0.131
  Downloaded serde_derive v1.0.131
  Downloaded serde_cbor v0.11.2
  Downloaded sharded-slab v0.1.4
  Downloaded ryu v1.0.9
  Downloaded proc-macro2 v1.0.34
  Downloaded pin-project-lite v0.2.7
  Downloaded petgraph v0.6.0
  Downloaded time-macros v0.2.3
  Downloaded thread_local v1.1.3
  Downloaded time v0.3.5
  Downloaded tracing-core v0.1.21
  Downloaded tracing-attributes v0.1.18
  Downloaded tracing-log v0.1.2
  Downloaded tracing-error v0.1.2
  Downloaded tracing v0.1.29
  Downloaded toml v0.5.8
  Downloaded termcolor v1.1.2
  Downloaded stable_deref_trait v1.2.0
  Downloaded mime_guess v2.0.3
  Downloaded memchr v2.4.1
  Downloaded clap v2.34.0
  Downloaded mime v0.3.16
  Downloaded itoa v0.4.8
  Downloaded env_logger v0.9.0
  Downloaded crossbeam-utils v0.8.5
  Downloaded humantime v2.1.0
  Downloaded lazy_static v1.4.0
  Downloaded itoa v1.0.1
  Downloaded heapless v0.7.8
  Downloaded form_urlencoded v1.0.1
  Downloaded eyre v0.6.5
  Downloaded either v1.6.1
  Downloaded crossbeam-channel v0.5.1
  Downloaded which v4.2.2
  Downloaded smallvec v1.7.0
  Downloaded pest v2.1.3
  Downloaded num_cpus v1.13.0
  Downloaded thiserror-impl v1.0.30
  Downloaded tinyvec_macros v0.1.0
  Downloaded tinyvec v1.5.1
  Downloaded thiserror v1.0.30
  Downloaded syn v1.0.82
  Downloaded url v2.2.2
  Downloaded vec_map v0.8.2
  Downloaded unicode-width v0.1.9
  Downloaded unescape v0.1.0
  Downloaded version_check v0.9.3
  Downloaded strsim v0.8.0
  Downloaded unicode-xid v0.2.2
  Downloaded rttp_client v0.1.0
  Downloaded spin v0.9.2
  Downloaded tracing-subscriber v0.2.25
  Downloaded tracing-error v0.2.0
  Downloaded socks v0.3.3
  Downloaded seahash v4.1.0
  Downloaded unicase v2.6.0
  Downloaded adler v1.0.2
  Downloaded addr2line v0.17.0
  Downloaded textwrap v0.11.0
  Downloaded pgx-utils v0.2.6
  Downloaded unicode-normalization v0.1.19
  Downloaded xml-rs v0.8.4
  Downloaded bindgen v0.59.2
  Downloaded pgx v0.2.6
  Downloaded dirs v4.0.0
  Downloaded crossbeam-epoch v0.9.5
  Downloaded enum-primitive-derive v0.2.2
  Downloaded half v1.8.2
  Downloaded getrandom v0.1.16
  Downloaded getrandom v0.2.3
  Downloaded glob v0.3.0
  Downloaded flate2 v1.0.22
  Downloaded colored v2.0.0
  Downloaded cexpr v0.6.0
  Downloaded crc32fast v1.3.0
  Downloaded cc v1.0.72
  Downloaded percent-encoding v2.1.0
  Downloaded httpdate v0.3.2
  Downloaded byteorder v1.4.3
  Downloaded aho-corasick v0.7.18
  Downloaded backtrace v0.3.63
  Downloaded autocfg v1.0.1
  Downloaded atty v0.2.14
  Downloaded unicode-bidi v0.3.7
  Downloaded ucd-trie v0.1.3
  Downloaded uuid v0.8.2
  Downloaded tracing-subscriber v0.3.3
  Downloaded hashbrown v0.11.2
  Downloaded indenter v0.3.3
  Downloaded env_proxy v0.4.1
  Downloaded indexmap v1.7.0
  Downloaded memoffset v0.6.5
  Downloaded once_cell v1.9.0
  Downloaded peeking_take_while v0.1.2
  Downloaded matches v0.1.9
  Downloaded log v0.4.14
  Downloaded libloading v0.7.2
  Downloaded atomic-traits v0.3.0
  Downloaded build-deps v0.1.4
  Downloaded object v0.27.1
  Downloaded pgx-macros v0.2.6
  Downloaded proc-macro-crate v1.1.0
  Downloaded rand_chacha v0.2.2
  Downloaded rayon v1.5.1
  Downloaded regex v1.5.4
  Downloaded serde_json v1.0.73
  Downloaded shlex v1.1.0
  Downloaded idna v0.2.3
  Downloaded color-eyre v0.5.11
  Downloaded libc v0.2.112
  Downloaded gimli v0.26.1
  Downloaded pgx-pg-sys v0.2.6
   Compiling libc v0.2.112
   Compiling proc-macro2 v1.0.34
   Compiling autocfg v1.0.1
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.82
   Compiling cfg-if v1.0.0
   Compiling memchr v2.4.1
   Compiling version_check v0.9.3
   Compiling lazy_static v1.4.0
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: could not compile `memchr`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: build failed
-----------------

use pgx::*;

#[pg_extern]
fn plrust_fn_49188(a: Array<i64>) -> Option<i64> {
    Some(a.into_iter().map(|v| v.unwrap_or_default()).sum())

}
CONTEXT:  src/lib.rs:43:61
SQL state: XX000```

from plrust.

Hoverbear avatar Hoverbear commented on August 22, 2024

It looks like your machine (presumably debian/ubuntu) doesn't have the build-essential package and thus has no C build chain, this is unfortunately required.

Feel free to reopen this issue if that doesn't resolve it!

from plrust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.