You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## [Required Build Tools and External Libraries](@id build-tools)
143
143
144
144
Building Julia requires that the following software be installed:
145
145
@@ -282,3 +282,24 @@ LLVM_ASSERTIONS=1
282
282
```
283
283
284
284
Please note that assert builds of Julia will be slower than regular (non-assert) builds.
285
+
286
+
## Building 32-bit Julia on a 64-bit machine
287
+
288
+
Occasionally, bugs specific to 32-bit architectures may arise, and when this happens it is useful to be able to debug the problem on your local machine. Since most modern 64-bit systems support running programs built for 32-bit ones, if you don't have to recompile Julia from source (e.g. you mainly need to inspect the behavior of a 32-bit Julia without having to touch the C code), you can likely use a 32-bit build of Julia for your system that you can obtain from the [official downloads page](https://julialang.org/downloads/).
289
+
However, if you do need to recompile Julia from source one option is to use a Docker container of a 32-bit system. At least for now, building a 32-bit version of Julia is relatively straightforward using [ubuntu 32-bit docker images](https://hub.docker.com/r/i386/ubuntu). In brief, after setting up `docker` here are the required steps:
290
+
291
+
```sh
292
+
$ docker pull i386/ubuntu
293
+
$ docker run --platform i386 -i -t i386/ubuntu /bin/bash
294
+
```
295
+
296
+
At this point you should be in a 32-bit machine console (note that `uname` reports the host architecture, so will still say 64-bit, but this will not affect the Julia build). You can add packages and compile code; when you `exit`, all the changes will be lost, so be sure to finish your analysis in a single session or set up a copy/pastable script you can use to set up your environment.
297
+
298
+
From this point, you should
299
+
300
+
```sh
301
+
# apt update
302
+
```
303
+
(Note that `sudo` isn't installed, but neither is it necessary since you are running as `root`, so you can omit `sudo` from all commands.)
304
+
305
+
Then add all the [build dependencies](@ref build-tools), a console-based editor of your choice, `git`, and anything else you'll need (e.g., `gdb`, `rr`, etc). Pick a directory to work in and `git clone` Julia, check out the branch you wish to debug, and build Julia as usual.
0 commit comments