<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/84662>84662</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            `libunwind-18-dev` Package missing pkgconfig files
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          fennewald
      </td>
    </tr>
</table>

<pre>
    ## Summary

`libunwind-18-dev`, as installed from `deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main`, does not include any pkg-config files, even though `libunwind-dev`, which it replaces, does.

## Details
On Ubuntu 22.04 (Jammy), the mainline repos include a relatively old `libunwind-dev` package:
```
Package: libunwind-dev
Version: 1.3.2-2build2
Priority: optional
Section: libdevel
Source: libunwind
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Adrian Bunk <bunk@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 6127 kB
Provides: libunwind8-dev
Depends: libunwind8 (= 1.3.2-2build2), liblzma-dev
Conflicts: libunwind1-dev, libunwind7-dev
Replaces: libunwind8-dev (<< 1.1-3.2)
Homepage: http://www.nongnu.org/libunwind
Download-Size: 1882 kB
APT-Sources: http://us-east-1.ec2.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Description: library to determine the call-chain of a program - development
 The primary goal of this project is to define a portable and efficient C
 programming interface (API) to determine the call-chain of a program.
 The API additionally provides the means to manipulate the preserved
 (callee-saved) state of each call-frame and to resume execution at any
 point in the call-chain (non-local goto). The API supports both local
 (same-process) and remote (across-process) operation. As such, the API
 is useful in a number of applications.
 .
 This package includes the development support files.
```

The llvm project provides their own apt repositories for access to more recent versions(thank you for this! It's incredibly convenient). In those repositories, you will find `libunwind-18-dev`:
```
Package: libunwind-18-dev
Version: 1:18.1.1~++20240308111306+dba2a75e9c7e-1~exp1~20240308231321.67
Priority: optional
Section: libdevel
Source: llvm-toolchain-18
Maintainer: LLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Installed-Size: 394 kB
Provides: libunwind-dev, libunwind-x.y-dev
Depends: libunwind-18 (= 1:18.1.1~++20240308111306+dba2a75e9c7e-1~exp1~20240308231321.67)
Conflicts: libunwind-dev, libunwind-x.y-dev
Replaces: libunwind-dev, libunwind-x.y-dev
Homepage: https://www.llvm.org/
Download-Size: 110 kB
APT-Sources: http://apt.llvm.org/jammy llvm-toolchain-jammy-18/main amd64 Packages
Description: production-quality unwinder
 libunwind is a production-quality unwinder, with platform support for DWARF
 unwind info, SjLj, and ARM EHABI.
 .
 The low level libunwind API was designed to work either in-process (aka local)
 or to operate on another process (aka remote), but only the local path has
 been implemented. Remote unwinding remains as future work.
```

Noticeably, `libunwind-18-dev` specifies that is _replaces_ `libunwind-dev`. `libunwind-dev` includes within it several pkgconfig files:
```shell
$ apt-file list libunwind-dev | grep -P '\.pc$'
libunwind-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/libunwind-coredump.pc
libunwind-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/libunwind-generic.pc
libunwind-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/libunwind-ptrace.pc
libunwind-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/libunwind.pc
```

However, `libuwind-18-dev` _does not_:
```shell
$ dpkg -L libunwind-18-dev | grep -P '\.pc$'
$
```

This causes several applications configured using pkg-config to break when `libunwind-18-dev` is installed. `gstreamer-1.0` is a perfect example. On a Ubuntu 22.04 system with `libunwind-18-dev` and `libgstreamer-1.0` installed:
```shell
$ pkg-config --modversion gstreamer-1.0
1.20.3
$ pkg-config --cflags gstreamer-1.0
Package libunwind was not found in the pkg-config search path.
Perhaps you should add the directory containing `libunwind.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libunwind', required by 'gstreamer-1.0', not found
```

## Resolution

I believe it makes sense for llvm to begin distributing pkg-config files in the main repository. It is unclear to me if the `libunwind-18-dev` is meant to be a perfect drop-in replacement for `libunwind-dev`, or merely exists to provide developers convenient access to the tooling, and should not be expected to work exactly the same.

## Additional Notes

For context, `libunwind-18-dev` also neglects to define the `libunwind` man pages, which `libunwind-dev` does provide.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysWF9z27by_TT0yw45JKhI8oMfZLtu_PulrSfJ7X30gOSSRAwCLP5IVh_y2e8sSEqULTvtTGY6qkNgF4vF4pyz4NaKRiFeRR-uow-3F9y7VpurGpXCHZfVRaGr_VXE8ojl8MV3HTf7KL2N0s34u0ylKLzaCVXF2TqucBst04jdALcglHVcSqygNrqDaJlWWEDrXB_lm4jdReyO9y6Rctsl2jQRu_vGu24fsTugb7HTWpYtFyoO3-NsDR0Xalyg0mhBaQdCldJXCFztoX9q4lKrWjRQC4mWJuIWFbhW-6aFk3iPwe5aUbYgHBjsJS8HO1ogOdnskIZbdFxIO3z7Q8F_Cq-cB8aSdAERW__fsIlL8uFaDDFLoZCca3sMFwxK7sQW5R60rM7FBj0vn3iDlK8p3-N_4Z8Ph2E4NQ2jf6KxQisazZI8YTErvJAVG22N0Ea4PQ3r3gmtuBxGvmDpRjspigq3OA1ob8rT1cYsGNGIYDAkY_j6GxfKcaHQHEfgltzpHo2FKL_x4WMc1ogrYUtvbbRIpbDOJsNgUuouyn-ZL8RlfOp7UxnBFVx79UReC6-eogVVm-AqlNZkf-0bSwZUhPZQhYVvbCK5V2Xb8ypR6CJ2N6weJlxTLRW-GXzcT2UdfxF_h2wsM7aCp-spr3orKrQnaVofT-UWe1TVi2Gqmyi_fXFOQw1JUci_O370cKNVLUXpTn1kYcIwf_iyOpp8nur6VVDDyjdRfgNZksV5EpYNRh91h_1YXie3drfbJUqrRvnx3r4oh1u9U1LzY4Ky9ZodErR5-BoPlWRfefY2Rm5dnCVYsoSbshVbnBfCdC4wQQXdLuBdtVzAeBvslGdbGtHPKtlwswenoUKH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