# Source rpm check-rpaths

**URL:** <https://forums.percona.com/t/source-rpm-check-rpaths/15488>\
**Category:** Percona Server for MySQL 5.6\
**Created:** [April 30, 2022, 4:57pm UTC](https://forums.percona.com/t/source-rpm-check-rpaths/15488 "2022-04-30T16:57:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeffrey](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@Jeffrey](https://forums.percona.com/u/Jeffrey)\
**Post date:** [April 30, 2022, 4:57pm UTC](https://forums.percona.com/t/source-rpm-check-rpaths/15488/1 "2022-04-30T16:57:40Z")

</div>

Hi, this question is about RPM packaging for RHEL 8

I am aware of your beautiful repository, but I want to package PS for MySQL with a couple of changes for my personal use.

I downloaded the PS for MySQL 8.0.27 source RPM, as a test I tried to package it as-is with no changes to the spec file, using `--define "debug_package %{nil}" -bb ~/rpmbuild/SPECS/percona-server.spec` and I get a couple of errors:

1. I get a linker error with TokuDB - no problem, I don’t need TokuDB so I disabled it in the spec by editing the line `%{!?with_tokudb: %global tokudb 1}` to `%{!?with_tokudb: %global tokudb 0}`

2. Now I get this error

```auto
ERROR 0002: file '/usr/lib64/mysql/plugin/debug/group_replication.so' contains an invalid rpath '/home/jeffrey/rpmbuild/BUILD/percona-server-8.0.27-18/debug/library_output_directory' in [$ORIGIN/../../private:/home/jeffrey/rpmbuild/BUILD/percona-server-8.0.27-18/debug/library_output_directory:]
ERROR 0010: file '/usr/lib64/mysql/plugin/debug/group_replication.so' contains an empty rpath in [$ORIGIN/../../private:/home/jeffrey/rpmbuild/BUILD/percona-server-8.0.27-18/debug/library_output_directory:]
error: Bad exit status from /var/tmp/rpm-tmp.ez7uIg (%install)

```

Why do I get all these errors?

What should I do to get past them without destroying the runtime?

---

<div class="post-metadata">

**Author:** ![Evgeniy\_Patlan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/evgeniy_patlan/32/41_2.png) [@Evgeniy\_Patlan](https://forums.percona.com/u/Evgeniy_Patlan)\
**Post date:** [May 9, 2022, 4:06pm UTC](https://forums.percona.com/t/source-rpm-check-rpaths/15488/2 "2022-05-09T16:06:08Z")

</div>

I tried to reproduce your issue but without success.  
If you want to rebuild packages you can use information from our blogpost

> **[How to Build Percona Server for MySQL From Sources - Percona Database...](https://www.percona.com/blog/2021/03/10/how-to-build-percona-server-for-mysql-from-sources/)**
>
> We have received a number of questions about how to build Percona Server for MySQL from sources, so we wanted to give you some insight.
