* [meta-oe][PATCH] php: fix opcache link error in 7.4 @ 2020-05-07 18:28 Claude Bing 2020-05-08 10:56 ` [oe] " Adrian Bunk 0 siblings, 1 reply; 7+ messages in thread From: Claude Bing @ 2020-05-07 18:28 UTC (permalink / raw) To: openembedded-devel Explicitly specifying -lrt is required for opcache to be linked against the proper dependencies. Additionally, PHP disables libdl when it detects a cross-compilation environment for some reason. In order to load any type of extension, re-enabling libdl is required. Signed-off-by: Claude Bing <cbing@cybernetics.com> --- meta-oe/recipes-devtools/php/php_7.4.4.bb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meta-oe/recipes-devtools/php/php_7.4.4.bb b/meta-oe/recipes-devtools/php/php_7.4.4.bb index 48149304c..68005c0bb 100644 --- a/meta-oe/recipes-devtools/php/php_7.4.4.bb +++ b/meta-oe/recipes-devtools/php/php_7.4.4.bb @@ -111,6 +111,17 @@ export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" +# link against librt (libc) if opcache is specified in order to avoid the +# following error: +# Failed loading /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined symbol: shm_unlink +LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }" + +# Adding these flags enables dynamic library support, which is disabled by +# default when cross compiling +# See https://bugs.php.net/bug.php?id=60109 +CFLAGS += " -DHAVE_LIBDL " +LDFLAGS += " -ldl " + EXTRA_OEMAKE = "INSTALL_ROOT=${D}" acpaths = "" -- 2.17.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] php: fix opcache link error in 7.4 2020-05-07 18:28 [meta-oe][PATCH] php: fix opcache link error in 7.4 Claude Bing @ 2020-05-08 10:56 ` Adrian Bunk 2020-05-08 14:42 ` Claude Bing 0 siblings, 1 reply; 7+ messages in thread From: Adrian Bunk @ 2020-05-08 10:56 UTC (permalink / raw) To: Claude Bing; +Cc: openembedded-devel On Thu, May 07, 2020 at 02:28:06PM -0400, Claude Bing wrote: > Explicitly specifying -lrt is required for opcache to be linked against > the proper dependencies. Additionally, PHP disables libdl when it > detects a cross-compilation environment for some reason. In order to > load any type of extension, re-enabling libdl is required. >... > +# link against librt (libc) if opcache is specified in order to avoid the > +# following error: > +# Failed loading /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined symbol: shm_unlink > +LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }" Is this actually a bug in 0001-opcache-config.m4-enable-opcache.patch and should instead be fixed there? - AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) - AC_MSG_RESULT([yes]) - PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) + AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) I would guess re-adding the PHP_CHECK_LIBRARY fixes your problem? > +# Adding these flags enables dynamic library support, which is disabled by > +# default when cross compiling > +# See https://bugs.php.net/bug.php?id=60109 > +CFLAGS += " -DHAVE_LIBDL " > +LDFLAGS += " -ldl " > + >... The linked PHP bug was closed in 2018 due to lack of feedback. cu Adrian ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] php: fix opcache link error in 7.4 2020-05-08 10:56 ` [oe] " Adrian Bunk @ 2020-05-08 14:42 ` Claude Bing 2020-05-08 18:41 ` Adrian Bunk 0 siblings, 1 reply; 7+ messages in thread From: Claude Bing @ 2020-05-08 14:42 UTC (permalink / raw) To: Adrian Bunk; +Cc: openembedded-devel On 5/8/20 6:56 AM, Adrian Bunk wrote: > On Thu, May 07, 2020 at 02:28:06PM -0400, Claude Bing wrote: >> Explicitly specifying -lrt is required for opcache to be linked against >> the proper dependencies. Additionally, PHP disables libdl when it >> detects a cross-compilation environment for some reason. In order to >> load any type of extension, re-enabling libdl is required. >> ... >> +# link against librt (libc) if opcache is specified in order to avoid the >> +# following error: >> +# Failed loading /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined symbol: shm_unlink >> +LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }" > > Is this actually a bug in 0001-opcache-config.m4-enable-opcache.patch > and should instead be fixed there? Yes, that does indeed fix the problem. Would you like me to reply to this thread with a new patch, or create a different thread? > > - AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) > - AC_MSG_RESULT([yes]) > - PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)]) > + AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) > > I would guess re-adding the PHP_CHECK_LIBRARY fixes your problem? > >> +# Adding these flags enables dynamic library support, which is disabled by >> +# default when cross compiling >> +# See https://bugs.php.net/bug.php?id=60109 >> +CFLAGS += " -DHAVE_LIBDL " >> +LDFLAGS += " -ldl " >> + >> ... > > The linked PHP bug was closed in 2018 due to lack of feedback. I have now added a comment to hopefully reopen the issue. > > cu > Adrian > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] php: fix opcache link error in 7.4 2020-05-08 14:42 ` Claude Bing @ 2020-05-08 18:41 ` Adrian Bunk 2020-05-08 21:27 ` Claude Bing 0 siblings, 1 reply; 7+ messages in thread From: Adrian Bunk @ 2020-05-08 18:41 UTC (permalink / raw) To: Claude Bing; +Cc: openembedded-devel On Fri, May 08, 2020 at 10:42:22AM -0400, Claude Bing wrote: > On 5/8/20 6:56 AM, Adrian Bunk wrote: > > On Thu, May 07, 2020 at 02:28:06PM -0400, Claude Bing wrote: > >> Explicitly specifying -lrt is required for opcache to be linked against > >> the proper dependencies. Additionally, PHP disables libdl when it > >> detects a cross-compilation environment for some reason. In order to > >> load any type of extension, re-enabling libdl is required. > >> ... > >> +# link against librt (libc) if opcache is specified in order to avoid the > >> +# following error: > >> +# Failed loading /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined symbol: shm_unlink > >> +LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }" > > > > Is this actually a bug in 0001-opcache-config.m4-enable-opcache.patch > > and should instead be fixed there? > > Yes, that does indeed fix the problem. Would you like me to reply to > this thread with a new patch, or create a different thread? >... Your original patch is already in master, please submit a new patch in a different thread that removes this workaround from php_7.4.4.bb and fixes 0001-opcache-config.m4-enable-opcache.patch. Thanks Adrian ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] php: fix opcache link error in 7.4 2020-05-08 18:41 ` Adrian Bunk @ 2020-05-08 21:27 ` Claude Bing 2020-05-09 18:54 ` Steve Sakoman 0 siblings, 1 reply; 7+ messages in thread From: Claude Bing @ 2020-05-08 21:27 UTC (permalink / raw) To: openembedded-devel OK, I started a new patch thread. Who/what determines which patches get included in the named release branches? Specifically, we are using dunfell and would like these changes to show up in that branch. :) Regards, Claude Bing On 5/8/20 2:41 PM, Adrian Bunk wrote: > On Fri, May 08, 2020 at 10:42:22AM -0400, Claude Bing wrote: >> On 5/8/20 6:56 AM, Adrian Bunk wrote: >>> On Thu, May 07, 2020 at 02:28:06PM -0400, Claude Bing wrote: >>>> Explicitly specifying -lrt is required for opcache to be linked against >>>> the proper dependencies. Additionally, PHP disables libdl when it >>>> detects a cross-compilation environment for some reason. In order to >>>> load any type of extension, re-enabling libdl is required. >>>> ... >>>> +# link against librt (libc) if opcache is specified in order to avoid the >>>> +# following error: >>>> +# Failed loading /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined symbol: shm_unlink >>>> +LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }" >>> >>> Is this actually a bug in 0001-opcache-config.m4-enable-opcache.patch >>> and should instead be fixed there? >> >> Yes, that does indeed fix the problem. Would you like me to reply to >> this thread with a new patch, or create a different thread? >> ... > > Your original patch is already in master, please submit a new patch in a > different thread that removes this workaround from php_7.4.4.bb and > fixes 0001-opcache-config.m4-enable-opcache.patch. > > Thanks > Adrian > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] php: fix opcache link error in 7.4 2020-05-08 21:27 ` Claude Bing @ 2020-05-09 18:54 ` Steve Sakoman 2020-05-11 14:32 ` Claude Bing 0 siblings, 1 reply; 7+ messages in thread From: Steve Sakoman @ 2020-05-09 18:54 UTC (permalink / raw) To: Claude Bing; +Cc: openembedded-devel Hi Claude, On Fri, May 8, 2020 at 11:26 AM Claude Bing <cbing@cybernetics.com> wrote: > > OK, I started a new patch thread. Who/what determines which patches get > included in the named release branches? Specifically, we are using > dunfell and would like these changes to show up in that branch. Just submit a patch to this list tagged with [dunfell]. In general though I won't take a patch unless it is already in master, so a patch for both master and dunfell should be tagged with [master][dunfell] If the issue is already fixed in master with a version bump, and a version bump in dunfell would be too dangerous (i.e. feature changes) then I'll take a patch to the current version in dunfell. Again, tag it with [dunfell] and also mention the commit in master that fixes the issue. Thanks, Steve > > :) > > Regards, > > Claude Bing > > On 5/8/20 2:41 PM, Adrian Bunk wrote: > > On Fri, May 08, 2020 at 10:42:22AM -0400, Claude Bing wrote: > >> On 5/8/20 6:56 AM, Adrian Bunk wrote: > >>> On Thu, May 07, 2020 at 02:28:06PM -0400, Claude Bing wrote: > >>>> Explicitly specifying -lrt is required for opcache to be linked against > >>>> the proper dependencies. Additionally, PHP disables libdl when it > >>>> detects a cross-compilation environment for some reason. In order to > >>>> load any type of extension, re-enabling libdl is required. > >>>> ... > >>>> +# link against librt (libc) if opcache is specified in order to avoid the > >>>> +# following error: > >>>> +# Failed loading /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined symbol: shm_unlink > >>>> +LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }" > >>> > >>> Is this actually a bug in 0001-opcache-config.m4-enable-opcache.patch > >>> and should instead be fixed there? > >> > >> Yes, that does indeed fix the problem. Would you like me to reply to > >> this thread with a new patch, or create a different thread? > >> ... > > > > Your original patch is already in master, please submit a new patch in a > > different thread that removes this workaround from php_7.4.4.bb and > > fixes 0001-opcache-config.m4-enable-opcache.patch. > > > > Thanks > > Adrian > > > > > > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [oe] [meta-oe][PATCH] php: fix opcache link error in 7.4 2020-05-09 18:54 ` Steve Sakoman @ 2020-05-11 14:32 ` Claude Bing 0 siblings, 0 replies; 7+ messages in thread From: Claude Bing @ 2020-05-11 14:32 UTC (permalink / raw) To: openembedded-devel The patch is already present in master, so I opted to send a patch rebased for dunfell. If there are any issues, please let me know. Regards, Claude Bing On 5/9/20 2:54 PM, Steve Sakoman wrote: > Hi Claude, > > On Fri, May 8, 2020 at 11:26 AM Claude Bing <cbing@cybernetics.com> wrote: >> >> OK, I started a new patch thread. Who/what determines which patches get >> included in the named release branches? Specifically, we are using >> dunfell and would like these changes to show up in that branch. > > Just submit a patch to this list tagged with [dunfell]. In general > though I won't take a patch unless it is already in master, so a patch > for both master and dunfell should be tagged with [master][dunfell] > > If the issue is already fixed in master with a version bump, and a > version bump in dunfell would be too dangerous (i.e. feature changes) > then I'll take a patch to the current version in dunfell. Again, tag > it with [dunfell] and also mention the commit in master that fixes the > issue. > > Thanks, > > Steve > >> >> :) >> >> Regards, >> >> Claude Bing >> >> On 5/8/20 2:41 PM, Adrian Bunk wrote: >>> On Fri, May 08, 2020 at 10:42:22AM -0400, Claude Bing wrote: >>>> On 5/8/20 6:56 AM, Adrian Bunk wrote: >>>>> On Thu, May 07, 2020 at 02:28:06PM -0400, Claude Bing wrote: >>>>>> Explicitly specifying -lrt is required for opcache to be linked against >>>>>> the proper dependencies. Additionally, PHP disables libdl when it >>>>>> detects a cross-compilation environment for some reason. In order to >>>>>> load any type of extension, re-enabling libdl is required. >>>>>> ... >>>>>> +# link against librt (libc) if opcache is specified in order to avoid the >>>>>> +# following error: >>>>>> +# Failed loading /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: /usr/lib/php7/extensions/no-debug-non-zts-20190902/opcache.so: undefined symbol: shm_unlink >>>>>> +LDFLAGS += "${@ " -lrt " if bb.utils.contains('PACKAGECONFIG', 'opcache', 'true', 'false', d) else "" }" >>>>> >>>>> Is this actually a bug in 0001-opcache-config.m4-enable-opcache.patch >>>>> and should instead be fixed there? >>>> >>>> Yes, that does indeed fix the problem. Would you like me to reply to >>>> this thread with a new patch, or create a different thread? >>>> ... >>> >>> Your original patch is already in master, please submit a new patch in a >>> different thread that removes this workaround from php_7.4.4.bb and >>> fixes 0001-opcache-config.m4-enable-opcache.patch. >>> >>> Thanks >>> Adrian >>> >>> >>> >>> >> >> >> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-11 14:32 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-05-07 18:28 [meta-oe][PATCH] php: fix opcache link error in 7.4 Claude Bing 2020-05-08 10:56 ` [oe] " Adrian Bunk 2020-05-08 14:42 ` Claude Bing 2020-05-08 18:41 ` Adrian Bunk 2020-05-08 21:27 ` Claude Bing 2020-05-09 18:54 ` Steve Sakoman 2020-05-11 14:32 ` Claude Bing
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.