Bug 29962 - undefined reference to `__dtraceenabled_mono___gc__finalize__invoke' when building Mono 4.1.0 on FreeBSD amd64
Summary: undefined reference to `__dtraceenabled_mono___gc__finalize__invoke' when bui...
Status: RESOLVED NORESPONSE
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: unspecified
Hardware: PC Other
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-12 00:29 UTC by Anders Jensen-Waud
Modified: 2017-08-30 22:40 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Anders Jensen-Waud 2015-05-12 00:29:40 UTC
I managed to yield the following error when building Mono (checkout from master on Github) on FreeBSD 10.1 (amd64): 

gmake[3]: Entering directory '/usr/home/aj/mono/mono/metadata'
  CCLD     pedump
./.libs/libmonoruntime.a(libmonoruntime_la-gc.o): In function `mono_gc_run_finalize':
/usr/home/aj/mono/mono/metadata/gc.c:242: undefined reference to `__dtraceenabled_mono___gc__finalize__invoke'
/usr/home/aj/mono/mono/metadata/gc.c:243: undefined reference to `__dtrace_mono___gc__finalize__invoke'
./.libs/libmonoruntime.a(libmonoruntime_la-boehm-gc.o): In function `on_gc_notification':
/usr/home/aj/mono/mono/metadata/boehm-gc.c:458: undefined reference to `__dtrace_mono___gc__end'
/usr/home/aj/mono/mono/metadata/boehm-gc.c:443: undefined reference to `__dtrace_mono___gc__world__restart__end'
/usr/home/aj/mono/mono/metadata/boehm-gc.c:448: undefined reference to `__dtrace_mono___gc__begin'
/usr/home/aj/mono/mono/metadata/boehm-gc.c:430: undefined reference to `__dtrace_mono___gc__world__stop__begin'
/usr/home/aj/mono/mono/metadata/boehm-gc.c:435: undefined reference to `__dtrace_mono___gc__world__stop__end'
/usr/home/aj/mono/mono/metadata/boehm-gc.c:439: undefined reference to `__dtrace_mono___gc__world__restart__begin'
collect2: error: ld returned 1 exit status
Makefile:1311: recipe for target 'pedump' failed
gmake[3]: *** [pedump] Error 1
gmake[3]: Leaving directory '/usr/home/aj/mono/mono/metadata'
Makefile:449: recipe for target 'all-recursive' failed
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory '/usr/home/aj/mono/mono'
Makefile:528: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory '/usr/home/aj/mono'
Makefile:458: recipe for target 'all' failed
gmake: *** [all] Error 2

I am using GCC/G++ 4.8
Comment 1 Vlad Brezae 2017-01-10 17:49:58 UTC
Hello Anders. Are you still encountering this failure ? I would expect it to have been fixed a while back, especially since the mono version you tried was not stable.
Comment 2 Ludovic Henry 2017-07-07 19:40:42 UTC
If you can still reproduce with latest mono version, please feel free to reopen the bug. Thank you.
Comment 3 Alex Regueiro 2017-08-25 02:23:35 UTC
I get these errors too, on FreeBSD 11.0, with the latest Mono 5.2 release.
Comment 4 Ludovic Henry 2017-08-30 22:01:13 UTC
Alex, could you please provide some more informations as to how you reproduce this issue?
Comment 5 Alex Regueiro 2017-08-30 22:40:26 UTC
I simply went through the Mac OS X build steps but for FreeBSD. The solution was simply turning off dtrace in the configure ioptins, in this case (`--disable-dtrace`).

My full solution to building Mono 5.2 on FreeBSD 11 was the following (Bash script).

PREFIX=“$HOME/build/mono/“ &&
VERSION=“5.2.0.215” &&
FILENAME=“mono-$VERSION.tar.bz2” &&
curl -O "https://download.mono-project.com/sources/mono/$FILENAME” &&
tar -xvf “$FILENAME” &&
cd “mono-$VERSION” &&
./configure —prefix=“$PREFIX" --disable-nls --disable-dtrace --build="$(gcc -dumpmachine)” &&
sed -EI -e "s|#define HAVE_LOCALCHARSET_H.*|#undef HAVE_LOCALCHARSET_H|" eglib/config.h &&
mkdir -p “$PREFIX” &&
gmake &&
gmake install &&
echo “Mono $VERSION successfully built and installed to '$PREFIX'."

Hope that helps someone!