securedrop icon indicating copy to clipboard operation
securedrop copied to clipboard

Update `make dev` to work on Mac with Apple Silicon

Open zenmonkeykstop opened this issue 2 years ago • 1 comments

Description

Docker for Mac on M1 claims to support intel images, but anecdotally the instructions for setting up the dev environment on a Mac don't appear to work.

It would make it easier for devs on modern Macs to contribute if the setup process was the same, and worked. Ideally this would involve using the same base Ubuntu intel image. It looks like adding the --platform linux/amd64 argument might be all that's needed there.

zenmonkeykstop avatar Jun 20 '22 18:06 zenmonkeykstop

Narrator: "it was not."

Initial dependency install is failing when trying to sychronize Mono's cert store:

#5 654.9 Running hooks in /etc/ca-certificates/update.d...\
#5 654.9 \
#5 656.8 done.\
#5 656.9 Updating Mono key store\
#5 657.2 TYPE: 6\
#5 657.2 V: mono_thread_interruption_checkpoint\
#5 657.2 * Assertion at ../../mono/arch/amd64/../x86/x86-codegen.h:410, condition `offset == (gint32)offset' not met\
#5 657.2 \
#5 657.2 \
#5 657.2 =================================================================\
#5 657.2 	Native Crash Reporting\
#5 657.2 =================================================================\
#5 657.2 Got a SIGABRT while executing native code. This usually indicates\
#5 657.2 a fatal error in the mono runtime or one of the native libraries \
#5 657.2 used by your application.\
#5 657.2 =================================================================\
#5 657.2 \
#5 657.2 =================================================================\
#5 657.2 	Native stacktrace:\
#5 657.2 =================================================================\
#5 657.2 	0x40000bceb5 - /usr/bin/mono : (null)\
#5 657.2 	0x40000bd250 - /usr/bin/mono : (null)\
#5 657.2 	0x400006a129 - /usr/bin/mono : (null)\
#5 657.2 	0x40000bc467 - /usr/bin/mono : (null)\
#5 657.2 	0x4001e66420 - /lib/x86_64-linux-gnu/libpthread.so.0 : (null)\
#5 657.2 	0x4001ed300b - /lib/x86_64-linux-gnu/libc.so.6 : gsignal\
#5 657.2 	0x4001eb2859 - /lib/x86_64-linux-gnu/libc.so.6 : abort\
#5 657.2 	0x400002d2eb - /usr/bin/mono : (null)\
#5 657.2 	0x400031a1a5 - /usr/bin/mono : (null)\
#5 657.2 	0x4000337b2e - /usr/bin/mono : (null)\
#5 657.2 	0x4000338113 - /usr/bin/mono : monoeg_assertion_message\
#5 657.2 	0x4000092e41 - /usr/bin/mono : (null)\
#5 657.2 	0x40000c16d3 - /usr/bin/mono : (null)\
#5 657.2 	0x40000c37f0 - /usr/bin/mono : (null)\
#5 657.2 	0x40000c43c6 - /usr/bin/mono : (null)\
#5 657.2 	0x4000035e7a - /usr/bin/mono : (null)\
#5 657.2 	0x4000035c14 - /usr/bin/mono : (null)\
#5 657.2 	0x400006dab6 - /usr/bin/mono : (null)\
#5 657.2 	0x400006e634 - /usr/bin/mono : (null)\
#5 657.2 	0x40020a3393 - Unknown\
#5 657.2 \
#5 657.2 =================================================================\
#5 657.2 	Telemetry Dumper:\
#5 657.2 =================================================================\
#5 657.2 Pkilling 0x4004cf5700 from 0x40020835c0\
#5 657.2 Entering thread summarizer pause from 0x40020835c0\
#5 657.2 Finished thread summarizer pause from 0x40020835c0.\
#5 657.2 \
#5 657.2 Waiting for dumping threads to resume\
#5 658.2 \
#5 658.2 =================================================================\
#5 658.2 	External Debugger Dump:\
#5 658.2 =================================================================\
#5 658.2 mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb\
#5 658.2 \
#5 658.2 =================================================================\
#5 658.2 	Basic Fault Address Reporting\
#5 658.2 =================================================================\
#5 658.2 Memory around native instruction pointer (0x4001ed300b):0x4001ed2ffb  d2 4c 89 ce bf 02 00 00 00 b8 0e 00 00 00 0f 05  .L..............\
#5 658.2 0x4001ed300b  48 8b 84 24 08 01 00 00 64 48 33 04 25 28 00 00  H..$....dH3.%(..\
#5 658.2 0x4001ed301b  00 75 26 44 89 c0 48 81 c4 18 01 00 00 c3 0f 1f  .u&D..H.........\
#5 658.2 0x4001ed302b  80 00 00 00 00 48 8b 15 39 8e 1a 00 f7 d8 41 b8  .....H..9.....A.\
#5 658.2 \
#5 658.2 =================================================================\
#5 658.2 	Managed Stacktrace:\
#5 658.2 =================================================================\
#5 658.2 	  at <unknown> <0xffffffff>\
#5 658.2 	  at Sys:LStat <0x00183>\
#5 658.2 	  at System.IO.FileSystem:FileExists <0x000bb>\
#5 658.2 	  at System.IO.FileSystem:DirectoryExists <0x0004b>\
#5 658.2 	  at System.IO.FileSystem:DirectoryExists <0x00053>\
#5 658.2 	  at System.IO.Directory:Exists <0x00133>\
#5 658.2 	  at System.IO.FileStream:.ctor <0x00127>\
#5 658.2 	  at System.IO.FileStream:.ctor <0x00073>\
#5 658.2 	  at System.IO.FileStream:.ctor <0x000bb>\
#5 658.2 	  at System.IO.PathInternal:GetIsCaseSensitive <0x000ff>\
#5 658.2 	  at System.IO.PathInternal:.cctor <0x00027>\
#5 658.2 	  at System.Object:runtime_invoke_void <0x0009d>\
#5 658.2 	  at <unknown> <0xffffffff>\
#5 658.2 	  at System.IO.File:Exists <0x00097>\
#5 658.2 	  at Mono.Tools.CertSync:ParseOptions <0x001bb>\
#5 658.2 	  at Mono.Tools.CertSync:Main <0x00043>\
#5 658.2 	  at <Module>:runtime_invoke_int_object <0x000a8>\
#5 658.2 =================================================================\
#5 658.2 qemu: uncaught target signal 6 (Aborted) - core dumped\
#5 658.2 Aborted\
#5 658.2 Done\
#5 658.2 done.\
#5 658.3 Processing triggers for dbus (1.12.16-2ubuntu2.2) ...\
#5 658.3 Setting up glib-networking:amd64 (2.64.2-1ubuntu0.1) ...\
#5 658.3 Setting up libsoup2.4-1:amd64 (2.70.0-1) ...\
#5 658.3 Setting up libsoup-gnome2.4-1:amd64 (2.70.0-1) ...\
#5 658.4 Setting up librest-0.7-0:amd64 (0.8.1-1) ...\
#5 658.4 Setting up libgtk-3-0:amd64 (3.24.20-0ubuntu1.1) ...\
#5 658.5 Setting up libgtk-3-bin (3.24.20-0ubuntu1.1) ...\
#5 658.5 Processing triggers for dictionaries-common (1.28.1) ...\
#5 659.0 debconf: unable to initialize frontend: Dialog\
#5 659.0 debconf: (TERM is not set, so the dialog frontend is not usable.)\
#5 659.0 debconf: falling back to frontend: Readline\
#5 660.0 aspell-autobuildhash: processing: en [en-common].\
#5 660.8 aspell-autobuildhash: processing: en [en-variant_0].\
#5 660.9 aspell-autobuildhash: processing: en [en-variant_1].\
#5 661.0 aspell-autobuildhash: processing: en [en-variant_2].\
#5 661.1 aspell-autobuildhash: processing: en [en-w_accents-only].\
#5 661.2 aspell-autobuildhash: processing: en [en-wo_accents-only].\
#5 661.3 aspell-autobuildhash: processing: en [en_AU-variant_0].\
#5 661.4 aspell-autobuildhash: processing: en [en_AU-variant_1].\
#5 661.5 aspell-autobuildhash: processing: en [en_AU-w_accents-only].\
#5 661.6 aspell-autobuildhash: processing: en [en_AU-wo_accents-only].\
#5 661.7 aspell-autobuildhash: processing: en [en_CA-variant_0].\
#5 661.8 aspell-autobuildhash: processing: en [en_CA-variant_1].\
#5 661.9 aspell-autobuildhash: processing: en [en_CA-w_accents-only].\
#5 661.9 aspell-autobuildhash: processing: en [en_CA-wo_accents-only].\
#5 662.0 aspell-autobuildhash: processing: en [en_GB-ise-w_accents-only].\
#5 662.1 aspell-autobuildhash: processing: en [en_GB-ise-wo_accents-only].\
#5 662.2 aspell-autobuildhash: processing: en [en_GB-ize-w_accents-only].\
#5 662.3 aspell-autobuildhash: processing: en [en_GB-ize-wo_accents-only].\
#5 662.4 aspell-autobuildhash: processing: en [en_GB-variant_0].\
#5 662.5 aspell-autobuildhash: processing: en [en_GB-variant_1].\
#5 662.6 aspell-autobuildhash: processing: en [en_US-w_accents-only].\
#5 662.7 aspell-autobuildhash: processing: en [en_US-wo_accents-only].\
#5 662.8 Processing triggers for libc-bin (2.31-0ubuntu9.2) ...\
#5 663.0 Errors were encountered while processing:\
#5 663.0  libglib2.0-cil\
#5 663.0  libgtk2.0-cil\
#5 663.0  libglib2.0-cil-dev\
#5 663.0  libgtk2.0-cil-dev\
#5 663.1 E: Sub-process /usr/bin/dpkg returned an error code (1)\
------\
executor failed running [/bin/sh -c apt-get update && apt-get install -y paxctl &&     \{ apt-get install -y libgtk2.0 || echo 'libgtk2.0 was not installed'; \} &&     paxctl -cm /usr/bin/mono-sgen && dpkg-reconfigure mono-runtime-sgen &&     apt-get install -y apache2-dev coreutils devscripts vim                        python3-pip python3-all python3-venv virtualenv libpython3.8-dev libssl-dev                        gnupg2 ruby redis-server git xvfb curl wget                        x11vnc enchant libffi-dev sqlite3 gettext sudo                        default-jdk                        libasound2 libdbus-glib-1-2 libgtk2.0-0 libfontconfig1 libxrender1                        libcairo-gobject2 libgtk-3-0 libstartup-notification0 tor basez]: exit code: 100\
make: *** [dev] Error 1\

There's a similar error in https://github.com/mono/mono/issues/21423 (no resolution sadly)

zenmonkeykstop avatar Jun 20 '22 21:06 zenmonkeykstop

I will have an M1 machine available next week and will work on this

eaon avatar Nov 04 '22 15:11 eaon