Patch for 1.1beta3 configure script

61 views
Skip to first unread message

Rob

unread,
Feb 6, 2012, 4:29:37 PM2/6/12
to Asterisk G.729
In cases where you are forced to use the configure "--with-ipp"
option, compilation will fail due to internal configure script
variable $ipp_arch not getting set. Also, latest IPP 7.0 will not be
found automatically by the configure script due to Intel changing the
name of a directory in the package.

First, the version of IPP 7.0.6.273 will not properly configure even
when installed in the default location. The new default directory is
"/opt/intel/composer_xe_2011_sp1/ipp", so you might see:

# ./configure CFLAGS="-O0" --with-asterisk100 --enable-penryn
....
configure: error: IPP not found - use --with-ip=/path/to/ipp to
specify

Adding "--with-ipp=/opt/intel/composer_xe_2011_sp1/ipp" (the default
location for IPP 7.0.6.273), or using some other directory, will not
configure properly as $ipp_arch won't be set, leading to the improper
"-include" value of "/opt/intel/composer_xe_2011_sp1/ipp/tools//
staticlib/ipp_y8.h" (note the double slashes between "tools" and
"staticlib".

The patch below fixes these problems.

First, it ensures a default value for $ipp_arch. After that, an
addition directory check is added to see if v7.0 of IPP is installed.
Finally, the $ipp_arch value is modified to "intel64" if needed in
order to find the correct staticlib directory.

=================== BEGIN PATCH ========================
--- configure.orig 2012-02-06 21:06:05.000000000 +0000
+++ configure 2012-02-06 21:06:18.000000000 +0000
@@ -11916,27 +11916,30 @@
as_fn_error $? "compiler does not support -march=native, use
--enable-pentium/etc. to choose the core, or set CFLAGS" "$LINENO" 5
fi

+ case "$build_cpu" in
+ i?86)
+ ipp_arch=ia32;
+ ;;
+ x86_64|amd64)
+ ipp_arch=em64t;
+ ;;
+ esac;
if test -z "$ipp_root"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking location of
IPP libraries" >&5
$as_echo_n "checking location of IPP libraries... " >&6; }
with_ipp_to_override=" (use --with-ipp=/path/to/ipp to
override)"
- case "$build_cpu" in
- i?86)
- ipp_arch=ia32;
- ;;
- x86_64|amd64)
- ipp_arch=em64t;
- ;;
- esac;

# 7.0
ipp_dir="/opt/intel/composerxe-2011/ipp"
if test -d "$ipp_dir/"; then
- if test $ipp_arch = em64t; then
- ipp_arch=intel64
- fi
ipp_root="$ipp_dir"
ipp_ver=7.0
+ else
+ ipp_dir="/opt/intel/composer_xe_2011_sp1/ipp"
+ if test -d "$ipp_dir/"; then
+ ipp_root="$ipp_dir"
+ ipp_ver=7.0
+ fi
fi

if test -z "$ipp_root"; then
@@ -11974,6 +11977,9 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipp_ver"
>&5
$as_echo "$ipp_ver" >&6; }
fi
+ if test "$ipp_ver" = "7.0" -a "$ipp_arch" = "em64t"; then
+ ipp_arch=intel64
+ fi

case $ipp_core in
# Pentium3 a6 removed in IPP 6.0
--- configure.ac.orig 2012-02-06 20:53:17.000000000 +0000
+++ configure.ac 2012-02-06 21:03:52.000000000 +0000
@@ -209,26 +209,29 @@
AC_MSG_ERROR([compiler does not support -march=native, use --
enable-pentium/etc. to choose the core, or set CFLAGS])
fi

+ case "$build_cpu" in
+ i?86)
+ ipp_arch=ia32;
+ ;;
+ x86_64|amd64)
+ ipp_arch=em64t;
+ ;;
+ esac;
if test -z "$ipp_root"; then
AC_MSG_CHECKING([location of IPP libraries])
with_ipp_to_override=" (use --with-ipp=/path/to/ipp to
override)"
- case "$build_cpu" in
- i?86)
- ipp_arch=ia32;
- ;;
- x86_64|amd64)
- ipp_arch=em64t;
- ;;
- esac;

# 7.0
ipp_dir="/opt/intel/composerxe-2011/ipp"
if test -d "$ipp_dir/"; then
- if test $ipp_arch = em64t; then
- ipp_arch=intel64
- fi
ipp_root="$ipp_dir"
ipp_ver=7.0
+ else
+ ipp_dir="/opt/intel/composer_xe_2011_sp1/ipp"
+ if test -d "$ipp_dir/"; then
+ ipp_root="$ipp_dir"
+ ipp_ver=7.0
+ fi
fi

if test -z "$ipp_root"; then
@@ -263,6 +266,9 @@
ipp_ver=$(grep IPP_VERSION_STR "$ipp_root/include/
ippversion.h"|cut -d\ -f3|cut -c2-4)
AC_MSG_RESULT([$ipp_ver])
fi
+ if test "$ipp_ver" = "7.0" -a "$ipp_arch" = "em64t"; then
+ ipp_arch=intel64
+ fi

case $ipp_core in
# Pentium3 a6 removed in IPP 6.0
=================== END PATCH ========================

Arkadi Shishlov

unread,
Feb 8, 2012, 3:32:16 PM2/8/12
to asteri...@googlegroups.com
On Mon, Feb 6, 2012 at 11:29 PM, Rob <rgag...@gmail.com> wrote:
> In cases where you are forced to use the configure "--with-ipp"
> option, compilation will fail due to internal configure script
> variable $ipp_arch not getting set.

I believe I fixed the issue with
https://bitbucket.org/arkadi/asterisk-g72x/changeset/6599e6da26a3
If not - please re-open the issue.

> Also, latest IPP 7.0 will not be
> found automatically by the configure script due to Intel changing the
> name of a directory in the package.

About sp1 - it would be nice to perform a glob to find the best XE
version, like it is done for IPP 5/6.x.

Please use Bitbucket if you can.

Reply all
Reply to author
Forward
0 new messages