Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #10540 > unrolled thread
| Started by | Christoph Michael Becker <cmbecker69@arcor.de> |
|---|---|
| First post | 2013-08-17 00:16 +0200 |
| Last post | 2018-06-09 23:24 +0200 |
| Articles | 8 — 5 participants |
Back to article view | Back to comp.lang.php
Compiling PHP 5.x on Cygwin Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-17 00:16 +0200
Re: Compiling PHP 5.x on Cygwin Jerry Stuckle <jstucklex@attglobal.net> - 2013-08-16 22:48 -0400
Re: Compiling PHP 5.x on Cygwin Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-20 20:20 +0200
Re: Compiling PHP 5.x on Cygwin Jerry Stuckle <jstucklex@attglobal.net> - 2013-08-20 16:48 -0400
Re: Compiling PHP 5.x on Cygwin Christoph Michael Becker <cmbecker69@arcor.de> - 2013-08-24 00:08 +0200
Re: Compiling PHP 5.x on Cygwin glraul@gmail.com - 2018-06-05 05:16 -0700
Re: Compiling PHP 5.x on Cygwin "J.O. Aho" <user@example.net> - 2018-06-05 19:33 +0200
Re: Compiling PHP 5.x on Cygwin "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-06-09 23:24 +0200
| From | Christoph Michael Becker <cmbecker69@arcor.de> |
|---|---|
| Date | 2013-08-17 00:16 +0200 |
| Subject | Compiling PHP 5.x on Cygwin |
| Message-ID | <520ea4a1$0$6638$9b4e6d93@newsspool2.arcor-online.net> |
I have tried to compile PHP 5.5.1 and 5.5.2 on Cygwin[1], but the
default ./configure fails with:
| checking for known struct flock definition... configure: error: Don't
| know how to define struct flock on this system, set
| --enable-opcache=no
If I do "./config --enable-opcache=no" I'm able to build PHP, but I'd
rather build it with the opcache enabled. Any hints on how to
accomplish this are appreciated.
[1] $ uname -a
CYGWIN_NT-5.1 RELIANT 1.7.18(0.263/5/3) 2013-04-19 10:39 i686 Cygwin
--
Christoph M. Becker
[toc] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2013-08-16 22:48 -0400 |
| Message-ID | <kumoan$q0l$1@dont-email.me> |
| In reply to | #10540 |
On 8/16/2013 6:16 PM, Christoph Michael Becker wrote: > I have tried to compile PHP 5.5.1 and 5.5.2 on Cygwin[1], but the > default ./configure fails with: > > | checking for known struct flock definition... configure: error: Don't > | know how to define struct flock on this system, set > | --enable-opcache=no > > If I do "./config --enable-opcache=no" I'm able to build PHP, but I'd > rather build it with the opcache enabled. Any hints on how to > accomplish this are appreciated. > > [1] $ uname -a > CYGWIN_NT-5.1 RELIANT 1.7.18(0.263/5/3) 2013-04-19 10:39 i686 Cygwin > I suspect it's looking for struct flock in .../include/sys/fcntl.h. However, IIRC, in cygwin the definition is located in .../cygwin/include/cygwin/types.h. But beware - the last I looked, flock was still buggy in cygwin. I don't use cygwin here any more, so I can't test. However, I suspect you're going to have to modify your config file or, at the very least, force an include of the cygwin version of the file. You may also have to look into the header to see if you need a #define to get the struct included. But why try to get PHP working in cygwin? The Windows version of PHP works fine (as does Apache). Or, if you need Linux, load a real Linux distro (I use Debian but Ubuntu is also good, I hear) in a virtual box under Windows. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Christoph Michael Becker <cmbecker69@arcor.de> |
|---|---|
| Date | 2013-08-20 20:20 +0200 |
| Message-ID | <5213b351$0$6566$9b4e6d93@newsspool4.arcor-online.net> |
| In reply to | #10541 |
Jerry Stuckle wrote: > On 8/16/2013 6:16 PM, Christoph Michael Becker wrote: >> I have tried to compile PHP 5.5.1 and 5.5.2 on Cygwin[1], but the >> default ./configure fails with: >> >> | checking for known struct flock definition... configure: error: Don't >> | know how to define struct flock on this system, set >> | --enable-opcache=no >> >> If I do "./config --enable-opcache=no" I'm able to build PHP, but I'd >> rather build it with the opcache enabled. Any hints on how to >> accomplish this are appreciated. >> >> [1] $ uname -a >> CYGWIN_NT-5.1 RELIANT 1.7.18(0.263/5/3) 2013-04-19 10:39 i686 Cygwin >> > > I suspect it's looking for struct flock in .../include/sys/fcntl.h. > However, IIRC, in cygwin the definition is located in > .../cygwin/include/cygwin/types.h. But beware - the last I looked, > flock was still buggy in cygwin. > > I don't use cygwin here any more, so I can't test. However, I suspect > you're going to have to modify your config file or, at the very least, > force an include of the cygwin version of the file. You may also have > to look into the header to see if you need a #define to get the struct > included. Thanks, Jerry, that brought me a bit further. Indeed including <cygwin/types.h> in the config file made the general check for flock happy; the second check for the opcache additionally needed a || defined(__CYGWIN32__) to an #elif. After these modifications building was possible; however, I was not able to actually activate the opcache. The problem seems to be that PHP is building shared libraries with a .so extension on Cygwin, where this should be .dll.a. This also happens with the original ./configure and --enable-opcache=no. This is no problem for the PHP executable, which statically links in the default extensions, but not the opcache extension. Running "make test" produced failures for all tests, which might be related to the shared library issue. It seems to me PHP's Cygwin support has some flaws. I'm considering to file a bug report/feature request to improve that, even if I understand that supporting Cygwin has probably low priority for the PHP developers. > But why try to get PHP working in cygwin? The Windows version of PHP > works fine (as does Apache). Or, if you need Linux, load a real Linux > distro (I use Debian but Ubuntu is also good, I hear) in a virtual box > under Windows. I'm still stuck with Windows XP (I know, I should have already upgraded), so I can't run the native Windows build of PHP 5.5. But even after upgrading I would prefer being able to compile PHP in a Unix like environment. I would prefer using Cygwin over a virtual machine installation of a Linux system, as it is more lightweight and may suffice for my purposes. -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2013-08-20 16:48 -0400 |
| Message-ID | <kv0kno$l0b$1@dont-email.me> |
| In reply to | #10590 |
On 8/20/2013 2:20 PM, Christoph Michael Becker wrote: > Jerry Stuckle wrote: > >> On 8/16/2013 6:16 PM, Christoph Michael Becker wrote: >>> I have tried to compile PHP 5.5.1 and 5.5.2 on Cygwin[1], but the >>> default ./configure fails with: >>> >>> | checking for known struct flock definition... configure: error: Don't >>> | know how to define struct flock on this system, set >>> | --enable-opcache=no >>> >>> If I do "./config --enable-opcache=no" I'm able to build PHP, but I'd >>> rather build it with the opcache enabled. Any hints on how to >>> accomplish this are appreciated. >>> >>> [1] $ uname -a >>> CYGWIN_NT-5.1 RELIANT 1.7.18(0.263/5/3) 2013-04-19 10:39 i686 Cygwin >>> >> >> I suspect it's looking for struct flock in .../include/sys/fcntl.h. >> However, IIRC, in cygwin the definition is located in >> .../cygwin/include/cygwin/types.h. But beware - the last I looked, >> flock was still buggy in cygwin. >> >> I don't use cygwin here any more, so I can't test. However, I suspect >> you're going to have to modify your config file or, at the very least, >> force an include of the cygwin version of the file. You may also have >> to look into the header to see if you need a #define to get the struct >> included. > > Thanks, Jerry, that brought me a bit further. Indeed including > <cygwin/types.h> in the config file made the general check for flock > happy; the second check for the opcache additionally needed a || > defined(__CYGWIN32__) to an #elif. After these modifications building > was possible; however, I was not able to actually activate the opcache. > > The problem seems to be that PHP is building shared libraries with a .so > extension on Cygwin, where this should be .dll.a. This also happens > with the original ./configure and --enable-opcache=no. This is no > problem for the PHP executable, which statically links in the default > extensions, but not the opcache extension. Can you rename the libraries? Or maybe change the config script to generate the proper names? (I don't know - it's been too long since I used cygwin - and then not with PHP). > > Running "make test" produced failures for all tests, which might be > related to the shared library issue. It seems to me PHP's Cygwin > support has some flaws. I'm considering to file a bug report/feature > request to improve that, even if I understand that supporting Cygwin has > probably low priority for the PHP developers. > I doubt you'll get any help. Is there a version of PHP in the cygwin libraries (I don't know - it's been too long since I used cygwin, but IIRC there was one)? Maybe that will help get you on the right track. >> But why try to get PHP working in cygwin? The Windows version of PHP >> works fine (as does Apache). Or, if you need Linux, load a real Linux >> distro (I use Debian but Ubuntu is also good, I hear) in a virtual box >> under Windows. > > I'm still stuck with Windows XP (I know, I should have already > upgraded), so I can't run the native Windows build of PHP 5.5. But even > after upgrading I would prefer being able to compile PHP in a Unix like > environment. I would prefer using Cygwin over a virtual machine > installation of a Linux system, as it is more lightweight and may > suffice for my purposes. > Yup, XP is at EOL and pretty soon there won't be any further updates. I know it's a hassle - I still have a couple of programs which don't run under Windows 7 (even in emulation mode) so I have to use a Windows XP virtual box. A hassle. And yes, cygwin is more lightweight; if the overhead of a virtual box is a problem for you, than that's the way to go. Of course, you can get some pretty cheap laptops nowadays. Maybe it would be worth investing in one and just installing Linux on it :) Or if you don't need to move around, desktops are getting even cheaper :)) -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Christoph Michael Becker <cmbecker69@arcor.de> |
|---|---|
| Date | 2013-08-24 00:08 +0200 |
| Message-ID | <5217dd0e$0$9521$9b4e6d93@newsspool1.arcor-online.net> |
| In reply to | #10595 |
Jerry Stuckle wrote: > On 8/20/2013 2:20 PM, Christoph Michael Becker wrote: > >> Thanks, Jerry, that brought me a bit further. Indeed including >> <cygwin/types.h> in the config file made the general check for flock >> happy; the second check for the opcache additionally needed a || >> defined(__CYGWIN32__) to an #elif. After these modifications building >> was possible; however, I was not able to actually activate the opcache. >> >> The problem seems to be that PHP is building shared libraries with a .so >> extension on Cygwin, where this should be .dll.a. This also happens >> with the original ./configure and --enable-opcache=no. This is no >> problem for the PHP executable, which statically links in the default >> extensions, but not the opcache extension. > > Can you rename the libraries? Or maybe change the config script to > generate the proper names? (I don't know - it's been too long since I > used cygwin - and then not with PHP). Renaming the libraries would not help--there all just < 1 KB in size. Changing the config script (or the Makefile) might work, but some quick tests were not successful. I guess it's best to postpone further work until some more basic issues are resolved (see below). >> Running "make test" produced failures for all tests, which might be >> related to the shared library issue. It seems to me PHP's Cygwin >> support has some flaws. I'm considering to file a bug report/feature >> request to improve that, even if I understand that supporting Cygwin has >> probably low priority for the PHP developers. >> > > I doubt you'll get any help. Is there a version of PHP in the cygwin > libraries (I don't know - it's been too long since I used cygwin, but > IIRC there was one)? Maybe that will help get you on the right track. Unfortunately there's no PHP available via the regular Cygwin distribution. However, the Cygwin ports project[1] offers a PHP package--but only 5.4.19 (there really fast anyway, as this was released only several hours ago). Regarding the failing tests I had filed a bug report[2], and due to the quick feedback of the PHP devs (what pleasantly surprised me) I made some progress here. I'll see where that goes. >> I'm still stuck with Windows XP (I know, I should have already >> upgraded), so I can't run the native Windows build of PHP 5.5. But even >> after upgrading I would prefer being able to compile PHP in a Unix like >> environment. I would prefer using Cygwin over a virtual machine >> installation of a Linux system, as it is more lightweight and may >> suffice for my purposes. >> > > Yup, XP is at EOL and pretty soon there won't be any further updates. I > know it's a hassle - I still have a couple of programs which don't run > under Windows 7 (even in emulation mode) so I have to use a Windows XP > virtual box. A hassle. > > And yes, cygwin is more lightweight; if the overhead of a virtual box is > a problem for you, than that's the way to go. > > Of course, you can get some pretty cheap laptops nowadays. Maybe it > would be worth investing in one and just installing Linux on it :) > > Or if you don't need to move around, desktops are getting even cheaper :)) That's an option to consider, if I can't manage to get extensions relying on shared libraries working on Cygwin. Thanks for your help. :) [1] <http://cygwinports.org/> [2] <https://bugs.php.net/bug.php?id=65497> -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | glraul@gmail.com |
|---|---|
| Date | 2018-06-05 05:16 -0700 |
| Message-ID | <809d27ab-b6ef-48dc-b9c3-a5d6ae4263b4@googlegroups.com> |
| In reply to | #10540 |
Hi install automake from cygwin libraries, run wget and run automake Am Freitag, 16. August 2013 19:16:38 UTC-3 schrieb Christoph Michael Becker: > I have tried to compile PHP 5.5.1 and 5.5.2 on Cygwin[1], but the > default ./configure fails with: > > | checking for known struct flock definition... configure: error: Don't > | know how to define struct flock on this system, set > | --enable-opcache=no > > If I do "./config --enable-opcache=no" I'm able to build PHP, but I'd > rather build it with the opcache enabled. Any hints on how to > accomplish this are appreciated. > > [1] $ uname -a > CYGWIN_NT-5.1 RELIANT 1.7.18(0.263/5/3) 2013-04-19 10:39 i686 Cygwin > > -- > Christoph M. Becker Hi
[toc] | [prev] | [next] | [standalone]
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Date | 2018-06-05 19:33 +0200 |
| Message-ID | <fnnvqpFm1d5U1@mid.individual.net> |
| In reply to | #17772 |
On 05/06/18 14:16, glraul@gmail.com wrote: > Am Freitag, 16. August 2013 19:16:38 UTC-3 schrieb Christoph Michael Becker: I'm sure Mr Becker is happy for reply, he been waiting for almost 5 years for your reply, never leaving the computer. >> I have tried to compile PHP 5.5.1 and 5.5.2 on Cygwin[1], but the >> default ./configure fails with: >> >> | checking for known struct flock definition... configure: error: Don't >> | know how to define struct flock on this system, set >> | --enable-opcache=no >> >> If I do "./config --enable-opcache=no" I'm able to build PHP, but I'd >> rather build it with the opcache enabled. Any hints on how to >> accomplish this are appreciated. > > Hi install automake from cygwin libraries, run wget and run automake I would bet more on that the issue was that he hadn't installed opcache. Your wget will not do anything at all. -- //Aho
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2018-06-09 23:24 +0200 |
| Message-ID | <pfhgi8$s2l$1@solani.org> |
| In reply to | #17773 |
On 05.06.2018 at 19:33, J.O. Aho wrote: > On 05/06/18 14:16, glraul@gmail.com wrote: > >> Am Freitag, 16. August 2013 19:16:38 UTC-3 schrieb Christoph Michael Becker: > > I'm sure Mr Becker is happy for reply, he been waiting for almost 5 > years for your reply, never leaving the computer. Well, not exactly. ;) >>> I have tried to compile PHP 5.5.1 and 5.5.2 on Cygwin[1], but the >>> default ./configure fails with: >>> >>> | checking for known struct flock definition... configure: error: Don't >>> | know how to define struct flock on this system, set >>> | --enable-opcache=no >>> >>> If I do "./config --enable-opcache=no" I'm able to build PHP, but I'd >>> rather build it with the opcache enabled. Any hints on how to >>> accomplish this are appreciated. >> >> Hi install automake from cygwin libraries, run wget and run automake > > I would bet more on that the issue was that he hadn't installed opcache. > Your wget will not do anything at all. Indeed, I had not installed OpCache, because I've failed to compile it. However, installing and running automake *might* have solved the issue. I'm not going to verify that, though, because since a long time I'm eithger compiling PHP using the native Windows toolchain or runnin a Linux VM. Thanks anyway! -- Christoph M. Becker
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web