OSC / ood-images

14 stars 8 forks source link

No acceptable C compiler found in $PATH #21

Open jeremyfix opened 3 years ago

jeremyfix commented 3 years ago

Hi

and thank you for providing these vagrant files for testing open ondemand; With vagrant-with-slurm, I did experience issues when trying to bring up the two machines. Both for vagrant up head and vagrant up ood, I ended up with a trace similar in the two cases to :

   [...]
    ood: checking for cc... no
    ood: checking for cl.exe... no
    ood: configure: error: in `/tmp/slurm-20.02.3':
    ood: configure: error: no acceptable C compiler found in $PATH
    ood: See `config.log' for more details
    ood: + make
    ood: make: *** No targets specified and no makefile found.  Stop.
    ood: + make install
    ood: make: *** No rule to make target `install'.  Stop.
    ood: + mkdir /opt/slurm/etc
    ood: mkdir: cannot create directory ‘/opt/slurm/etc’: No such file or directory
    ood: + install -D -m644 etc/slurmctld.service /opt/slurm/etc/
    ood: install: target ‘/opt/slurm/etc/’ is not a directory: No such file or directory
    ood: + install -D -m644 etc/slurmd.service /opt/slurm/etc/
    ood: install: target ‘/opt/slurm/etc/’ is not a directory: No such file or directory
    ood: + systemctl daemon-reload
    ood: + cp etc/cgroup.conf.example /opt/slurm/etc/cgroup.conf
    ood: cp: cannot create regular file ‘/opt/slurm/etc/cgroup.conf’: No such file or directory
    ood: + cp -r '/opt/slurm/*' /vagrant/slurm/
    ood: cp: cannot stat ‘/opt/slurm/*’: No such file or directory
    [...]

For both VMs, I "solved" it by adding a shell provisioning :

ood.vm.provision "shell", inline: <<-SHELL
  yum groupinstall -y "Development Tools"
SHELL
head.vm.provision "shell", inline: <<-SHELL
  yum groupinstall -y "Development Tools"
SHELL

After adding these lines and running vagrant up head --provision and vagrant up ood --provision, it works like a charm and I can access OOD from my host;

johrstrom commented 3 years ago

Thanks for the issue! Looks like we should add gcc here. Pull requests welcome!

https://github.com/OSC/ood-images/blob/5852106bfcc8c7798b368528c773c7d3d41bd38d/common/slurm-setup.sh#L33