This is a translation of the original English documentation page. Help us make it better.

1 コンパイルの問題

これらは、ソースからのZabbixコンパイルに関する既知の問題です。他のすべてのケースについては、既知の問題を参照してください。

HP-UXでのZabbixエージェントのコンパイル

HP-UXパッケージサイトhttp://hpux.connect.org.ukからPCREライブラリをインストールする場合(例えばpcre-8.42-ia64_64-11.31.depotから)、64bit版のライブラリのみが/usr/local/lib/hpux64ディレクトリにインストールされます。

この場合、エージェントのコンパイルを成功させるためには、以下のようにconfigureスクリプトのオプションをカスタマイズする必要があります。

CFLAGS="+DD64" ./configure --enable-agent --with-libpcre-include=/usr/local/include --with-libpcre-lib=/usr/local/lib/hpux64

非標準の場所にあるライブラリ

Zabbixは標準以外の場所にあるライブラリを指定できます。以下の例では、Zabbixは指定された非標準の場所からcurl-configを実行し、その出力を使用して、使用する正しいlibcurlを決定します。

$ ./configure --enable-server --with-mysql --with-libcurl=/usr/local/bin/curl-config

これは、システムにインストールされている唯一のlibcurlである場合に機能しますが、たとえば、パッケージマネージャーによって標準の場所に別のlibcurlがインストールされている場合は機能しません。これは、Zabbixに新しいバージョンのライブラリと他のアプリケーションに古いバージョンが必要な場合で起きます。

したがって、非標準の場所でコンポーネントを指定すると、同じコンポーネントが標準の場所に存在する場合、常に機能するとは限りません。

たとえば、libcurlパッケージがまだインストールされている状態で/usr/localに新しくインストールされたlibcurlを使用する場合、zabbixは間違ったものをピックアップしてコンパイルが失敗する可能性があります。

usr/bin/ld: ../../src/libs/zbxhttp/libzbxhttp.a(http.o): in function 'zbx_http_convert_to_utf8':
       /tmp/zabbix-master/src/libs/zbxhttp/http.c:957: undefined reference to 'curl_easy_header'
       collect2: error: ld returned 1 exit status

ここで、関数curl_easy_header()は古い/usr/lib/x86_64-linux-gnu/libcurl.soでは利用できませんが、新しい/usr/local/lib/libcurl.soでは利用可能です。

問題はリンカーフラグの順序にあり、1つの解決策は、LDFLAGS変数のライブラリへのフルパスを指定することです。

$ LDFLAGS="-Wl,--no-as-needed /usr/local/lib/libcurl.so" ./configure --enable-server --with-mysql --with-libcurl=/usr/local/bin/curl-config

一部のシステムでは-Wl,--no-as-neededオプションが必要かもしれないことに注意してください(参照: debianベースシステムのデフォルトリンクオプション)。

Stack size too small on some systems

If Zabbix crashes or freezes due to stack overflows, you can increase the per-thread stack size using the --with-stacksize option when configuring the sources. This issue may occur on systems with low default thread stack limits, especially during preprocessing, where multiple threads are created.

The following example sets the stack size to 512 KB per thread:

./configure --enable-server --with-mysql --with-stacksize=512

You can check the system thread stack limits at runtime using the ulimit -s command on Linux-based systems.