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

Empty requirement causes install failure #14

Closed
jeking3 opened this issue Apr 16, 2021 · 3 comments
Closed

Empty requirement causes install failure #14

jeking3 opened this issue Apr 16, 2021 · 3 comments

Comments

@jeking3
Copy link

jeking3 commented Apr 16, 2021

After using cargo generate-rpm I end up with an rpm that has an empty "requires":

[root@6794b4c1c5ee tmp]# rpm -q --requires /cli/target/cloudtruth-0.2.0-1.x86_64.rpm

/bin/sh

This causes install to fail:

[root@6794b4c1c5ee tmp]# rpm -i /cli/target/cloudtruth-0.2.0-1.x86_64.rpm
error: Failed dependencies:
         is needed by cloudtruth-0:0.2.0-1.x86_64

Any idea what could be causing this?

@jeking3
Copy link
Author

jeking3 commented Apr 16, 2021

I found I had to set auto-req = "no" and provide my own dependencies to work around this.

@cat-in-136
Copy link
Owner

@jeking3 as you mentions, workaround is to disable the automatic dependency process with setting auto-req = "no".

If /usr/lib/rpm/find-requires (rpm builtin program) does not exist on your system, cargo-generate-rpm executes ldd and parses its output. So, could you please share the output of ldd release/release/cloudtruth?

@jeking3
Copy link
Author

jeking3 commented Jun 23, 2021

I'll close this out because it appears to be working now.

I should mention I run this in the rust:1.52.1-alpine container (to make the RPM), so perhaps that's part of the problem:

On alpine:

bash-5.1$ ldd !$
ldd target/release/cloudtruth
        /lib/ld-musl-x86_64.so.1 (0x7f6ed8af3000)
        libssl.so.1.1 => /lib/libssl.so.1.1 (0x7f6ed8387000)
        libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7f6ed8106000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f6ed8af3000)

bash-5.1$ cargo-generate-rpm
/lib/ld-musl-x86_64.so.1: cannot load -v: No such file or directory

Then on centos 8:

[root@a680fea297fb cli]# rpm -q --requires target/generate-rpm/cloudtruth-0.5.4-1.x86_64.rpm
rtld(GNU_HASH)
/bin/sh

[root@92a65b653b44 /]# rpm -i /cli/target/generate-rpm/cloudtruth-0.5.4-1.x86_64.rpm
[root@92a65b653b44 /]# cloudtruth --version
cloudtruth 0.5.4
[root@92a65b653b44 /]#

The -v error is odd, but what's coming out now seems to be working. I tested with v0.4.0 of cargo-generate-rpm.

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

2 participants