NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Installation of pacemaker pcs

We are working on making a high availability cluster of two IC-3120 which run our Labview-software.
We want to do this using pacemaker and pcs.

Pacemaker is installed from source using this guide:

https://github.com/ClusterLabs/pacemaker/blob/master/INSTALL.md

We are then trying to install pcs from source using this guide:
https://github.com/ClusterLabs/pcs

Here we get the following error (snippet from console output):

 

Installing ffi 1.9.25 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/lib/ruby/gems/2.4.0/gems/ffi-1.9.25/ext/ffi_c
/usr/bin/ruby -I /usr/lib/ruby/site_ruby/2.4.0 -r ./siteconf20190802-6161-pvoxla.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/$(RUBY_BASE_NAME)
        --with-ffi_c-dir
        --without-ffi_c-dir
        --with-ffi_c-include
        --without-ffi_c-include=${ffi_c-dir}/include
        --with-ffi_c-lib
        --without-ffi_c-lib=${ffi_c-dir}/lib
        --with-libffi-config
        --without-libffi-config
        --with-pkg-config
        --without-pkg-config
/usr/lib/ruby/2.4.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from /usr/lib/ruby/2.4.0/mkmf.rb:542:in `try_link0'
        from /usr/lib/ruby/2.4.0/mkmf.rb:557:in `try_link'
        from /usr/lib/ruby/2.4.0/mkmf.rb:658:in `try_ldflags'
        from /usr/lib/ruby/2.4.0/mkmf.rb:1818:in `pkg_config'
        from extconf.rb:15:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.9.25/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/lib/ruby/gems/2.4.0/gems/ffi-1.9.25 for inspection.
Results logged to /usr/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/ffi-1.9.25/gem_make.out

An error occurred while installing ffi (1.9.25), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.25' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  ethon was resolved to 0.11.0, which depends on
    ffi
make[1]: *** [Makefile:32: get_gems] Error 5
make[1]: Leaving directory '/git/pcs/pcs-0.10.2/pcsd'
make: *** [Makefile:237: install] Error 2

 

The mkmf.log:

"pkg-config --exists libffi"
| pkg-config --libs libffi
=> "-lffi\n"
"x86_64-nilrt-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/srv/jenkins/perforce/ThirdPartyExports/NIOpenEmbedded/trunk/6.5/objec$
In file included from /usr/include/ruby-2.4.0/ruby/ruby.h:36:0,
                 from /usr/include/ruby-2.4.0/ruby.h:33,
                 from conftest.c:1:
/usr/include/ruby-2.4.0/ruby/defines.h:101:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>
                   ^
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

Has anyone seen something similar?
Is it the C-compiler which is not properly set up?

 

0 Kudos
Message 1 of 3
(2,257 Views)

Hi aaroentr,

 

You'll need to interpret the error logs and compiler settings. The one thing that jumps out at me is this: 

"x86_64-nilrt-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/srv/jenkins/perforce/ThirdPartyExports/NIOpenEmbedded/trunk/6.5/objec$
In file included from /usr/include/ruby-2.4.0/ruby/ruby.h:36:0,
                 from /usr/include/ruby-2.4.0/ruby.h:33,
                 from conftest.c:1:
/usr/include/ruby-2.4.0/ruby/defines.h:101:19: fatal error: stdio.h: No such file or directory
 #include <stdio.h>

 It looks like you're not finding the stdio.h header file. That header should be located in the /usr/include directory. 

 

One potential problem I see is that your gcc command has a sysroot that shouldn't be required if you're compiling on the target. How are you generating the makefile? Where are you getting that sysroot flag from? What version of LabVIEW Real-Time is installed on the target?

Charlie J.
National Instruments
0 Kudos
Message 2 of 3
(2,211 Views)

Hi GatorBait

 

Thanks for your reply.

 

I have found stdio.h in /usr/include.

 

The makefile is not generated by me. It is included in the .tar.gz from the github repo.

I am not familiar with the sysroot flag. Should I be able to diable this and hopefully advance further?

 

The target has NI Linux Real-Time version 6.0.

 

Truls

0 Kudos
Message 3 of 3
(2,175 Views)