Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
On Sep 18, 2019, at 8:29 PM, Bishop Bettini wrote: > would you be willing to transfer your knowledge to our documentation? Absolutely! And thank you. I am traveling this week so I can't start until next week, but email me off list and we can coordinate? -Mike
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
On Wed, Sep 18, 2019 at 7:31 PM Mike Schinkel wrote: > > ... I tried to get PHP compiled and working locally, and I failed > miserably. I decided I would participate on the list for a while and maybe > after some time I could ask for help getting it compiled on my Mac and in a > Docker container. > > > Anyone interested in doing this? > > > > I would be very willing to do this, assuming I can get a screenshare or > two from someone to get unstuck when I get stuck, or at least get a > response from private messages or email about those sticking points. > The OSS Fuzz project uses an Ubuntu-based Dockerfile[1] with a custom build.sh[2] script to produce a bare-bones PHP install. This may serve as an inspiration. That said, I regularly build PHP on MacOS locally and in CentOS containers and am happy to help unstick. > Also, I think it would be really good to have someone who does not already > know how to get it working to write the documentations, vs. someone who has > known how for so long they have forgotten what questions newbies would have. > Once you're up & running Mike, would you be willing to transfer your knowledge to our documentation? [1]:https://github.com/google/oss-fuzz/blob/master/projects/php/Dockerfile [2]:https://github.com/google/oss-fuzz/blob/master/projects/php/build.sh
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
Hi Nikita, I am really happy to read your email. As you may have noticed I recently started participating on this list. About that time I tried to get PHP compiled and working locally, and I failed miserably. I decided I would participate on the list for a while and maybe after some time I could ask for help getting it compiled on my Mac and in a Docker container. > Anyone interested in doing this? > I would be very willing to do this, assuming I can get a screenshare or two from someone to get unstuck when I get stuck, or at least get a response from private messages or email about those sticking points. Also, I think it would be really good to have someone who does not already know how to get it working to write the documentations, vs. someone who has known how for so long they have forgotten what questions newbies would have. -Mike > On Sep 15, 2019 at 2:49 PM, mailto:nikita@gmail.com>> > wrote: > > Hi, > > > > Our build instructions in > > https://github.com/php/php-src#building-php-source-code are currently a bit > > bare... they show the basic "./buildconf && ./configure && make" cycle, but > > everyone who actually tries this will quickly find out that there is a lot > > more to building PHP... > > > > Every time I compile PHP on a new system, I have to go through a pretty > > long cycle of ./configure --xxx, wait until there is an error, "sudo apt > > install libxxx-dev" and so on. > > > > It would be great if someone could write up the required "apt get" and > > "./configure" line to get a "reasonably large" build of PHP on a popular > > Linux distro like Ubuntu 18.04, so this can be included in the README. > > Something similar for MacOS would probably also be useful, where things are > > even more complicated. > > > > Bonus points for also including how to set up MySQL and Postgres in a way > > that you can run mysqli/pdo_mysql and pgsql/pdo_pgsql tests. I think I lose > > a couple of hours every time I try to get this working. > > > > Anyone interested in doing this? > > > > Regards, > > Nikita >
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
Den 2019-09-15 kl. 20:49, skrev Nikita Popov: Hi, Our build instructions in https://github.com/php/php-src#building-php-source-code are currently a bit bare... they show the basic "./buildconf && ./configure && make" cycle, but everyone who actually tries this will quickly find out that there is a lot more to building PHP... Every time I compile PHP on a new system, I have to go through a pretty long cycle of ./configure --xxx, wait until there is an error, "sudo apt install libxxx-dev" and so on. It would be great if someone could write up the required "apt get" and "./configure" line to get a "reasonably large" build of PHP on a popular Linux distro like Ubuntu 18.04, so this can be included in the README. Something similar for MacOS would probably also be useful, where things are even more complicated. Bonus points for also including how to set up MySQL and Postgres in a way that you can run mysqli/pdo_mysql and pgsql/pdo_pgsql tests. I think I lose a couple of hours every time I try to get this working. Anyone interested in doing this? Regards, Nikita Hi, If it's not done already I could take a swing a bit later in early October for a Centos 7.7 distro. r//Björn L -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
Not super familiar with building PHP, but this should be a reasonable starting point, tested on a fresh install of Ubuntu 18.04.3: apt install -y autoconf gcc bison re2c libxml2-dev libssl-dev libsqlite3-dev libcurl4-openssl-dev libpng-dev libwebp-dev libjpeg-dev vflib3-dev libc-client-dev libkrb5-dev libonig-dev libreadline-dev libsodium-dev libargon2-0-dev libzip-dev ./buildconf ./configure --enable-fpm --with-openssl --with-kerberos --with-imap-ssl --with-pcre-jit --with-zlib --enable-bcmath --with-curl --enable-exif --enable-ftp --enable-gd --with-webp --with-jpeg --with-freetype --with-gettext --with-imap --enable-intl --enable-mbstring --with-mysqli --enable-pcntl --with-pdo-mysql --with-readline --enable-sockets --with-sodium --with-password-argon2 --with-zip --enable-zts On 15.09.2019 20:49, Nikita Popov wrote: > Hi, > > Our build instructions in > https://github.com/php/php-src#building-php-source-code are currently a bit > bare... they show the basic "./buildconf && ./configure && make" cycle, but > everyone who actually tries this will quickly find out that there is a lot > more to building PHP... > > Every time I compile PHP on a new system, I have to go through a pretty > long cycle of ./configure --xxx, wait until there is an error, "sudo apt > install libxxx-dev" and so on. > > It would be great if someone could write up the required "apt get" and > "./configure" line to get a "reasonably large" build of PHP on a popular > Linux distro like Ubuntu 18.04, so this can be included in the README. > Something similar for MacOS would probably also be useful, where things are > even more complicated. > > Bonus points for also including how to set up MySQL and Postgres in a way > that you can run mysqli/pdo_mysql and pgsql/pdo_pgsql tests. I think I lose > a couple of hours every time I try to get this working. > > Anyone interested in doing this? > > Regards, > Nikita >
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
On 15/09/2019 21:53, Gabriel Caruso wrote: The main problem with Docker and php-src is that we need to touch the OS in order to make sure the new features and bugfixes will be compatible. What in particular needs to be adjusted at OS level to make testing work? If there's a list we can probably find a way around it, at least when running containerised. Are you referring to installing shared libraries on the host? -- Mark Randall -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
On 15-09-19 22:53, Gabriel Caruso wrote: > > > The main problem with Docker and php-src is that we need to touch the OS in > order to make sure the new features and bugfixes will be compatible. > > Docker create a layer on top of that, right? > Correct. Honestly I was not considering the use case of testing interactions with OS-specific features as one might do using a CI/CD setup. Providing instructions that will work for every supported target environment is not an easy thing to do. I was thinking about the use case of local development where the developer needs to build the sources on whatever OS he / she happens to be using. Then, Docker makes much more sense as it provides a single consistent environment that will work the same way for anyone. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
Hi! > May I suggest to provide instructions to build using Docker? This has a > number of advantages: > > * Same instructions will work on Linux, MacOS and Windows > * No need to install build dependencies on your host > * Spin up a MySQL container by running 'docker run mysql:version' This is certainly a good idea to have Docker build instructions as an option, but would not be good as the only or primary option. There are lots of situations where installing the whole docket setup on a host is either hard or an overkill for just building PHP. But as an option it's good. > I took this route a while ago when I needed to setup a dev environment > and it works nicely. I could do a write-up of this route if desired. I think having good docker-based build instructions would certainly be appreciated. > Part of the instructions could be cast into a Docker image that can be > published on Github and Docker Hub. This image could even have the > command to run the tests baked into the image itself. Then, anyone can > just run > > docker run php-tests:7.4 > > to build the sources and run the tests. For development you can mount > your local git clone in the container. Sounds like a nice idea. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
Hello Dik On Sun, Sep 15, 2019, 22:42 Dik Takken wrote: > On 15-09-19 20:49, Nikita Popov wrote: > > > > Anyone interested in doing this? > > > > Hi Nikita, > > May I suggest to provide instructions to build using Docker? This has a > number of advantages: > > * Same instructions will work on Linux, MacOS and Windows > * No need to install build dependencies on your host > * Spin up a MySQL container by running 'docker run mysql:version' > > I took this route a while ago when I needed to setup a dev environment > and it works nicely. I could do a write-up of this route if desired. > > Part of the instructions could be cast into a Docker image that can be > published on Github and Docker Hub. This image could even have the > command to run the tests baked into the image itself. Then, anyone can > just run > > docker run php-tests:7.4 > > to build the sources and run the tests. For development you can mount > your local git clone in the container. > > Regards, > Dik Takken > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php The main problem with Docker and php-src is that we need to touch the OS in order to make sure the new features and bugfixes will be compatible. Docker create a layer on top of that, right? Best regards, > >
Re: [PHP-DEV] Build instructions for Ubuntu 18.04 (and other systems)
On 15-09-19 20:49, Nikita Popov wrote: > > Anyone interested in doing this? > Hi Nikita, May I suggest to provide instructions to build using Docker? This has a number of advantages: * Same instructions will work on Linux, MacOS and Windows * No need to install build dependencies on your host * Spin up a MySQL container by running 'docker run mysql:version' I took this route a while ago when I needed to setup a dev environment and it works nicely. I could do a write-up of this route if desired. Part of the instructions could be cast into a Docker image that can be published on Github and Docker Hub. This image could even have the command to run the tests baked into the image itself. Then, anyone can just run docker run php-tests:7.4 to build the sources and run the tests. For development you can mount your local git clone in the container. Regards, Dik Takken -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php