Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #42045

Closed
Open
Opened Jan 15, 2018 by Mike Lothian@FireBurn

GitLab gems don't compile with Ruby 2.5

I tried to setup GitLab with Ruby 2.5

I got thorugh most of the setup but oj-2.17.5 failed with the following message:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.    current directory: /apps/was/gitlab/instance/vendor/bundle/ruby/2.5.0/gems/oj-2.17.5/ext/oj
/apps/was/gitlab/embedded/bin/ruby -r ./siteconf20180115-2573-x8tehk.rb extconf.rb
>>>>> Creating Makefile for ruby version 2.5.0 on x86_64-linux <<<<<
creating Makefilecurrent directory: /apps/was/gitlab/instance/vendor/bundle/ruby/2.5.0/gems/oj-2.17.5/ext/oj
make "DESTDIR=" cleancurrent directory: /apps/was/gitlab/instance/vendor/bundle/ruby/2.5.0/gems/oj-2.17.5/ext/oj
make "DESTDIR="
compiling cache8.c
compiling circarray.c
compiling compat.c
compiling dump.c
dump.c: In function ‘dump_struct_obj’:
dump.c:1940:2: warning: ‘rb_struct_ptr’ is deprecated (declared at /apps/was/gitlab/embedded/include/ruby-2.5.0/ruby/backward.h:47) [-Wdeprecated-declarations]
  for (i = (int)RSTRUCT_LEN(obj), vp = RSTRUCT_CONST_PTR(obj); 0 < i; i--, vp++) {
  ^
dump.c:1940:2: error: too many arguments to function ‘rb_struct_ptr’
In file included from /apps/was/gitlab/embedded/include/ruby-2.5.0/ruby/ruby.h:24:0,
                 from /apps/was/gitlab/embedded/include/ruby-2.5.0/ruby.h:33,
                 from oj.h:43,
                 from dump.c:43:
/apps/was/gitlab/embedded/include/ruby-2.5.0/ruby/backward.h:47:37: note: declared here
 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_struct_ptr);
                                     ^
/apps/was/gitlab/embedded/include/ruby-2.5.0/x86_64-linux/ruby/config.h:127:52: note: in definition of macro ‘NORETURN’
 #define NORETURN(x) __attribute__ ((__noreturn__)) x
                                                    ^
/apps/was/gitlab/embedded/include/ruby-2.5.0/ruby/backward.h:39:14: note: in expansion of macro ‘ERRORFUNC’
     NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
              ^
/apps/was/gitlab/embedded/include/ruby-2.5.0/ruby/backward.h:39:58: note: in expansion of macro ‘DEPRECATED’
     NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
                                                          ^
/apps/was/gitlab/embedded/include/ruby-2.5.0/ruby/backward.h:47:1: note: in expansion of macro ‘DECLARE_DEPRECATED_INTERNAL_FEATURE’
 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_struct_ptr);
 ^
dump.c:1940:2: error: invalid use of void expression
  for (i = (int)RSTRUCT_LEN(obj), vp = RSTRUCT_CONST_PTR(obj); 0 < i; i--, vp++) {
  ^
make: *** [dump.o] Error 1make failed, exit code 2Gem files will remain installed in /apps/was/gitlab/instance/vendor/bundle/ruby/2.5.0/gems/oj-2.17.5 for inspection.
Results logged to /apps/was/gitlab/instance/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/oj-2.17.5/gem_make.outAn error occurred while installing oj (2.17.5), and Bundler cannot continue.
Make sure that `gem install oj -v '2.17.5'` succeeds before bundling.In Gemfile:
  oj

I can see there are much newer versions of oj available at https://github.com/ohler55/oj/

Edited Jun 14, 2018 by Achilleas Pipinellis
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab-foss#42045