Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
readme: Added troubleshooting hints for gdb.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarteberg committed Jun 16, 2015
1 parent 2e0169a commit 8a87bd9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,26 @@ If the easy_install works, it is recommended to create a separate .cmake file si

## Troubleshooting

It's a good idea to have a clean environment and "source" in environment variables as needed. If you get errors during builds, examine your environment variables and make sure there aren't conflicts with already installed components that have higher priority. Generally, we recommend minimal PATH, LD_LIBRARY_PATH, and PYTHONPATH environment variables.
It's a good idea to have a clean environment and "source" in environment variables as needed. If you get errors during builds, examine your environment variables and make sure there aren't conflicts with already installed components that have higher priority. Generally, we recommend minimal `PATH`, `LD_LIBRARY_PATH`, and `PYTHONPATH` environment variables.

Some original source repositories or tarballs require https, which may be a problem for operating systems like Scientific Linux due to absent certificates. This issue can be sidestepped by using default non-https downloads, e.g., all downloads from janelia-flyem cache.

Common build problems for individual components in the FlyEM Build System are documented in each component's CMake file. If you see an error, check that file's comments.
For example, cpu throttling is a common build issue when building Atlas from source, and in the atlas.cmake file, we have documented how to turn off cpu frequency adjustments that defeat Atlas tuning.

## Using `gdb`

When your BuildEM directory includes the `python` package, activating your BuildEM environment will prevent
non-BuildEM binaries (such as `gdb`) from correctly loading the system's version of `libpython.so`.
On Linux, this issue can be resolved via the `LD_PRELOAD` environment variable.
Here's an example command-line for using `gdb`:

```bash
LD_PRELOAD=/lib64/libpython2.7.so gdb -ex 'set environ LD_PRELOAD' --args my-program-to-debug
```

**Hint:** To find the location of the correct `libpython2.7.so` file, open a fresh terminal (no BuildEM environment), and inspect the output of `ldd $(which gdb) | grep libpython`.

## Roadmap

This build system could be improved in a number of ways, not all of which adhere to the goal of a simple, easily-specified build process.
Expand Down

0 comments on commit 8a87bd9

Please sign in to comment.