Skip to content

freebsd: broken autotools + dtrace build #869

bnoordhuis opened this Issue Aug 5, 2013 · 1 comment

3 participants

# uname -a
FreeBSD 15f3cf02-b72e-45c5-8c07-7a5119e20fcb 9.1-RELEASE FreeBSD 9.1-RELEASE #0: Sat Jun 15 00:11:29 UTC 2013     root@freebsd:/usr/obj/usr/src/sys/JOYENT  amd64

# ./configure
checking for dtrace... dtrace
checking if dtrace works... yes
checking if dtrace should instrument object files... no

# make
  GEN      include/uv-dtrace.h
dtrace: failed to open -o: No such file or directory
*** [include/uv-dtrace.h] Error code 1
@jneu jneu added a commit to jneu/libuv that referenced this issue Dec 29, 2013
@jneu jneu build: fix dtrace in FreeBSD build (#869)
Addresses joyent/libuv#869.

FreeBSD make only sets $< (aka .IMPSRC) in suffix-transformation rules.
Changed the syntax in the recipe for the rule to make
include/uv-dtrace.h to explicitly name src/unix/uv-dtrace.d instead of
using $<.
jneu commented Dec 29, 2013

I was able to reproduce this issue on FreeBSD 9.2:

[jneuheisel@free /usr/home/jneuheisel]$ uname -a
FreeBSD free.jn 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013  amd64

Looks like the FreeBSD version of make only sets $< on suffix-transformation rules - although this is not well documented anywhere I can find.

FWIW, building with dtrace support on FreeBSD is still not for the faint of heart. First, you need to add libelf manually (I did this as ./configure LDFLAGS="-lelf"). This could be automated through autoconf. More problematic, though, is the failure of dtrace to correctly determine the 32/64-bitness of the build machine. I manually edited m4/dtrace.m4 and added -64 to each call to dtrace to force the correct sizes. I don't think this has anything to do with libuv but is probably a bug in the FreeBSD software.

@indutny indutny closed this Jan 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.