Building from source on centos7

Apologies if this is the wrong place for this.

I just wanted to share a solution to a problem I encountered today when trying to build pbspro from source on Centos7.

The make process failed with messages about failing to find mom_mach.h and

No rule to make target /mom_mach.c

On line 311 of the file

src/resmon/Makefile

I had to change

PBS_MACH = 

to

PBS_MACH = linux

I had already run ./configure and everything else worked fine so I don’t know why it failed to set this correctly.

1 Like

Thanks for letting us know. Could you please run buildutils/pbs_mach_type on your CentOS7 system and post the output?

It seems to be a permissions issue. buildutils/pbs_mach_type is not executable. Many other files are executable, such as buildutils/compile and buildutils/depcomp etc…

If I am in the buildutils directory as a normal user (not root) and type
./pbs_mach_type
I get
permission denied

If I type
sh ./pbs_mach_type
I get
linux
returned

Some other script files are not executable, such as pbs_mkdirs and ylwrap and makedepend-sh

They appear to be executable in my git-cloned development directory. How did you acquire the source files?

I downloaded the source code from github (https://github.com/PBSPro/pbspro) on 03 October 2018 by pressing the green button which says “clone or download”. That gave me a zip file called master.zip or something similar I think.
Is that the wrong way to get the code? Have I got the wrong version?
It seems to be working just fine now.

You didn’t do anything wrong. In fact, you pointed out something that (at least) I was unaware of. If you use git to clone the repository, the file permissions will be set properly. Using unzip will reset permission of files based on your current umask. According to a quick read of the unzip man page on my CentOS 7 system, I don’t see a way to preserve permissions on the files themselves. In this case, making buildutils/pbs_mach_type executable was a simple way to address your issue. Thanks for posting to the forum!

One note of caution… I see you downloaded a snapshot of the master branch. This is the bleeding edge development code that has not been subjected to formal testing by our QA team. If you’re looking for something that has been more thoroughly tested, I suggest you download one of our formally released versions here: https://github.com/PBSPro/pbspro/releases

I have verified that permissions are preserved if you download and extract the .tar.gz file for the 18.1.2 release.

1 Like

Thanks very much - I didn’t realise that I had the bleeding edge code. I will download the tar file for the stable version.