Bug 197188 - lang/erlang: configure fails when dtrace is enabled on 10.1R-amd64
Summary: lang/erlang: configure fails when dtrace is enabled on 10.1R-amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jimmy Olgeni
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-29 23:37 UTC by Dave Cottlehuber
Modified: 2016-01-20 10:31 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (olgeni)


Attachments
erl 17.3 config failre (47.85 KB, text/plain)
2015-01-29 23:37 UTC, Dave Cottlehuber
no flags Details
otp17.4 config failure (47.85 KB, text/plain)
2015-01-29 23:38 UTC, Dave Cottlehuber
no flags Details
dtrace.patch (320 bytes, patch)
2015-01-29 23:40 UTC, Dave Cottlehuber
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Cottlehuber freebsd_committer freebsd_triage 2015-01-29 23:37:55 UTC
Created attachment 152355 [details]
erl 17.3 config failre

Building either in local ports tree, or via poudriere:

checking for 1-stage DTrace precompilation... dtrace: failed to compile script emulator/beam/erlang_dtrace.d: "/usr/lib/dtrace/io.d", line 43: operator -> cannot be applied to a forward declaration: no struct devstat definition is available
configure: error: Could not precompile erlang_dtrace.d: dtrace -h failed
configure: error: /bin/sh '/wrkdirs/usr/ports/lang/erlang-runtime17/work/otp_src_17.4/erts/configure' failed for erts
===>  Script "configure" failed unexpectedly.

I believe that `dtrace -h` requires root privileges to run, not sure how that can work within poudriere etc, viz https://github.com/jj1bdx/erlang-freebsd-port#dtrace-support

Adding 
```
diff --git i/lang/erlang/Makefile w/lang/erlang/Makefile
index 1094185..cc8e776 100644
--- i/lang/erlang/Makefile
+++ w/lang/erlang/Makefile
@@ -92,6 +92,7 @@ USE_GCC?=     yes

 .if ${PORT_OPTIONS:MDTRACE}
 CONFIGURE_ARGS+=--with-dynamic-trace=dtrace
+NEED_ROOT=yes
 .else
 CONFIGURE_ARGS+=--without-dynamic-trace
 .endif
```

I'm not clear how to apply this to my poudriere setup for testing, but I guess it would work fine as well there.

DTrace + OTP is a wonderful combo, I hope we can find a fix for this!
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-29 23:37:55 UTC
Auto-assigned to maintainer olgeni@FreeBSD.org
Comment 2 Dave Cottlehuber freebsd_committer freebsd_triage 2015-01-29 23:38:56 UTC
Created attachment 152356 [details]
otp17.4 config failure
Comment 3 Dave Cottlehuber freebsd_committer freebsd_triage 2015-01-29 23:40:02 UTC
Created attachment 152357 [details]
dtrace.patch
Comment 4 Dave Cottlehuber freebsd_committer freebsd_triage 2015-11-04 08:47:14 UTC
bumping this...
Comment 5 Jimmy Olgeni freebsd_committer freebsd_triage 2016-01-20 10:31:53 UTC
NEED_ROOT is no longer supported, but as of r406740 everything should work as expected on R18.