Re: GDC CI

2020-09-09 Thread wjoe via D.gnu

On Tuesday, 8 September 2020 at 23:48:58 UTC, wjoe wrote:

On Tuesday, 8 September 2020 at 20:12:47 UTC, wjoe wrote:
On Tuesday, 8 September 2020 at 20:03:03 UTC, Iain Buclaw 
wrote:

On Tuesday, 8 September 2020 at 16:44:39 UTC, wjoe wrote:

[...]


Well the ci script in the repo [1] should be used as a 
baseline, if not in its entirety as it's been used on enough 
to work in many environments, whether building a native or 
cross compiler.


At the very least, you just need to set-up the environment() 
using whatever variables Cirrus provides and it'll just go 
and run.


[...]


Except there's a problem with the installation of gcc-9. 
Apparently there's no Debian release providing a gcc-9 package.




This issue is resolved.


Re: GDC CI

2020-09-09 Thread wjoe via D.gnu

Small update.

I managed to install gcc-9 and g++-9 from the ubuntu toolchain 
ppa in the Docker container [1] and it's successfully built.

I instructed Cirrus CI to clone the repository like so
git clone --branch=master-ci --depth=1 
https://github.com/W-joe/gcc /tmp/cirrus-ci-build
and it reaches the configure stage in the buildci [2] script, 
however it fails like so:


./buildci.sh setup
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed


  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
100 2327k  100 2327k0 0  1961k  0  0:00:01  0:00:01 
--:--:-- 1959k
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed


  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
  1 1249k1 138800 0  24139  0  0:00:52 --:--:--  
0:00:52 24097
100 1249k  100 1249k0 0  1620k  0 --:--:-- --:--:-- 
--:--:-- 1618k
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed


  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
 37  654k   37  242k0 0   263k  0  0:00:02 --:--:--  
0:00:02  263k
100  654k  100  654k0 0   642k  0  0:00:01  0:00:01 
--:--:--  642k
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed


  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
100 1619k  100 1619k0 0  2221k  0 --:--:-- --:--:-- 
--:--:-- 2221k

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... no
checking for mawk... mawk
checking for libatomic support... yes
checking for libvtv support... yes
checking for libhsail-rt support... yes
checking for libphobos support... yes
checking for x86_64-linux-gnu-gcc... gcc-9
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc-9 accepts -g... yes
checking for gcc-9 option to accept ISO C89... none needed

checking whether we are using the GNU C++ compiler... no

checking whether g++-9 accepts -g... no
checking whether g++ accepts -static-libstdc++ -static-libgcc... 
no

checking for x86_64-linux-gnu-gnatbind... no
checking for gnatbind... no
checking for x86_64-linux-gnu-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp 
--ignore-initial=16 $$f1 $$f2

checking whether g++-9 supports C++11 features by default... no
checking whether g++-9 supports C++11 features with 
-std=gnu++11... no
checking whether g++-9 supports C++11 features with 
-std=gnu++0x... no
checking whether g++-9 supports C++11 features with -std=c++11... 
no
checking whether g++-9 supports C++11 features with +std=c++11... 
no
checking whether g++-9 supports C++11 features with -h 
std=c++11... no
checking whether g++-9 supports C++11 features with -std=c++0x... 
no
checking whether g++-9 supports C++11 features with +std=c++0x... 
no
checking whether g++-9 supports C++11 features with -h 
std=c++0x... no
configure: error: *** A compiler with support for C++11 
language features is required.


It says that it's not using the GNU C++ compiler, why is that ?
Also, shouldn't g++-9 support C++11 ?

I suspect that maybe the compiler wasn't properly installed in 
the container ?


[1] https://github.com/w-joe/gcc/blob/master-ci/Dockerfile
[2] https://github.com/w-joe/gcc/blob/master-ci/buildci.sh


Re: GDC CI

2020-09-09 Thread Iain Buclaw via D.gnu

On Tuesday, 8 September 2020 at 23:48:58 UTC, wjoe wrote:

On Tuesday, 8 September 2020 at 20:12:47 UTC, wjoe wrote:

[...]


Except there's a problem with the installation of gcc-9. 
Apparently there's no Debian release providing a gcc-9 package.


The build of the container fails in step 4 on apt-get update 
with:



[...]


When I let buildci.sh install the repositories instead it fails 
like so:



[...]


This bug seems to be related 
https://bugs.launchpad.net/ubuntu/+source/wget/+bug/994097


Is there a strict dependency on Debian?


Doesn't seem related, though the PPA is meant for Ubuntu 
distributions, not Debian.  The problem might be in 
incompatibilities between the two.


Re: GDC CI

2020-09-09 Thread wjoe via D.gnu

On Wednesday, 9 September 2020 at 11:22:14 UTC, Iain Buclaw wrote:

On Tuesday, 8 September 2020 at 23:48:58 UTC, wjoe wrote:

On Tuesday, 8 September 2020 at 20:12:47 UTC, wjoe wrote:

[...]


Except there's a problem with the installation of gcc-9. 
Apparently there's no Debian release providing a gcc-9 package.


The build of the container fails in step 4 on apt-get update 
with:



[...]


When I let buildci.sh install the repositories instead it 
fails like so:



[...]


This bug seems to be related 
https://bugs.launchpad.net/ubuntu/+source/wget/+bug/994097


Is there a strict dependency on Debian?


Doesn't seem related, though the PPA is meant for Ubuntu 
distributions, not Debian.  The problem might be in 
incompatibilities between the two.


No, it's not. The issue seems to be that add-apt-repository adds 
a source for the current Ubuntu version which is groovy which 
doesn't provide a Release file. Some such. It works when I take 
the ppa from Ubuntu bionic.


Anyways, I managed to install gcc-9 and g++-9 from the ubuntu 
toolchain ppa in the Docker container [1] and it builds 
successfully.

I instructed Cirrus CI to clone the repository like so
git clone --branch=master-ci --depth=1 
https://github.com/W-joe/gcc /tmp/cirrus-ci-build
and it reaches the configure stage in the buildci [2] script, 
however it fails.


It says that it's not using the GNU C++ compiler, why is that ?
Also, shouldn't g++-9 support C++11 ?

I suspect that maybe the compiler wasn't properly installed in 
the container ?


This is the log:

./buildci.sh setup
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed


  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
100 2327k  100 2327k0 0  1961k  0  0:00:01  0:00:01 
--:--:-- 1959k
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed


  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
  1 1249k1 138800 0  24139  0  0:00:52 --:--:--  
0:00:52 24097
100 1249k  100 1249k0 0  1620k  0 --:--:-- --:--:-- 
--:--:-- 1618k
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed


  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
 37  654k   37  242k0 0   263k  0  0:00:02 --:--:--  
0:00:02  263k
100  654k  100  654k0 0   642k  0  0:00:01  0:00:01 
--:--:--  642k
  % Total% Received % Xferd  Average Speed   TimeTime 
Time  Current
 Dload  Upload   Total   Spent
Left  Speed


  0 00 00 0  0  0 --:--:-- --:--:-- 
--:--:-- 0
100 1619k  100 1619k0 0  2221k  0 --:--:-- --:--:-- 
--:--:-- 2221k

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... no
checking for mawk... mawk
checking for libatomic support... yes
checking for libvtv support... yes
checking for libhsail-rt support... yes
checking for libphobos support... yes
checking for x86_64-linux-gnu-gcc... gcc-9
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc-9 accepts -g... yes
checking for gcc-9 option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... no
checking whether g++-9 accepts -g... no
checking whether g++ accepts -static-libstdc++ -static-libgcc... 
no

checking for x86_64-linux-gnu-gnatbind... no
checking for gnatbind... no
checking for x86_64-linux-gnu-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp 
--ignore-initial=16 $$f1 $$f2

checking whether g++-9 supports C++11 features by default... no
checking whether g++-9 supports C++11 features with 
-std=gnu++11... no
checking whether g++-9 supports C++11 features with 
-std=gnu++0x... no
checking whether g++-9 supports C++11 features with -std=c++11... 
no
checking whether g++-9 supports C++11 features with +std=c++11... 
no
checking whether g++-9 supports C++11 features with -h 
std=c++11... no
checking whether g++-9 supports C++11 features with -std

Re: GDC CI

2020-09-09 Thread kinke via D.gnu

On Wednesday, 9 September 2020 at 11:33:22 UTC, wjoe wrote:
I suspect that maybe the compiler wasn't properly installed in 
the container ?


Maybe just a typo in your Dockerfile? You're installing `g++9`, 
but the package name is `g++-9`.


Re: GDC CI

2020-09-09 Thread wjoe via D.gnu

On Wednesday, 9 September 2020 at 12:13:32 UTC, kinke wrote:

On Wednesday, 9 September 2020 at 11:33:22 UTC, wjoe wrote:
I suspect that maybe the compiler wasn't properly installed in 
the container ?


Maybe just a typo in your Dockerfile? You're installing `g++9`, 
but the package name is `g++-9`.


Ahh good catch! It works now! Thanks :)


Re: GDC CI

2020-09-09 Thread wjoe via D.gnu

On Wednesday, 9 September 2020 at 12:37:37 UTC, wjoe wrote:

On Wednesday, 9 September 2020 at 12:13:32 UTC, kinke wrote:

On Wednesday, 9 September 2020 at 11:33:22 UTC, wjoe wrote:
I suspect that maybe the compiler wasn't properly installed 
in the container ?


Maybe just a typo in your Dockerfile? You're installing 
`g++9`, but the package name is `g++-9`.


Ahh good catch! It works now! Thanks :)


The build as well as the unittests finished successfully.
The entire run took close to 70  minutes. This was a linux 
container with 4 CPUs and 10G RAM.


Which files should be kept once the task completed and what 
should happen with them ?

On success I could add a package task.

Next up is to test if Cirrus CI can handle the remaining 
platforms since the limits are lower than for linux containers. 
Unit tests almost hit the 9G RAM mark. Mac is a single core VM on 
community cluster.


Cron jobs aren't specified in the configuration file but in the 
Cirrus app setting on GitHub.




Re: GDC CI

2020-09-09 Thread Iain Buclaw via D.gnu

On Wednesday, 9 September 2020 at 18:32:07 UTC, wjoe wrote:

On Wednesday, 9 September 2020 at 12:37:37 UTC, wjoe wrote:

On Wednesday, 9 September 2020 at 12:13:32 UTC, kinke wrote:

On Wednesday, 9 September 2020 at 11:33:22 UTC, wjoe wrote:
I suspect that maybe the compiler wasn't properly installed 
in the container ?


Maybe just a typo in your Dockerfile? You're installing 
`g++9`, but the package name is `g++-9`.


Ahh good catch! It works now! Thanks :)


The build as well as the unittests finished successfully.
The entire run took close to 70  minutes. This was a linux 
container with 4 CPUs and 10G RAM.




Sounds about right.  There are a couple heavy modules that 
instantiate tens of thousands of functions when building phobos 
unittests.


Which files should be kept once the task completed and what 
should happen with them ?

On success I could add a package task.



There's 'make install'.  I probably wouldn't prune anything 
copied during that recipe, as you'll lose integration with C, C++ 
and LTO compilers if any of those components are missing.


Next up is to test if Cirrus CI can handle the remaining 
platforms since the limits are lower than for linux containers. 
Unit tests almost hit the 9G RAM mark. Mac is a single core VM 
on community cluster.




You'll need to implement DSO handling on Darwin, there's a little 
bit of compiler support code, and the rest is in the library.  
I've got a patch somewhere with maybe 90% of the work done.  From 
what I recall there was some weirdness with how dynamic loading 
works.