Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests fail to compile on FreeBSD #590

Open
asomers opened this issue Sep 18, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@asomers
Copy link

commented Sep 18, 2017

Running "bundle exec rake test" on FreeBSD fails for several reasons:

  1. ext/ffi_c/extconf.rb generates a makefile that uses BSD make syntax, but rake-compiler will invoke gmake if present, unless MAKE=/usr/bin/make is set in the environment
  2. ext/ffi_c/libffi.bsd.mk incorrectly sets LIBFFI_SRC_DIR. It looks like change 6bf1945 never got applied to libffi.bsd.mk
  3. If MAKE=/usr/bin/make is set in the environment, libffi will try to use it. But libffi requires gmake to build.

The easiest solution is to use gmake on BSD platforms.

asomers added a commit to asomers/ffi that referenced this issue Sep 18, 2017

Fix building tests on FreeBSD
There are three problems:
1. ext/ffi_c/extconf.rb generates a makefile that uses BSD make syntax,
   but rake-compiler will invoke gmake if present, unless
   MAKE=/usr/bin/make is set in the environment
2. ext/ffi_c/libffi.bsd.mk incorrectly sets LIBFFI_SRC_DIR. It looks
   like change 6bf1945 never got applied to libffi.bsd.mk
3. If MAKE=/usr/bin/make is set in the environment, libffi will try to
   use it. But libffi requires gmake to build.

Additionally, libffi.bsd.mk adds -lpthread, which doesn't seem to be
necessary.

To fix all of these issues, simply use gmake on BSD platforms.

Fixes ffi#590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.