OpenSIPS version you are running
n/a, as OpenSIPs won't compile to completion. Instead, here's the output of git describe
Describe the bug
When trying to compile OpenSIPs v3.6.7 from source with make menuconfig -> 'Compile and Install OpenSIPs', I'll get the following errors during compilation:
pt_load.c: In function ‘register_processes_load_stats’:
pt_load.c:390:51: error: expected expression before ‘;’ token
390 | load_proc_grp = register_stats_group("proc_load");
| ^
pt_load.c:395:56: error: expected expression before ‘;’ token
395 | load_proc_1m_grp = register_stats_group("proc_load1m");
| ^
pt_load.c:400:58: error: expected expression before ‘;’ token
400 | load_proc_10m_grp = register_stats_group("proc_load10m");
| ^
pt_load.c:414:21: warning: implicit declaration of function ‘build_stat_name’ [-Wimplicit-function-declaration]
414 | if ( (stat_name = build_stat_name( &stat_prefix, pno_s)) == 0 ||
| ^~~~~~~~~~~~~~~
pt_load.c:414:19: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
414 | if ( (stat_name = build_stat_name( &stat_prefix, pno_s)) == 0 ||
| ^
pt_load.c:415:3: warning: implicit declaration of function ‘register_stat2’; did you mean ‘register_stat’? [-Wimplicit-function-declaration]
415 | register_stat2( "load", stat_name, (stat_var**)pt_get_rt_proc_load,
| ^~~~~~~~~~~~~~
| register_stat
pt_load.c:428:19: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
428 | if ( (stat_name = build_stat_name( &stat_prefix, pno_s)) == 0 ||
| ^
pt_load.c:442:19: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
442 | if ( (stat_name = build_stat_name( &stat_prefix, pno_s)) == 0 ||
| ^
pt_load.c:385:6: warning: variable ‘name’ set but not used [-Wunused-but-set-variable]
385 | str name;
| ^~~~
make[1]: *** [Makefile.rules:28: pt_load.o] Error 1
make[1]: Leaving directory '/home/opensips/src/opensips-3.6'
after which the compiler exits. The following modules are included via make menuconfig:
cachedb_redis
db_mysql
dialplan
regex
json
httpd
mi_xmlrpc_ng
proto_tls
rest_client
tls_openssl
tls_mgm
tls_wolfssl
xml
uuid
I'm not familiar enough with C and its compilers to judge if this is a code issue or a compiler issue.
However, here's the output of gcc- v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14+deb12u1' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Debian 12.2.0-14+deb12u1)
and also the output of lsb_release -a:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
To Reproduce
git clone https://github.com/OpenSIPS/opensips.git --recursive -b 3.6 opensips-3.6 (which cloned 3.6.7-45-gbccc5a6f71)
make menuconfig with the above modules included
- 'Compile And Install OpenSIPS'
- Error occurs during compilation
Expected behavior
For OpenSIPs to compile successfully.
Relevant System Logs
See above.
OS/environment information
- Operating System: Debian 12 (also tried on Debian 10, 11 and 13)
- OpenSIPS installation:
3.6.7-45-gbccc5a6f71
- other relevant information:
gcc version 12.2.0 (Debian 12.2.0-14+deb12u1)
apt update & apt upgrade were done
- machine was rebooted
- machine was fresh install
OpenSIPS version you are running
n/a, as OpenSIPs won't compile to completion. Instead, here's the output of
git describeDescribe the bug
When trying to compile OpenSIPs v3.6.7 from source with
make menuconfig-> 'Compile and Install OpenSIPs', I'll get the following errors during compilation:after which the compiler exits. The following modules are included via
make menuconfig:cachedb_redisdb_mysqldialplanregexjsonhttpdmi_xmlrpc_ngproto_tlsrest_clienttls_openssltls_mgmtls_wolfsslxmluuidI'm not familiar enough with C and its compilers to judge if this is a code issue or a compiler issue.
However, here's the output of
gcc- v:and also the output of
lsb_release -a:To Reproduce
git clone https://github.com/OpenSIPS/opensips.git --recursive -b 3.6 opensips-3.6(which cloned3.6.7-45-gbccc5a6f71)make menuconfigwith the above modules includedExpected behavior
For OpenSIPs to compile successfully.
Relevant System Logs
See above.
OS/environment information
3.6.7-45-gbccc5a6f71gcc version 12.2.0 (Debian 12.2.0-14+deb12u1)apt update&apt upgradewere done