parallaxsecond / rust-tss-esapi

TSS 2.0 Enhanced System API (ESAPI) Rust wrapper
https://docs.rs/tss-esapi/
Apache License 2.0
89 stars 52 forks source link

error while building #283

Closed StefanoSetti closed 3 years ago

StefanoSetti commented 3 years ago

during the compilation process of library tss-esapi = "6.1.1" an error occurred:

failed to run custom build command for `tss-esapi-sys v0.2.0`
...
cause by:
...
thread 'main' panicked at 'Failed to find tss2-sys library.:

what should I do?

Superhepper commented 3 years ago

Have you installed the tpm2-tss library?

StefanoSetti commented 3 years ago

in my OS?

Superhepper commented 3 years ago

@ionut-arm is better at answering these types of questions. But I think you need to have the tpm2-tss library installed on the machine where you build the code, but also on the machine where you run the code.

StefanoSetti commented 3 years ago

in both cases the lib is installed

Superhepper commented 3 years ago

Hrmm maybe it is pkg that have problem finding it.

ionut-arm commented 3 years ago

Indeed, you should be able to check using pkg-config. What does the following output? (you might need to install pkg-config)

pkg-config --modversion tss2-esys
StefanoSetti commented 3 years ago
Package tss2-esys was not found in the pkg-config search path.
Perhaps you should add the directory containing `tss2-esys.pc'
to the PKG_CONFIG_PATH environment variable
Package 'tss2-esys', required by 'virtual:world', not found

I'm using fedora and pkgs tss2 and tss2-devel are installed

ionut-arm commented 3 years ago

Looking at our Fedora test Dockerfile, seems you might need tpm2-tss-devel?

StefanoSetti commented 3 years ago
pkg-config --modversion tss2-esys
3.1.0

it look slike to work now.

ionut-arm commented 3 years ago

I hope it will work - technically speaking we support versions 2.3.3 and up (and we do run tests on the CI against that version, in the Fedora container), but if anything starts failing with weird errors let us know.

StefanoSetti commented 3 years ago

Ok,I will

StefanoSetti commented 3 years ago

It works!