rubymakefiletravis-cimkmf

mkmf generates a strange Makefile


When I build a gem with native C bindings I get this warning:

ld: warning: directory not found for option '-L/Users/travis/.sm/pkg/active/lib'

I've found in generated Makefile these lines:

CFLAGS   = $(CCDLFLAGS) -O3 -I/Users/travis/.sm/pkg/active/include -fPIC -mmacosx-version-min=10.6 -pipe -std=c99 -Wall -ggdb -O2 $(ARCH_FLAG)
..
ldflags  = -L. -L/Users/travis/.sm/pkg/active/lib -fPIC -Bstatic -fstack-protector -lpthread

My system user's name isn't travis, neither did I specified that in extconf.rb.

Also found this issue: https://github.com/flori/json/issues/207


Solution

  • /Users/travis actually comes from the pre-compiled ruby that rvm installs, as of around 2.1.0. If you grep for that string in .rvm/rubies/ or your ruby install dir, you'll find it there. I believe the warning is harmless.

    If it turns out not to be harmless or you just want to get rid of it, building ruby locally rather than using a precompiled binary should fix it for you.