Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid cargo manifest? #12

Closed
jmealo opened this issue Oct 9, 2018 · 14 comments
Closed

Invalid cargo manifest? #12

jmealo opened this issue Oct 9, 2018 · 14 comments

Comments

@jmealo
Copy link

jmealo commented Oct 9, 2018

root@ubuntu-s-1vcpu-1gb-nyc3-01:~/jsoncdc# make
cargo rustc --features pg-ldc-messages --release -- 
error: unable to get packages from source                                                                                                                                                                          

Caused by:
  failed to parse manifest at `/root/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/rpgffi-0.3.3/Cargo.toml`

Caused by:
  no targets specified in the manifest
  either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present
Makefile:43: recipe for target 'cargo' failed
make: *** [cargo] Error 101

rustc 1.31.0-nightly (423d81098 2018-10-08)
cargo 1.31.0-nightly (ad6e5c003 2018-09-28)
Ubuntu 18.04

@jmealo
Copy link
Author

jmealo commented Oct 9, 2018

I also tried to use stable instead (I installed with rustup):
rustc 1.29.1 (b801ae664 2018-09-20)
cargo 1.29.0 (524a578d7 2018-08-05)

Same errors

@Mythra
Copy link
Contributor

Mythra commented Oct 11, 2018

We're seeing the same thing when trying to build a dependent crate. Specifically jsoncdc

@solidsnack
Copy link
Collaborator

This thing builds fine on it's own -- it has a src/lib.rs.

@jmealo
Copy link
Author

jmealo commented Oct 12, 2018

@solidsnack @securityinsanity I'm looking to do some new work with jsoncdc. Can we try to coordinate on fixing this before the weekend? Thanks for looking into this!

@Mythra
Copy link
Contributor

Mythra commented Oct 13, 2018

I wonder if the issues with cargo package, and cargo publish and symlinks are also affecting this building: rust-lang/cargo#2748

@solidsnack
Copy link
Collaborator

So we need to stop using symlinks. What to do...

@solidsnack
Copy link
Collaborator

@jmealo Regarding your frowny face above: the error message says "either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present" but there is a src/lib.rs. Hope that explains things.

@solidsnack
Copy link
Collaborator

We might be able to fix this by adding a [lib] section that points to lib.rs or by putting some nonce Rust code in src/lib.rs (since it always gets replaced by build.rs).

@solidsnack
Copy link
Collaborator

Not able to reproduce this but hitting another issue when compiling instructure/jsoncdc.

Is there something I am doing wrong? Some cache I need to clear?

screen shot 2018-10-15 at 15 50 27

screen shot 2018-10-15 at 15 48 17

@Mythra
Copy link
Contributor

Mythra commented Oct 15, 2018

Do you have: postgres.h locally on your box? Since it links to libpq it needs that on it's box. Strangely, I'm now able to build it on latest master using nightly + not using nightly? I'm not exactly sure what has changed.

@Mythra
Copy link
Contributor

Mythra commented Oct 15, 2018

Ah I happened to run a: rustup update, and I now have rustc & cargo at: 1.29.2 instead of: 1.29.1. @jmealo can you try updating and let me know if it builds for you?

@posix4e posix4e closed this as completed Apr 9, 2019
@esatterwhite
Copy link

esatterwhite commented Aug 9, 2019

I'm getting a similar error.

error: failed to run custom build command for `rpgffi v0.3.3`
process didn't exit successfully: `/tmp/tmp4tc2abrz/jsoncdc-0.1.0/target/release/build/rpgffi-a29cb10b2d09e206/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Destination file src/pg11.rs does not exist', /root/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/rpgffi-0.3.3/build.rs:42:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [cargo] Error 101

I'm building via docker

FROM postgres:11
ENV POSTGRES_VERSION=11
ENV TIMESCALEDB_VERSION 1.3.2
ENV PG_CRON_VERSION 1.1.4
ENV RUST_VERSION=1.30.0

RUN set -ex \
  apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 \
  && apt-get update \
  && apt-get -y install postgresql-common \
                ca-certificates \
                build-essential libpq-dev locales wget unzip tree libkrb5-dev git \
                openssl \
                libssl-dev \
                curl \
                python3 \
                python3-pip \
                tar \
                make \
                cmake \
                postgresql-server-dev-${POSTGRES_VERSION} \
 
    && wget https://static.rust-lang.org/rustup/archive/1.14.0/x86_64-unknown-linux-gnu/rustup-init && chmod +x rustup-init \
    && ./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION \
    && . $HOME/.cargo/env \
    && ln -sf $(which python3) /usr/bin/python \
    && pip3 install pgxnclient --upgrade \
    && pgxn install --yes --testing jsoncdc

@esatterwhite
Copy link

@solidsnack

@esatterwhite
Copy link

I think @securityinsanity might be right. It seems to be having trouble finding pg11.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants