# Bug OP-11714 - bundle install on current "dev" HEAD

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-11714

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 12.5.0 |
| Observed in versions |  |
| Sprint | 12.5.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

Git commit ID: 8719a42d41e26c32f3c147a297e04fff0a9032b4

running `bundle install` results in

``` text
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/psych-5.0.1/ext/psych
/Users/torben/.rbenv/versions/3.1.2/bin/ruby -I /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0 -r ./siteconf20221220-52165-wczgym.rb extconf.rb
checking for yaml.h... no
yaml.h not found
*** 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=/Users/torben/.rbenv/versions/3.1.2/bin/$(RUBY_BASE_NAME)
	--with-libyaml-source-dir
	--without-libyaml-source-dir
	--with-yaml-0.1-dir
	--without-yaml-0.1-dir
	--with-yaml-0.1-include
	--without-yaml-0.1-include=${yaml-0.1-dir}/include
	--with-yaml-0.1-lib
	--without-yaml-0.1-lib=${yaml-0.1-dir}/lib
	--with-yaml-0.1-config
	--without-yaml-0.1-config
	--with-pkg-config
	--without-pkg-config
	--with-libyaml-dir
	--without-libyaml-dir
	--with-libyaml-include
	--without-libyaml-include=${libyaml-dir}/include
	--with-libyaml-lib
	--without-libyaml-lib=${libyaml-dir}/lib

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

  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/psych-5.0.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/psych-5.0.1 for inspection.
Results logged to /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/psych-5.0.1/gem_make.out

  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:95:in `run'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/tempfile.rb:317:in `open'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:161:in `build_extension'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:195:in `block in build_extensions'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `each'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/ext/builder.rb:192:in `build_extensions'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/installer.rb:853:in `build_extensions'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/rubygems_gem_installer.rb:28:in `install'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/source/rubygems.rb:204:in `install'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/installer/gem_installer.rb:54:in `install'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/worker.rb:62:in `apply_func'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/worker.rb:54:in `loop'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/worker.rb:54:in `process_queue'
  /Users/torben/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/bundler-2.3.12/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing psych (5.0.1), and Bundler cannot continue.

In Gemfile:
  rdoc was resolved to 6.5.0, which depends on
    psych
```

The mentioned log file:

``` text
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/torben/.rbenv/versions/3.1.2/lib pkg-config --exists yaml-0.1
package configuration for yaml-0.1 is not found
find_header: checking for yaml.h... -------------------- no

DYLD_FALLBACK_LIBRARY_PATH=.:/Users/torben/.rbenv/versions/3.1.2/lib "clang -o conftest -I/Users/torben/.rbenv/versions/3.1.2/include/ruby-3.1.0/arm64-darwin21 -I/Users/torben/.rbenv/versions/3.1.2/include/ruby-3.1.0/ruby/backward -I/Users/torben/.rbenv/versions/3.1.2/include/ruby-3.1.0 -I. -I/Users/torben/.rbenv/versions/3.1.2/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef  -fno-common -pipe conftest.c  -L. -L/Users/torben/.rbenv/versions/3.1.2/lib -L. -L/Users/torben/.rbenv/versions/3.1.2/lib  -fstack-protector-strong     -lruby.3.1   "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

DYLD_FALLBACK_LIBRARY_PATH=.:/Users/torben/.rbenv/versions/3.1.2/lib "clang -I/Users/torben/.rbenv/versions/3.1.2/include/ruby-3.1.0/arm64-darwin21 -I/Users/torben/.rbenv/versions/3.1.2/include/ruby-3.1.0/ruby/backward -I/Users/torben/.rbenv/versions/3.1.2/include/ruby-3.1.0 -I. -I/Users/torben/.rbenv/versions/3.1.2/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef  -fno-common -pipe   -c conftest.c"
conftest.c:3:10: fatal error: 'yaml.h' file not found
#include <yaml.h>
         ^~~~~~~~
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <yaml.h>
/* end */

--------------------
```

**FIX**  
`brew install libyaml`

**System Information**  
MacOS Ventura, M1 Max. Homebrew is installed under `/opt/homebrew`. That is relevant in case the header search path is busted, I can't remember setting a symlink for `/opt/homebrew/include` anywhere into `/usr`. At least yesterday Xcode complained that it couldn't find my dependency headers out of the box in the homebrew installation -- so at least they've got that going for `psych`. I think that's a problem in their installation instructions.
