How to Build PBS Professional OSS version on Fedora 24

Fedora 24, released in June 2016, is not supported by the commercial PBS Professional (of course) and it is messy, so I tried and succeeded the build and the installation of PBS Professional OSS version.

Environment

An innovative platform for hardware, clouds, and containers, built with love by you.
An HPC workload manager and job scheduler for desktops, clusters, and clouds. - GitHub - openpbs/openpbs: An HPC workload manager and job scheduler for desktops...

Build and Install steps

  1. Install the prerequisite packages for building PBS Professional

    $ sudo dnf install -y gcc make rpm-build libtool hwloc-devel libX11-devel libXt-devel libedit-devel libical-devel ncurses-devel perl postgresql-devel python-devel tcl-devel tk-devel swig expat-devel openssl-devel libXext libXft
    
  2. Install the prerequisite packages to run PBS Professional

    $ sudo dnf install -y expat libedit postgresql-server python sendmail sudo tcl tk libical
    
  3. Clone the source code from the GitHub repository and change directory there

  4. Modify m4/with_libical.m4 and src/lib/Libutil/pbs_ical.c, as libical seems to be modified/updated from the target environment

    • As the path of ical.h has been changed add it to m4/with_libical.m4

      $ git diff master -- m4/with_libical.m4
      diff --git a/m4/with_libical.m4 b/m4/with_libical.m4
      index dc14512..6e1e25f 100644
      --- a/m4/with_libical.m4
      +++ b/m4/with_libical.m4
      @@ -50,6 +50,8 @@ AC_DEFUN([PBS_AC_WITH_LIBICAL],
         AS_IF([test -r "$libical_dir/include/ical.h"],
           AS_IF([test "$libical_dir" != "/usr"],
             [libical_inc="-I$libical_dir/include"]),
      +    [test -r "$libical_dir/include/libical/ical.h"],
      +    [libical_inc="-I$libical_dir/include/libical"],
           AC_MSG_ERROR([libical headers not found.]))
         AS_IF([test "$libical_dir" = "/usr"],
           # Using system installed libical
      
    • As a variant named icalerror_errors_are_fatal has not been defined in the headers define it as a local variable in the functions

      $ git diff master -- src/lib/Libutil/pbs_ical.c
      diff --git a/src/lib/Libutil/pbs_ical.c b/src/lib/Libutil/pbs_ical.c
      index 948ebc5..e72ca79 100644
      --- a/src/lib/Libutil/pbs_ical.c
      +++ b/src/lib/Libutil/pbs_ical.c
      @@ -100,6 +100,8 @@ get_num_occurrences(char *rrule, time_t dtstart, char *tz)
              time_t date_limit;
              int num_resv = 0;
      
      +       int  icalerror_errors_are_fatal;
      +
              /* if any of the argument is NULL, we are dealing with
               * advance reservation, so return 1 occurrence */
              if (rrule == NULL || tz == NULL)
      @@ -179,6 +181,8 @@ get_occurrence(char *rrule, time_t dtstart, char *tz, int idx)
              int i;
              time_t next_occr = dtstart;
      
      +       int  icalerror_errors_are_fatal;
      +
              if (rrule == NULL)
                      return dtstart;
      
      @@ -269,6 +273,8 @@ check_rrule(char *rrule, time_t dtstart, time_t dtend, char *tz, int *err_code)
              long tmp_occr_duration = 0;
              long duration;
      
      +       int  icalerror_errors_are_fatal;
      +
              *err_code = 0;
              icalerror_clear_errno();
      
  5. Run autoreconf, as autoconf and automake packages on Fedora 24 are newer than the target environment

  6. Build and install

    $ ./configure --prefix=/opt/pbs
    $ make
    $ sudo make install
    
  7. Post install operation

    $ sudo /opt/pbs/libexec/pbs_postinstall
    $ sudo vi /etc/pbs.conf
    $ sudo chmod 4755 /opt/pbs/sbin/pbs_iff /opt/pbs/sbin/pbs_rcp
    $ service pbs start
    
%d人のブロガーが「いいね」をつけました。