Bug 34244 - pedump: undefined reference to `mono_threads_init_abort_syscall' on FreeBSD
Summary: pedump: undefined reference to `mono_threads_init_abort_syscall' on FreeBSD
Status: RESOLVED ANSWERED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Other
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-09-24 11:34 UTC by Marcin Cieślak
Modified: 2015-09-24 14:53 UTC (History)
4 users (show)

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


Attachments
config.log (732.71 KB, text/plain)
2015-09-24 12:32 UTC, Marcin Cieślak
Details
config.h from configure run (28.49 KB, text/x-chdr)
2015-09-24 12:33 UTC, Marcin Cieślak
Details


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 ANSWERED

Description Marcin Cieślak 2015-09-24 11:34:04 UTC
An attempt to build git master 77a900a8ed126330a0799a8735a98070afcc00df fails on FreeBSD 10.1 with:

Making all in metadata
gmake[3]: Entering directory '/home/saper/sw/mono/mono/metadata'
../../doltlibtool  --tag=CC   --mode=link cc  -g -O2 -std=gnu99 -fno-strict-aliasing -fwrapv -DMONO_DLL_EXPORT -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Qunused-arguments -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Werror-implicit-function-declaration  -pthread -L/usr/local/lib -o pedump pedump.o libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la ../../libgc/libmonogc.la -L../../eglib/src -leglib -lm -lm /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib  -lm   -pthread
libtool: link: cc -g -O2 -std=gnu99 -fno-strict-aliasing -fwrapv -DMONO_DLL_EXPORT -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Qunused-arguments -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Werror-implicit-function-declaration -pthread -o pedump pedump.o /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -pthread  -L/usr/local/lib ./.libs/libmonoruntime.a ../io-layer/.libs/libwapi.a ../utils/.libs/libmonoutils.a ../../libgc/.libs/libmonogc.a -L../../eglib/src /home/saper/sw/mono/eglib/src/.libs/libeglib.a -lm -pthread
../utils/.libs/libmonoutils.a(mono-threads.o): In function `mono_threads_init':
/home/saper/sw/mono/mono/utils/mono-threads.c:592: undefined reference to `mono_threads_init_abort_syscall'
../utils/.libs/libmonoutils.a(mono-threads.o): In function `mono_thread_info_abort_socket_syscall_for_close':
/home/saper/sw/mono/mono/utils/mono-threads.c:996: undefined reference to `mono_threads_core_needs_abort_syscall'
/home/saper/sw/mono/mono/utils/mono-threads.c:1012: undefined reference to `mono_threads_core_abort_syscall'
../utils/.libs/libmonoutils.a(mono-threads-posix.o): In function `mono_threads_core_begin_async_suspend':
/home/saper/sw/mono/mono/utils/mono-threads-posix.c:305: undefined reference to `mono_threads_posix_get_abort_signal'
/home/saper/sw/mono/mono/utils/mono-threads-posix.c:305: undefined reference to `mono_threads_posix_get_suspend_signal'
../utils/.libs/libmonoutils.a(mono-threads-posix.o): In function `mono_threads_core_begin_async_resume':
/home/saper/sw/mono/mono/utils/mono-threads-posix.c:330: undefined reference to `mono_threads_posix_get_restart_signal'
../utils/.libs/libmonoutils.a(mono-threads-posix.o): In function `mono_threads_init_platform':
/home/saper/sw/mono/mono/utils/mono-threads-posix.c:359: undefined reference to `mono_threads_posix_init_signals'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:1289: recipe for target 'pedump' failed
gmake[3]: *** [pedump] Error 1
gmake[3]: Leaving directory '/home/saper/sw/mono/mono/metadata'
Makefile:446: recipe for target 'all-recursive' failed
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory '/home/saper/sw/mono/mono'
Makefile:523: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory '/home/saper/sw/mono'
Makefile:453: recipe for target 'all' failed
gmake: *** [all] Error 2

99915fc6c339e35d3cec560e7e2774becea5c662 used to compile just fine
Comment 1 Marcin Cieślak 2015-09-24 12:22:41 UTC
This commit broke it:

commit 77a900a8ed126330a0799a8735a98070afcc00df
Author: João Matos <joao@tritao.eu>
Date:   Thu Sep 24 14:15:54 2015 +0100

    Fixed Mach abort syscall code to work with Mach targets that do not support it.

diff --git a/mono/utils/mono-threads-mach-abort-syscall.c b/mono/utils/mono-threads-mach-abort-syscall.c
index 58153c4..4c30f66 100644
--- a/mono/utils/mono-threads-mach-abort-syscall.c
+++ b/mono/utils/mono-threads-mach-abort-syscall.c
@@ -18,6 +18,27 @@
 
 #if defined(USE_MACH_SYSCALL_ABORT)
 
+#if defined(HOST_WATCHOS) || defined(HOST_TVOS)
+
+void
+mono_threads_init_abort_syscall (void)
+{
+}
+
+void
+mono_threads_core_abort_syscall (MonoThreadInfo *info)
+{
+
+}
+
+gboolean
+mono_threads_core_needs_abort_syscall (void)
+{
+       return FALSE;
+}
+
+#else
+
 void
 mono_threads_init_abort_syscall (void)
 {
@@ -55,3 +76,5 @@ mono_threads_core_needs_abort_syscall (void)
 }
 
 #endif
+
+#endif
Comment 2 Marcin Cieślak 2015-09-24 12:32:42 UTC
Created attachment 13054 [details]
config.log

config.log from configure
Comment 3 Marcin Cieślak 2015-09-24 12:33:14 UTC
Created attachment 13055 [details]
config.h from configure run
Comment 4 Marcin Cieślak 2015-09-24 12:36:12 UTC
scratch that, bisect error
Comment 5 Ludovic Henry 2015-09-24 14:32:36 UTC
Good news, because I couldn't reproduce it on FreeBSD anyway.
Comment 6 Marcin Cieślak 2015-09-24 14:36:13 UTC
well, I still can reproduce it, I am just not sure which commit has caused this...
Comment 7 Marcin Cieślak 2015-09-24 14:37:06 UTC
I can compile mono/mono/metadata with 7f306ec
Comment 8 Marcin Cieślak 2015-09-24 14:37:50 UTC
er, I can't. Let me try the full build.
Comment 9 Marcin Cieślak 2015-09-24 14:52:16 UTC
You are right, it's my fault. Forgot to re-generate ./configure

For the record:

git clean -dxf
sh autogen.sh

Sorry for noise!
Comment 10 Ludovic Henry 2015-09-24 14:53:00 UTC
No worries, thank you for taking the time to report it!