UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor bernzon
Visitor
240 Views
Registered: ‎10-11-2019

Edit configure command when adding php to Petalinux

Jump to solution

Hi,

I'm using php on my controller. Now I'm trying to work with shared memory and therefore need to enable shmop in php.

I can do this by adding the '--enable-shmop' option to the configure command when installing php.

Is there a way to edit the configure command when installing php in Petalinux?

 

This is the current output of the configure command when I call phpinfo(); on the controller. Unfortunatelly I have no idea how to edit this command:

'../php-7.1.9/configure' '--build=x86_64-linux' '--host=arm-xilinx-linux-gnueabi' '--target=arm-xilinx-linux-gnueabi' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/libexec' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/com' '--localstatedir=/var' '--libdir=/usr/lib' '--includedir=/usr/include' '--oldincludedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--disable-silent-rules' '--disable-dependency-tracking' '--with-libtool-sysroot=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot' '--enable-mbstring' '--enable-wddx' '--enable-fpm' '--enable-zip' '--with-libdir=lib' '--with-gettext=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/lib/..' '--with-zlib=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/lib/..' '--with-iconv=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/lib/..' '--with-mcrypt=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr' '--with-bz2=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr' '--with-config-file-path=/etc/php/apache2-php7' 'ac_cv_c_bigendian_php=no' '--enable-sockets' '--enable-pcntl' '--enable-shared' '--disable-opcache' '--disable-rpath' '--with-pic' '--libdir=/usr/lib/php7' '--disable-static' '--with-imap=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot' '--with-imap-ssl=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot' '--enable-ipv6' '--with-mysqli=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/bin/crossscripts/mysql_config' '--with-pdo-mysql=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/bin/crossscripts/mysql_config' '--without-pgsql' '--disable-soap' '--with-sqlite3=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/lib/..' '--with-pdo-sqlite=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/lib/..' '--enable-nls' 'build_alias=x86_64-linux' 'host_alias=arm-xilinx-linux-gnueabi' 'target_alias=arm-xilinx-linux-gnueabi' 'CC=arm-xilinx-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot' 'CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0=/usr/src/debug/php/7.1.9-r0 -fdebug-prefix-map=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot= -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/include/apache2' 'CPPFLAGS=' 'CPP=arm-xilinx-linux-gnueabi-gcc -E --sysroot=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9' 'PKG_CONFIG_PATH=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/lib/pkgconfig:/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot/usr/lib/pkgconfig' 'CXX=arm-xilinx-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot' 'CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0=/usr/src/debug/php/7.1.9-r0 -fdebug-prefix-map=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/c4l/Petalinux-Projects/WebServerPHP/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/php/7.1.9-r0/recipe-sysroot= -fvisibility-inlines-hidden'

 

Kind regards

Bernhard

 

Edit: added name of the option to set when installing php

Edit: added configure command output of phpinfo();

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor bernzon
Visitor
166 Views
Registered: ‎10-11-2019

Re: Edit configure command when adding php to Petalinux

Jump to solution

I found the solution.

In case anybody needs it, you need to modify the php.inc which in my case is located at:

PetalinuxSDK/components/yocto/source/arm/layers/meta-openembedded/meta-oe/recipes-devtools/php/

There under COMMON_EXTRA_OECONF I could add the '--enable-shmop' option.

 

Different Controllers or architectures may require editing a different php.inc

 

View solution in original post

2 Replies
Highlighted
Visitor bernzon
Visitor
167 Views
Registered: ‎10-11-2019

Re: Edit configure command when adding php to Petalinux

Jump to solution

I found the solution.

In case anybody needs it, you need to modify the php.inc which in my case is located at:

PetalinuxSDK/components/yocto/source/arm/layers/meta-openembedded/meta-oe/recipes-devtools/php/

There under COMMON_EXTRA_OECONF I could add the '--enable-shmop' option.

 

Different Controllers or architectures may require editing a different php.inc

 

View solution in original post

Moderator
Moderator
150 Views
Registered: ‎09-12-2007

Re: Edit configure command when adding php to Petalinux

Jump to solution

Thanks for getting back here. Can you mark your post as solved please?

0 Kudos