# Error when building package

**URL:** <https://community.ipfire.org/t/error-when-building-package/1643>\
**Category:** Add-Ons\
**Created:** [20 March 2020 17:44 UTC](https://community.ipfire.org/t/error-when-building-package/1643 "2020-03-20T17:44:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sklammer](https://community.ipfire.org/user_avatar/community.ipfire.org/sklammer/32/233_2.png) [@sklammer](https://community.ipfire.org/u/sklammer)\
**Post date:** [20 March 2020 17:44 UTC](https://community.ipfire.org/t/error-when-building-package/1643/1 "2020-03-20T17:44:31Z")

</div>

Hey guys,

i don’t know if the topic is right in this place. I wanted to get in touch to the IPFire build environment. I wanted to start with something small what i know it worked so I tried to recreate the packages google-authenticator-libpam and libqrencode mentioned in this topic [OpenVPN OTP Authentication](https://community.ipfire.org/t/openvpn-otp-authentication/1463/16)

I used the following buildfiles:

> **[ummeegge / google-authenticator-openvpn](https://gitlab.com/ummeegge/google-authenticator-openvpn)**
>
> google-authenticator-pam for OpenVPN on IPFire platform

And the sources from here:

> **[fukuchi/libqrencode](https://github.com/fukuchi/libqrencode/releases)**
>
> A fast and compact QR Code encoding library. Contribute to fukuchi/libqrencode development by creating an account on GitHub.

The google-authenticator package works without any problems but the libqrencode package fails everytime with the following error:

```
+ cd /usr/src/lfs
+ make -f libqrencode LFS_BASEDIR=/usr/src dist
make: *** No rule to make target 'dist'. Stop.

ERROR: Packaging libqrencode [FAIL]
Check /root/ipfire-2.x/log/_build.packages.log for errors if applicable 

```

The error occurs when building the packages. Building IPFire succeeds without any problems. Building the and installing the package manually in the chroot environment (via parameter **shell** ) works as well. Does anyone have a hint what I’m missing?

Thank you

Greetings

Steffen

---

<div class="post-metadata">

**Author:** ![ummeegge](https://community.ipfire.org/user_avatar/community.ipfire.org/ummeegge/32/16602_2.png) [@ummeegge](https://community.ipfire.org/u/ummeegge)\
**Post date:** [21 March 2020 08:19 UTC](https://community.ipfire.org/t/error-when-building-package/1643/2 "2020-03-21T08:19:54Z")

</div>

Hi Steffen,  
this repo provides the building files but not the also needed make.sh entries. Did you entered a line for libqrencode in make.sh ? Can be checked with e.g.:  
`grep 'libqrencode' log/_build.ipfire.log`

As another idea, delete the libqrencode ROOTFILE from \*_/ipfire-2.x/conf/rootfiles/packages_ and make a clean build e.g.:

```bash
rm /conf/rootfiles/packages/libqrencode
./make.sh clean
./make.sh build

```

the build system will create then the ROOTFILE for libqrencode on his own which you can find after the build has been finished under \*_/ipfire-2.x/log/libqrencode-4.0.0_, move it to \*_/ipfire-2.x/conf/rootfiles/packages_, comment the unwanted files, delete the ‘+’ from those files which you want (in my case only  
usr/bin/qrencode  
usr/lib/libqrencode.so.4  
usr/lib/libqrencode.so.4.0.0  
) , rename the ROOTFILE from _libqrencode-4.0.0_ to _libqrencode_. You do not need to build then IPFire again clean, the trick is delete only the libqrencode files from \*_/ipfire-2.x/log_ (there should then be two since there is also the missing file) and rebuild it again with a  
`./make.sh build`

Did build it with a Core 141 environment but will pull origin/next this weekend and will build it again then.

As a first idea. May this helps.

Best,

Erik

---

<div class="post-metadata">

**Author:** ![sklammer](https://community.ipfire.org/user_avatar/community.ipfire.org/sklammer/32/233_2.png) [@sklammer](https://community.ipfire.org/u/sklammer)\
**Post date:** [21 March 2020 12:55 UTC](https://community.ipfire.org/t/error-when-building-package/1643/3 "2020-03-21T12:55:35Z")

</div>

Hey Erik,

yes I added the line in the make.sh. When I create my own ROOTFILE the error occurs as well.

Greetings

Steffen

---

<div class="post-metadata">

**Author:** ![ummeegge](https://community.ipfire.org/user_avatar/community.ipfire.org/ummeegge/32/16602_2.png) [@ummeegge](https://community.ipfire.org/u/ummeegge)\
**Post date:** [22 March 2020 07:08 UTC](https://community.ipfire.org/t/error-when-building-package/1643/4 "2020-03-22T07:08:27Z")

</div>

Hi Steffen,  
please check then the ‘dist:’ line and the next one in the libqrencode LFS file. It needs to be exact in this format (with SPACE and TAB).

```bash
dist:<SPACE>
<TAB>@$(PAK)

```

–\> [https://gitlab.com/ummeegge/google-authenticator-openvpn/-/blob/master/build\_files/LFS/libqrencode#L57](https://gitlab.com/ummeegge/google-authenticator-openvpn/-/blob/master/build_files/LFS/libqrencode#L57)

May this helps.

Best,

Erik

---

<div class="post-metadata">

**Author:** ![sklammer](https://community.ipfire.org/user_avatar/community.ipfire.org/sklammer/32/233_2.png) [@sklammer](https://community.ipfire.org/u/sklammer)\
**Post date:** [22 March 2020 17:27 UTC](https://community.ipfire.org/t/error-when-building-package/1643/5 "2020-03-22T17:27:54Z")

</div>

Hey Erik,

I cheked the file and I seemed to have the space after the dist: during editing. Now everything works fine. Thanks for your help 🙂

Greetings

Steffen
