≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1856

Bug #1856: Build break on CentOS

Kind bug
Product Command-T
When Created 2011-08-17T23:33:24Z, updated 2011-11-18T00:08:09Z
Status open
Reporter Jack OConnor
Tags no tags

Description

This is on my company's internal CentOS servers, which might be weirdly configured, for what that's worth.

Building the C component of Command-T fails with dozens of errors of the form:
    /usr/include/bits/string2.h:974: multiple definition of `__strcspn_c1'
    ext.o:/usr/include/bits/string2.h:974: first defined here
    match.o: In function `__strcspn_c2':

It appears that we're hitting an "extern inline" problem. This might be due enforcing the C99 standard on system header files that don't want to use it? I'm not really sure, but this blog has some details: "http://lifecs.likai.org/2009/06/multiple-definition-of-extern-inline.html". The fix seems to be adding the -fgnu89-inline compiler flag. The following did that successfully for me:

diff --git a/ruby/command-t/extconf.rb b/ruby/command-t/extconf.rb
index 58503b6..9c88fab 100644
--- a/ruby/command-t/extconf.rb
+++ b/ruby/command-t/extconf.rb
@@ -28,5 +28,6 @@ def missing item
   exit 1
 end

+$CFLAGS = $CFLAGS + ' -fgnu89-inline '
 have_header('ruby.h') or missing('ruby.h')
 create_makefile('ext')

Once the compile was successful, we also got the following error in Vim: "command-t.vim could not load the C extension." It seems that installing the 'ruby-devel' package on our systems solved this problem, but we don't know exactly why. Let me know if there are useful logs we could pull for you.

Comments

  1. Jack OConnor Created 2011-08-17T23:34:35Z, edited 2011-08-18T00:30:25Z

    Wow that formatting did not turn out like I wanted :p

    diff --git a/ruby/command-t/extconf.rb b/ruby/command-t/extconf.rb
    index 58503b6..9c88fab 100644
    --- a/ruby/command-t/extconf.rb
    +++ b/ruby/command-t/extconf.rb
    @@ -28,5 +28,6 @@ def missing item
       exit 1
     end
    
    +$CFLAGS = $CFLAGS + ' -fgnu89-inline '
     have_header('ruby.h') or missing('ruby.h')
     create_makefile('ext')
  2. Greg Hurrell 2011-08-18T02:28:34Z

    The right place for this kind of change is in the depend file (in the same directory).

    I'm almost more inclined, however, to just drop the C99-specific aspects of the source in the interests of wider compatibility without having to meddle with possibly-not-well-supported compiler flags.

  3. anonymous 2011-11-18T00:08:09Z

    FYI, I'm having the same exact problem, Adding the fgnu89-inline flag doesn't fix it for me (After adding the line, I simply ran ruby extconf.rb && make again)

Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets