FS#45842 - [staging/mbedtls] mising libraries

Attached to Project: Community Packages
Opened by Sergej Pupykin (sergej) - Thursday, 30 July 2015, 12:51 GMT
Last edited by Sergej Pupykin (sergej) - Tuesday, 22 September 2015, 14:42 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

libmbedcrypto.so.0 and libmbedx509.so.0 are missing in staging/mbedtls-2.0.0-1

Steps to reproduce:

try to build mediastreamer

you will get such errors:

...
/usr/lib/libmbedtls.so.10: undefined reference to `mbedtls_mutex_init'
...
This task depends upon

Closed by  Sergej Pupykin (sergej)
Tuesday, 22 September 2015, 14:42 GMT
Reason for closing:  Fixed
Comment by Kyle Keen (keenerd) - Thursday, 30 July 2015, 13:59 GMT
It appears there was a typo in the makefile. mbedtls-2.0.0-2 has all the so files now. However it does not fix the original 'undefined reference' linking errors.
Comment by Sergej Pupykin (sergej) - Thursday, 30 July 2015, 17:12 GMT
I guess you need to switch to cmake:

build() {
cd "$pkgname-$pkgver"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_PROGRAMS=ON \
-DENABLE_TESTING=ON \
-DENABLE_ZLIB_SUPPORT=ON \
-DINSTALL_MBEDTLS_HEADERS=ON \
-DLINK_WITH_PTHREAD=ON \
-DUSE_PKCS11_HELPER_LIBRARY=OFF \
-DUSE_SHARED_MBEDTLS_LIBRARY=ON \
-DUSE_STATIC_MBEDTLS_LIBRARY=ON
make
}

package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
mv $pkgdir/usr/bin/benchmark $pkgdir/usr/bin/$pkgname-benchmark
}
Comment by Sergej Pupykin (sergej) - Thursday, 30 July 2015, 17:15 GMT
however these 2 functions are not found even with cmake:

mbedtls_sha1_hmac
mbedtls_sha256_hmac

and I can grep them only in .h files
Comment by Kyle Keen (keenerd) - Sunday, 20 September 2015, 02:43 GMT
mbedtls 2.1.0 is now in staging and seems less buggy.

I think your linking problems are from the library splitting. "-lmbedtls" is not enough. "-lmbedtls -lmbedcrypto -lmbedx509" covers most things.
Comment by Kyle Keen (keenerd) - Sunday, 20 September 2015, 13:04 GMT
This is still being problematic, I've no idea what is wrong now.
Comment by Kyle Keen (keenerd) - Monday, 21 September 2015, 14:08 GMT
I contacted upstream:

"The last changes in the 2.0 version removed those functions and replaced them with the generic mbedtls_md_hmac function. Packages depending on them should use the new version instead."

So it sounds like bztrp needs patching. And there has been another bugfix for mbedtls, 2.1.1, uploaded.
Comment by Sergej Pupykin (sergej) - Monday, 21 September 2015, 19:26 GMT
I've patched it, will be updated soon.

Loading...