@@ -228,16 +228,37 @@ in the Installation Guide.
228
228
(If the bootstrapping prerequisites are not installed, this command will
229
229
download a package providing pre-built bootstrap output instead.)
230
230
231
- 6 . [ macOS with homebrew ] Set required environment variables for the build:
231
+ 6 . Sanitize the build environment. Use the command
232
232
233
- $ source ./.homebrew-build- env
233
+ $ env
234
234
235
- This is to make some of Homebrew's packages (so-called keg-only packages)
236
- available for the build. Run it once to apply the suggestions for the current
237
- terminal session. You may need to repeat this command before you rebuild Sage
238
- from a new terminal session, or after installing additional homebrew packages.
239
- (You can also add it to your shell profile so that it gets run automatically
240
- in all future sessions.)
235
+ to inspect the current environment variables, in particular ` PATH ` ,
236
+ ` PKG_CONFIG_PATH ` , ` LD_LIBRARY_PATH ` , ` CFLAGS ` , ` CPPFLAGS ` , ` CXXFLAGS ` ,
237
+ and ` LDFLAGS ` (if set).
238
+
239
+ Remove items from these (colon-separated) environment variables
240
+ that Sage should not use for its own build. In particular, remove
241
+ items if they refer to a previous Sage installation.
242
+
243
+ - [ WSL] In particular, WSL imports many items from the Windows
244
+ ` PATH ` variable into the Linux environment, which can lead to
245
+ confusing build errors. These items typically start with ` /mnt/c ` .
246
+ It is best to remove all of them from the environment variables.
247
+ For example, you can set ` PATH ` using the command:
248
+
249
+ $ export PATH=/usr/sbin/:/sbin/:/bin/:/usr/lib/wsl/lib/
250
+
251
+ - [ macOS with homebrew] Set required environment variables for the build:
252
+
253
+ $ source ./.homebrew-build-env
254
+
255
+ This is to make some of Homebrew's packages (so-called keg-only
256
+ packages) available for the build. Run it once to apply the
257
+ suggestions for the current terminal session. You may need to
258
+ repeat this command before you rebuild Sage from a new terminal
259
+ session, or after installing additional homebrew packages. (You
260
+ can also add it to your shell profile so that it gets run
261
+ automatically in all future sessions.)
241
262
242
263
7 . Optionally, decide on the installation prefix (` SAGE_LOCAL ` ):
243
264
0 commit comments