Return -DPIC with `pkg-config --cflags alsa` when appropriate

オープン
#289 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
22/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
c, linux

調査の方向性

The problem is in include/global.h near line 72, where the snd_dlsym_start requirement depends on whether PIC is defined. Read that block first, then find where alsa's pkg-config cflags are produced. Done means a settled rule for when -DPIC is emitted, a change that does this, and a check that the cflags output includes it. The open question is whether this should be the default or opt-in, so confirm that with maintainers before coding.

索引モデルが issue の本文から書いたものです。

説明

Some build systems (we are using bazel) do not define -DPIC when compiling position independent objects.

When building a alsa module, if PIC is not defined, global.h requires the presence of the snd_dlsym_start symbol, which is absent from libasound.so if alsa itself is built with -DPIC.

https://github.com/alsa-project/alsa-lib/blob/9447e57d7c1602a861635487ca56c452f3472965/include/global.h#L72

If the PIC macro is non-standard I would suggest exposing it via pkg-config so position independent alsa modules can pick up the flag and apply it to the alsa headers appropriately.

主要言語
C
スター
501
フォーク
227
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

alsa-project/alsa-lib のほかの issue

alsa-project/alsa-lib の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。