[Home]

Summary:ASTERISK-26930: pjproject/Makefile.rules for pjsip 2.6 build fails for non-SSE2 instrunction Linux
Reporter:abelbeck (abelbeck)Labels:
Date Opened:2017-04-08 06:52:24Date Closed:2017-04-27 11:47:14
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:13.15.0 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-26980 pjsip: Clean up WebRTC disables
Environment:AstLinux 1.2.xAttachments:
Description:George Joseph added this commit "pjproject_bundled: Update for pjproject 2.6"
http://git.asterisk.org/gitweb/?p=asterisk/asterisk.git;a=commit;h=9c05ddbdddb80d46a0621b519858b37d2e7c01fb

For pjsip 2.5.5 webrtc is disabled with --disable-webrtc

For pjsip 2.6 webrtc is disabled with --disable-libwebrtc

But, the referenced commit above instead uses --without-external-webrtc which uses the internal builtin webrtc source together with a config_site.h #define of PJMEDIA_HAS_WEBRTC_AEC 0 to roundabout disable webrtc.

The problem is pjsip's internal webrtc for Linux requires a SSE2 instruction set when compiling aec_core_sse2.c, so a i586 toolchain fails.

Proposed solution is to revert the commit above changes to files "third-party/pjproject/Makefile.rules" and "third-party/pjproject/patches/config_site.h" and then in "third-party/pjproject/Makefile.rules" change --disable-webrtc to --disable-libwebrtc .
Comments:By: Asterisk Team (asteriskteam) 2017-04-08 06:52:25.672-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: abelbeck (abelbeck) 2017-04-08 07:03:25.418-0500

Tested using --disable-libwebrtc with a i586 toolchain and pjsip 2.6 builds properly.  --without-external-webrtc was no longer used/needed .

FYI, the reported build error was as follows:
{noformat}
/home/dev/astlinux/1.0/output/host/usr/bin/i586-unknown-linux-gnu-gcc -c -Wall -DPJ_AUTOCONF=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os  -O2 -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-label -Wno-unused-function -Wno-strict-aliasing -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1 -fPIC -I/home/dev/astlinux/1.0/output/host/usr/i586-unknown-linux-gnu/sysroot/usr/include    -I. -I../../webrtc/src -I../../../pjlib/include -fexceptions -DWEBRTC_POSIX=1  \
-o output/libwebrtc-i586-pc-linux-gnu/modules/audio_processing/aec/aec_core_sse2.o \
../../webrtc/src/webrtc//modules/audio_processing/aec/aec_core_sse2.c
In file included from ../../webrtc/src/webrtc//modules/audio_processing/aec/aec_core_sse2.c:15:0:
/home/dev/astlinux/x-tools-1.20.0-3.2p1/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/4.8.3/include/emmintrin.h:31:3: error: #error "SSE2 instruction set not enabled"
# error "SSE2 instruction set not enabled"
  ^
../../webrtc/src/webrtc//modules/audio_processing/aec/aec_core_sse2.c: In function 'FilterFarSSE2':
../../webrtc/src/webrtc//modules/audio_processing/aec/aec_core_sse2.c:46:7: error: unknown type name '__m128'
      const __m128 xfBuf_re = _mm_loadu_ps(&aec->xfBuf[0][xPos + j]);
      ^
{noformat}


By: Friendly Automation (friendly-automation) 2017-04-27 11:47:15.746-0500

Change 5530 merged by Jenkins2:
pjproject_bundled:  Add --disable-libwebrtc to configure

[https://gerrit.asterisk.org/5530|https://gerrit.asterisk.org/5530]

By: Friendly Automation (friendly-automation) 2017-04-27 11:58:46.135-0500

Change 5531 merged by Jenkins2:
pjproject_bundled:  Add --disable-libwebrtc to configure

[https://gerrit.asterisk.org/5531|https://gerrit.asterisk.org/5531]

By: Friendly Automation (friendly-automation) 2017-04-27 11:58:54.878-0500

Change 5532 merged by Jenkins2:
pjproject_bundled:  Add --disable-libwebrtc to configure

[https://gerrit.asterisk.org/5532|https://gerrit.asterisk.org/5532]

By: abelbeck (abelbeck) 2017-04-27 12:03:35.354-0500

Additionally, there is related cleanup that can be done, as they are no longer needed:

In file "third-party/pjproject/patches/config_site.h" remove "#define PJMEDIA_HAS_WEBRTC_AEC 0"

In file "third-party/pjproject/Makefile.rules" remove "--without-external-webrtc"

By: Asterisk Team (asteriskteam) 2017-04-27 12:03:35.483-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Joshua C. Colp (jcolp) 2017-04-27 12:11:26.227-0500

The change itself is already merging in. If you'd like to submit some cleanup that would be welcome.

By: abelbeck (abelbeck) 2017-04-28 16:18:52.621-0500

To elaborate from what is in the Description above, additional cleanup that can be done:

1) Revert this commit: http://git.asterisk.org/gitweb/?p=asterisk/asterisk.git;a=blobdiff;f=third-party/pjproject/patches/config_site.h;h=a345734b0f8b3767638992b0cc0fb96bb974263e;hp=5e29cdb6aa43846e3318dd078667b431c40a066c;hb=9c05ddbdddb80d46a0621b519858b37d2e7c01fb;hpb=debaf377be3337cc9e3ca81a0c7b555eaa7f78ec

2) Remove {noformat}--without-external-webrtc{noformat} from "third-party/pjproject/Makefile.rules".

By: Joshua C. Colp (jcolp) 2017-05-03 14:22:15.179-0500

I've created ASTERISK-26980 for cleanup.