Skip to content

Commit

Permalink
Support debugger on armLinux
Browse files Browse the repository at this point in the history
Add the linux.aarch64 SWT jar from here:
https://repo1.maven.org/maven2/org/eclipse/platform/org.eclipse.swt.gtk.linux.aarch64/3.122.0/. Update the SWT jar-picking logic in the build to select this one
if the platform is `aarch64`. This is inconsistent with M1/2 Macs, where the
value is `arm`.

Note that I don't yet see a built copy for windows.aarch64. Would have loved to
kill two birds with one stone, but that must wait, it seems. Latest built of SWT
doesn't have it, either.

Improve building documentation where pitfalls were found while testing on ARM Ubuntu.
  • Loading branch information
garfieldnate committed Jan 25, 2024
1 parent 7167f59 commit e5789f4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# depends on pre-installed software; see image definitions:
# - https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md
# - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
# We use these tools from the runner images: git, gcc/XCode/MSVC, swig, Tcl/Tk on MacOS
# We use these tools from the runner images: git, gcc/XCode/MSVC, swig, Tcl/Tk on MacOS, pkg-config

# TODO: not building svs_viewer ('Cannot find GL, GLU, not building svs_viewer' and 'Cannot find opengl32, glu32, not building svs_viewer')
# TODO: pin more dependency versions (python, swig, gcc/XCode/MSVC, etc.)
Expand Down
8 changes: 5 additions & 3 deletions Java/Debugger/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ depjars = [
def get_swt_path():
swt_intel_jars = {
('linux', 32) : 'gtk32',
('linux', 64) : 'gtk64',
('linux', 64) : 'gtk64/i386',
('linux2', 32) : 'gtk32',
('linux2', 64) : 'gtk64',
('linux2', 64) : 'gtk64/i386',
('darwin', 32) : 'osx32',
('darwin', 64) : 'osx64/i386',
('win32', 32) : 'win32',
('win32', 64) : 'win64',
}
swt_arm_jars = {
('darwin', 64) : 'osx64/arm',
('linux', 64) : 'gtk64/arm',
}

if platform.processor() == 'arm':
# ARM processor returns 'arm' on Macs, 'aarh64' on Linux
if platform.processor() in ['arm', 'aarch64']:
return swt_arm_jars[(sys.platform, 64 if '64' in platform.machine() else 32)]
else:
return swt_intel_jars[(sys.platform, 64 if '64' in platform.machine() else 32)]
Expand Down
Binary file added Java/Debugger/lib/swt/gtk64/arm/swt.jar
Binary file not shown.
File renamed without changes.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is the code base for Soar, a cognitive architecture for developing systems
* [The Soar home page](http://soar.eecs.umich.edu/)
* [The GitHub project page](https://github.com/SoarGroup/Soar)

Note that the readme included with the Soar distribution for endusers is in the [Release-Support](https://github.com/SoarGroup/Release-Support/blob/master/txt/README) repository.
Note that the readme included with the Soar distribution for end-users is in the [Release-Support](https://github.com/SoarGroup/Release-Support/blob/master/txt/README) repository.

# Soar Builds

Expand All @@ -30,7 +30,7 @@ Disclaimer: These are worst case tests. Average performance is probably much hi

The instructions below are cursory and may be out of date; the most up-to-date instructions for compiling Soar from source will always be the CI build scripts. You can find them [here](.github/workflows/build.yml).

To compile Soar, you will need the following:
To compile Soar, you will need the dependencies listed below. Note that the installation commands are not complete, e.g. missing instructions for Mac do not mean that the dependency is not needed on Mac, etc.:

* C/C++ compiler
- Mac: `xcode-select --install`
Expand All @@ -42,9 +42,17 @@ To compile Soar, you will need the following:

To compile the extra SML wrapper libs, you will need the following:

* C# compiler (`csc`)
* pkg-config
- Mac: `brew install pkg-config`
- Linux: `sudo apt install pkgconf`
* SWIG
- Mac: `brew install swig`
- Linux: `sudo apt install swig`
* Python development headers (only needed for Python wrapper)
- Linux: `sudo apt install python3-dev`
* C# compiler (`csc`) (only needed for C# wrapper)
- Mac: `brew install mono`
* Tcl
* Tcl (only needed for Tcl wrapper and TclSoarlib)
- Mac: `brew install tcl-tk`

The project supports generating compile_commands.json, which can be used by e.g. VSCode with the C/C++ plugin to provide IntelliSense. To generate this file, run scons with the `cdb` target:
Expand Down

0 comments on commit e5789f4

Please sign in to comment.