Hello,
I really want to compile Asterisk on my FreeBSD 15 router, and make
outputs that the ‘_IO_stdin_used’ symbol is not defined.
I don’t understand what the _IO_stdin_used
symbol is, nor what a symbol is.
“make
” & “make NOISY_BUILD=yes
” output:
# make
gmake
gmake[1]: Entering directory '/root/asterisk/asterisk-21.2.0'
CC="cc" CXX="c++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" gmake -C menuselect CONFIGURE_SILENT="--silent" makeopts
gmake[2]: Entering directory '/root/asterisk/asterisk-21.2.0/menuselect'
gmake[2]: 'makeopts' is up to date.
gmake[2]: Leaving directory '/root/asterisk/asterisk-21.2.0/menuselect'
sed: 1: "s/#define\s+AST_BUILDOP ...": RE error: trailing backslash (\)
sed: 1: "s/#define\s+AST_BUILDOP ...": RE error: trailing backslash (\)
[LD] chan_audiosocket.o -> chan_audiosocket.so
ld: error: version script assignment of 'global' to symbol '_IO_stdin_used' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [/root/asterisk/asterisk-21.2.0/Makefile.rules:193: chan_audiosocket.so] Error 1
gmake[1]: *** [Makefile:396: channels] Error 2
gmake[1]: Leaving directory '/root/asterisk/asterisk-21.2.0'
*** Error code 2
# make NOISY_BUILD=yes
gmake
gmake[1]: Entering directory '/root/asterisk/asterisk-21.2.0'
CC="cc" CXX="c++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" gmake -C menuselect CONFIGURE_SILENT="--silent" makeopts
gmake[2]: Entering directory '/root/asterisk/asterisk-21.2.0/menuselect'
gmake[2]: 'makeopts' is up to date.
gmake[2]: Leaving directory '/root/asterisk/asterisk-21.2.0/menuselect'
sed: 1: "s/^\s+//g;s/\s+/ /g;s/\ ...": RE error: trailing backslash (\)
sed: 1: "s/^\s+//g;s/\s+/ /g;s/\ ...": RE error: trailing backslash (\)
sed: 1: "s/#define\s+AST_BUILDOP ...": RE error: trailing backslash (\)
sed: 1: "s/#define\s+AST_BUILDOP ...": RE error: trailing backslash (\)
gmake[2]: Entering directory '/root/asterisk/asterisk-21.2.0/utils'
gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory '/root/asterisk/asterisk-21.2.0/utils'
gmake[2]: Entering directory '/root/asterisk/asterisk-21.2.0/agi'
gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory '/root/asterisk/asterisk-21.2.0/agi'
gmake[2]: Entering directory '/root/asterisk/asterisk-21.2.0/contrib'
gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory '/root/asterisk/asterisk-21.2.0/contrib'
gmake[2]: Entering directory '/root/asterisk/asterisk-21.2.0/third-party'
gmake -C pjproject all
gmake[3]: Entering directory '/root/asterisk/asterisk-21.2.0/third-party/pjproject'
gmake[3]: Nothing to be done for 'all'.
gmake[3]: Leaving directory '/root/asterisk/asterisk-21.2.0/third-party/pjproject'
gmake[2]: Leaving directory '/root/asterisk/asterisk-21.2.0/third-party'
gmake[2]: Entering directory '/root/asterisk/asterisk-21.2.0/channels'
/root/asterisk/asterisk-21.2.0/build_tools/make_linker_version_script chan_audiosocket "" "/root/asterisk/asterisk-21.2.0"
cc -o chan_audiosocket.so -pthread -L/usr/local/lib -shared -Wl,--version-script,chan_audiosocket.exports,--warn-common chan_audiosocket.o -lpthread
ld: error: version script assignment of 'global' to symbol '_IO_stdin_used' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [/root/asterisk/asterisk-21.2.0/Makefile.rules:193: chan_audiosocket.so] Error 1
gmake[2]: Leaving directory '/root/asterisk/asterisk-21.2.0/channels'
gmake[1]: *** [Makefile:396: channels] Error 2
gmake[1]: Leaving directory '/root/asterisk/asterisk-21.2.0'
*** Error code 2
Stop.
make: stopped in /root/asterisk/asterisk-21.2.0
The result of searching “_IO_stdin_used
” references in the source directory:
# grep -rn '_IO_stdin_used'
./channels/chan_audiosocket.exports:5: _IO_stdin_used;
./default.exports:5: _IO_stdin_used;
./main/asterisk.exports.in:51: If _IO_stdin_used is not exported, stdout/stderr may not get
./main/asterisk.exports.in:62: > A build process that mangles the export of _IO_stdin_used is
./main/asterisk.exports.in:67: LINKER_SYMBOL_PREFIX_IO_stdin_used;
The general steps I followed:
download & extract asterisk source
pkg install wget
mkdir /root/asterisk
cd /root/asterisk
wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21.2.0.tar.gz
tar -xzvf asterisk-21.2.0.tar.gz
configure and dependencies
pkg install gmake e2fsprogs-libuuid jansson libxml2 lua54-lsqlite3
./configure --with-pjproject-bundled
install git & download the freebsd ports required to make menuselect
pkg install git
git clone https://git.FreeBSD.org/ports.git /usr/ports
make menuselect
make asterisk
make