1

在为 Asterisk 1.8 构建 smsq 时,我遇到的第一个错误是missing pots.h. 我通过安装 libpopt-dev 解决了这个问题sudo apt-get install libpopt-dev。现在我得到

desktop:~/Development/asterisk/asterisk-1.8.22.0$ sudo make utils/smsq
gcc     utils/smsq.c   -o utils/smsq
/tmp/cc87NdXn.o: In function `main':
smsq.c:(.text+0x25fe): undefined reference to `poptHelpOptions'
smsq.c:(.text+0x2634): undefined reference to `poptGetContext'
smsq.c:(.text+0x2652): undefined reference to `poptSetOtherOptionHelp'
smsq.c:(.text+0x2661): undefined reference to `poptGetNextOpt'
smsq.c:(.text+0x2682): undefined reference to `poptStrerror'
smsq.c:(.text+0x269b): undefined reference to `poptBadOption'
smsq.c:(.text+0x294b): undefined reference to `poptPeekArg'
smsq.c:(.text+0x295e): undefined reference to `poptGetArg'
smsq.c:(.text+0x298a): undefined reference to `poptPeekArg'
smsq.c:(.text+0x299d): undefined reference to `poptGetArg'
smsq.c:(.text+0x2c9d): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2cb9): undefined reference to `poptGetArg'
smsq.c:(.text+0x2da1): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2dc5): undefined reference to `poptPeekArg'
smsq.c:(.text+0x2dd8): undefined reference to `poptGetArg'
collect2: ld returned 1 exit status
make: *** [utils/smsq] Error 1
4

1 回答 1

1

我想通了,以下步骤有所帮助。

make clean
./configure --with-bluetooth **note that bluetooth has nothing to do with this issue, I need it for chan_mobile**
sudo make
make menuconfig -> Utilities -> smsq enable it
sudo make install
cd utils **note do not use make utils/smsq, it wont work**
make smsq **its now built**
sudo cp smsq /usr/bin/asterisk/

基本上 menuconfig 没有启用 smsq 帽子 XXX,这表明 smsq 存在构建问题。我猜常识触发了构建星号将为 ld 设置对popt$$$$链接的 smsq 引用。在 make install 之前启用它也很有意义。

于 2013-06-12T13:45:30.200 回答