Package Details: ghidra-git 10.1.2.r312.3e245c6f8-1

Git Clone URL: https://aur.archlinux.org/ghidra-git.git (read-only, click to copy)
Package Base: ghidra-git
Description: Software reverse engineering framework (git)
Upstream URL: https://www.nsa.gov/ghidra
Keywords: binary compiler cryptor debugger decompiler disassembler ELF executable gdb ida-pro MACH MSDOS NSA OEP ollydbg open-source packer PEiD plugin reverse-engineering
Licenses: Apache
Conflicts: ghidra, ghidra-desktop, ghidra-dev
Provides: ghidra
Submitter: flacks
Maintainer: encounter (class101)
Last Packager: class101
Votes: 8
Popularity: 0.000153
First Submitted: 2019-04-05 17:25 (UTC)
Last Updated: 2022-02-20 12:46 (UTC)

Dependencies (7)

Sources (4)

Pinned Comments

encounter commented on 2020-10-01 07:53 (UTC)

All packages for Ghidra require Java 11. (package jdk11-openjdk)

You can set the active Java version using archlinux-java set java-11-openjdk

Latest Comments

nullableVoidPtr commented on 2022-08-02 18:29 (UTC)

As of GP-2132, Ghidra now targets JDK 17.

22c22
<   'java-environment=17'
---
>   'java-environment=11'
61,62c61,62
<   if [[ ! $JDK_VERSION =~ 17\.0 ]]; then
<     echo "FAILURE: You seem to have jdk17 installed correctly but your system defaults to another java version. To enable jdk17 please type: sudo archlinux-java set java-17-openjdk"
---
>   if [[ ! $JDK_VERSION =~ 11\.0 ]]; then
>     echo "FAILURE: You seem to have jdk11 installed correctly but your system defaults to another java version. To enable jdk11 please type: sudo archlinux-java set java-11-openjdk"

class101 commented on 2021-06-30 03:10 (UTC) (edited on 2021-06-30 03:28 (UTC) by class101)

Hey friends in love with RE, I thought it would be useful here to promote a really good app.

Do you probably remember the tool called PEiD which was rather very useful under Windows to quickly analyze a PE executable file, if they were packed and with which packer.

There is now a much better equivalent under Linux, with support of MACH, ELF, PE binaries, plugins, entropy and signatures analysis and so much more,
it is called Detect It Easy[1] or DIE and I initialized its git repo aur/detect-it-easy-git here[2]

It's really worth a look guys, it's pretty amazing how many plugins the author and the community have included into this project, a great swiss army knife tool you could put in your library, and very actively developed :)

[1] https://horsicq.github.io
[2] https://aur.archlinux.org/packages/detect-it-easy-git

class101 commented on 2021-06-15 18:38 (UTC) (edited on 2021-06-15 18:39 (UTC) by class101)

Both issues should be fixed now, if you attempt to build with the wrong jdk you will get a message asking you to type archlinux-java set java-11-openjdk

Updated the conflict section too

Thank you for sharing ;)

Edit: The reason makedepends did not failed the build is because it just checks for the package presence, but is not checking which java version is actually the default version

ignapk commented on 2021-06-15 18:04 (UTC)

No problem, thanks :) Moreover, I noticed that this package seems to conflict with ghidra-desktop:

ghidra-git: /usr/share/applications/ghidra.desktop exists in filesystem (owned by ghidra-desktop)
ghidra-git: /usr/share/pixmaps/ghidra.png exists in filesystem (owned by ghidra-desktop)

class101 commented on 2021-06-15 18:01 (UTC) (edited on 2021-06-15 18:11 (UTC) by class101)

Yeah that's fine you fixed the problem on your end, but ideally the build must fail with something like "You java version is < 11" rather than letting you compile all and experience unexpected results.

Anyway thank you for reporting, will help to fix this

Edit: Ok I see what is wrong, it seems the makedepends only check for the presence of jdk11, but not if it is enabled :( Will try to find something better abou this.

ignapk commented on 2021-06-15 17:58 (UTC)

@class101 I had many different java versions installed, but java-8-jdk was set as active in archlinux-java, the issue was fixed when I ran archlinux-java set java-11-openjdk, I can reproduce and give a verbose log if that helps.

class101 commented on 2021-06-15 17:54 (UTC) (edited on 2021-06-15 17:58 (UTC) by class101)

Interesting because this is not supposed to happen.

we force java to v11 to compile, but not to run the app as the following code

makedepends=(
  'java-environment=11'
)

So it looks thee build did not failed with a java greater than 11 at compile time ???

Will do more testing about this once I get some times, maybe it is a side effect of allowing java>=11 in the dependencies, which would cancel the makedepends

ignapk commented on 2021-06-15 17:50 (UTC)

@class101 My problem was not using java-11, so I deleted my comment as the pinned one already mentions that it's necessary. Everything works fine now, sorry for the confusion.

class101 commented on 2021-06-15 17:46 (UTC)

@ignapk

Got your message, I have recompiled the project but I do not get this error. Did you lack a dependency ? If so let us know which one :)

class101 commented on 2021-06-03 09:54 (UTC)

Ty man, I thought it would be better to request java11 as makedeps, the user is then free to use the java version at runtime. E.g. When you run Eclipse, you run it under the highest Java version as a user, even if the IDE has been compiled with jdk11 or so. I have also updated the versionning system to match what is used with popular package, or sometimes the + is shown before the commit or extra informations but putting it everywhere makes the version a bit hard to read, I hope you don't mind :D

encounter commented on 2021-06-02 19:28 (UTC) (edited on 2021-06-02 19:29 (UTC) by encounter)

Thanks! I added you as a co-maintainer. I haven't been using -git much, so the help keeping up with upstream changes is appreciated.

class101 commented on 2021-06-02 18:49 (UTC)

@encounter

If you want I can help maintaining the package, debugger branch has been merged to the master so ghidra-dev has less use now and duplicates this one.

encounter commented on 2021-04-24 15:50 (UTC)

@grandchild Thanks for pointing that out, fixed now.

grandchild commented on 2021-04-24 15:37 (UTC)

the package doesn't seem to set the executable flag for /opt/ghidra/ghidraRun, which /usr/bin/ghidra links to, resulting in

$ ghidra
zsh: Permission denied: ghidra

encounter commented on 2021-04-22 16:17 (UTC)

Thanks for the changes @cwee.

aur/ghidra-dev provided a cleaner way of setting up dependencies, so I decided to go that route instead.

cwee commented on 2021-04-21 22:35 (UTC) (edited on 2021-04-21 22:36 (UTC) by cwee)

git master hasn't been building for me ever since this commit.

seems like some build paths moved, like ~/git/ghidra/flatRepo --> ~/git/ghidra/dependencies/flatRepo to name one. I've made some changes that fix the build issues for me, but I'm not sure if my fixes are complete.

class101 commented on 2021-02-24 14:02 (UTC)

Hope you don't mind @encounter,

I have set a new package ghidra-dev that will switch the branch from time to time when something interesting is in the work.

Currently it is on the debugger branch, the advance they have made on it is pretty amazing.

kriskras99 commented on 2021-01-24 19:16 (UTC)

2443.patch can be removed as the fix was merged into master in November (https://github.com/NationalSecurityAgency/ghidra/issues/2443#issuecomment-732500745)

encounter commented on 2020-10-01 07:53 (UTC)

All packages for Ghidra require Java 11. (package jdk11-openjdk)

You can set the active Java version using archlinux-java set java-11-openjdk

rageltman commented on 2020-09-26 18:55 (UTC)

All of the built (vs bin) ghidra packages in AUR appear to suffer from similar build issues:

[2020-09-26T18:28:39.003Z] > Task :Project:compileJava
[2020-09-26T18:28:39.006Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:224: error: reference to Record is ambiguous
[2020-09-26T18:28:39.009Z]  private Record getPropertyRecord(String propertyName) {
[2020-09-26T18:28:39.011Z]          ^
[2020-09-26T18:28:39.014Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.016Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:240: error: reference to Record is ambiguous
[2020-09-26T18:28:39.019Z]  private void putRecord(Record rec) {
[2020-09-26T18:28:39.022Z]                         ^
[2020-09-26T18:28:39.025Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.028Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:99: error: reference to Record is ambiguous
[2020-09-26T18:28:39.030Z]      Record rec = iterator.next();
[2020-09-26T18:28:39.033Z]      ^
[2020-09-26T18:28:39.036Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.039Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:108: error: reference to Record is ambiguous
[2020-09-26T18:28:39.041Z]      ArrayList<Record> list = new ArrayList<>();
[2020-09-26T18:28:39.044Z]                ^
[2020-09-26T18:28:39.047Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.050Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:129: error: reference to Record is ambiguous
[2020-09-26T18:28:39.053Z]      for (Record updatedRec : list) {
[2020-09-26T18:28:39.055Z]           ^
[2020-09-26T18:28:39.058Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.061Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:143: error: reference to Record is ambiguous
[2020-09-26T18:28:39.064Z]          Record rec = iterator.next();
[2020-09-26T18:28:39.067Z]          ^
[2020-09-26T18:28:39.070Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.073Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:188: error: reference to Record is ambiguous
[2020-09-26T18:28:39.076Z]                  Record rec = recIt.next();
[2020-09-26T18:28:39.079Z]                  ^
[2020-09-26T18:28:39.081Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.084Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:210: error: reference to Record is ambiguous
[2020-09-26T18:28:39.086Z]                  Record rec = recIt.next();
[2020-09-26T18:28:39.089Z]                  ^
[2020-09-26T18:28:39.092Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.094Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:267: error: reference to Record is ambiguous
[2020-09-26T18:28:39.097Z]              Record rec = getPropertyRecord(getName());
[2020-09-26T18:28:39.100Z]              ^
[2020-09-26T18:28:39.103Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.105Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:297: error: reference to Record is ambiguous
[2020-09-26T18:28:39.108Z]              Record rec = PROPERTY_SCHEMA.createRecord(new StringField(getName()));
[2020-09-26T18:28:39.111Z]              ^
[2020-09-26T18:28:39.114Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.116Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:323: error: reference to Record is ambiguous
[2020-09-26T18:28:39.119Z]          Record record = getPropertyRecord(optionName);
[2020-09-26T18:28:39.122Z]          ^
[2020-09-26T18:28:39.125Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.128Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/MetadataManager.java:38: error: reference to Record is ambiguous
[2020-09-26T18:28:39.130Z]              Record record = iterator.next();
[2020-09-26T18:28:39.133Z]              ^
[2020-09-26T18:28:39.136Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.138Z] /build/ghidra-git/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/MetadataManager.java:61: error: reference to Record is ambiguous
[2020-09-26T18:28:39.141Z]              Record record = SCHEMA.createRecord(id++);
[2020-09-26T18:28:39.144Z]              ^
[2020-09-26T18:28:39.146Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-26T18:28:39.149Z] Note: Some input files use or override a deprecated API.
[2020-09-26T18:28:39.152Z] Note: Recompile with -Xlint:deprecation for details.
[2020-09-26T18:28:39.155Z] 13 errors

dmidge commented on 2020-06-02 20:05 (UTC)

Well, on my side, it can't find fstream... Why?

flacks commented on 2019-08-16 17:17 (UTC) (edited on 2019-08-16 17:18 (UTC) by flacks)

pokexpert, make sure you have enough system RAM available, ensure you have Java 11 or 12 selected as your system's default, and ensure your system is fully up-to-date. If you've checked all those, try building Ghidra in a clean chroot. I just successfully built and ran Ghidra a few moments ago in a clean chroot, so I can assure you the build instructions are correct, and that your build failure must be something particular to your system configuration.

pokexpert commented on 2019-08-16 10:53 (UTC) (edited on 2019-08-16 10:53 (UTC) by pokexpert)

I cant install it. It always fail on gladle build with super-strange compilation errors like : sstream : No file or directory 25 | #include <sstream> | ^~~~~~~~~

flacks commented on 2019-08-12 23:00 (UTC)

algebro, the package has been updated since your comment, should definitely build now.

algebro commented on 2019-08-05 16:29 (UTC)

I'm getting the following error trying to build this package:

FAILURE: Build failed with an exception.

* Where:
Build file '/home/algebro/.cache/yay/ghidra-git/src/ghidra/build.gradle' line: 336

* What went wrong:
Could not compile build file '/home/algebro/.cache/yay/ghidra-git/src/ghidra/build.gradle'.
> startup failed:
  build file '/home/algebro/.cache/yay/ghidra-git/src/ghidra/build.gradle': 336: expecting '}', found '' @ line 336, column 1.
  1 error

It looks like there's a missing curly brace or something in the allprojects{} patch added from the PKGBUILD?

flacks commented on 2019-07-02 23:58 (UTC)

C0rn3j I didn't run into that issue when using jdk11. But the commit mumbel mentioned did make it into the tree, so try again if the build still failed for you.

mumbel commented on 2019-07-02 22:25 (UTC) (edited on 2019-07-02 22:26 (UTC) by mumbel)

@C0rn3j noticed this as well and submitted a bug report, should be fixed in 11f1a824a72c0930bde8930866fbe297f3644688

kriskras99 commented on 2019-06-11 13:42 (UTC)

@C0rn3j you should set jdk11 as your default java env, it does not work with lower versions

C0rn3j commented on 2019-06-11 13:37 (UTC)

Fails to build https://haste.rys.pw/raw/bikihavora

Could not determine the dependencies of task ':8051:compileJava'.

remitamine commented on 2019-06-09 02:29 (UTC)

missing bison and flex dependencies from makedepends. https://github.com/NationalSecurityAgency/ghidra/blob/master/DevGuide.md#building-the-natives

Philzli commented on 2019-06-04 10:39 (UTC)

Haha, the build fails if you start it on one day and end it on another.

maarroyo commented on 2019-05-25 04:29 (UTC) (edited on 2019-05-25 04:29 (UTC) by maarroyo)

For those interested in headless mode you may want to run the following:

$ ln -s /opt/ghidra/support/analyzeHeadless /usr/bin/ghidra-analyzeHeadless

flacks commented on 2019-05-16 21:54 (UTC)

kriskras99, I added a build instruction for the missing native components. thanks!

kriskras99 commented on 2019-05-04 12:05 (UTC) (edited on 2019-05-04 12:06 (UTC) by kriskras99)

If you get an error about being unable to demangle function names because of a FileNotFoundException, you should do the following:

$ cd $SRC_DIR/GPL/DemanglerGnu/

$ gradle build

$ cp -r build/os /opt/ghidra/Ghidra/Features/GnuDemangler

This should probably be fixed in the PKGBUILD, but I do not know the correct way to do this.

PyroLagus commented on 2019-05-03 15:35 (UTC) (edited on 2019-05-03 16:07 (UTC) by PyroLagus)

Here is another patch I sent that I'll leave here until the PKGBUILD gets updated: <link was here>

EDIT: since the patch is upstream now, I've deleted the link to the patch.

PyroLagus commented on 2019-04-26 15:33 (UTC)

Could you add provides=('ghidra') to ghidra-git and ghidra-bin? That would make packaging scripts, plugins, and ISA definitions nicer.

PyroLagus commented on 2019-04-18 23:54 (UTC) (edited on 2019-04-19 01:20 (UTC) by PyroLagus)

Because a recent commit made this PKGBUILD stop working (https://github.com/NationalSecurityAgency/ghidra/commit/ba98e8542998cdfe3f8c6891e243f53885648aef), I took the liberty of writing a patch for the PKGBUILD. I've just emailed it to flacks, but I linked it below, so you can use it until the upstream PKGBUILD gets patched.

<link was here>

EDIT: since the patch is upstream now, I've deleted the link to the patch.

flacks commented on 2019-04-06 23:28 (UTC)

neven, thanks for your remarks. I added the FID datasets as per your suggestion. Regarding Jython, yes, Gradle downloads and embeds Jython 2.7.1 during the build, so it's not a package dependency. Whether or not that is a bug that needs fixing is subjective :) it's probably best to have an embedded environment as it requires less catering to methods for accessing Jython on all 3 supported OS's.

neven commented on 2019-04-06 21:30 (UTC)

Actually, it seems Gradle downloads Jython even when it is installed and in PATH. That should probably be fixed upstream?

neven commented on 2019-04-06 21:03 (UTC)

Another thing: Gradle seems to try to download Jython when I run makepkg with this PKGBUILD, so probably Jython should be a dependency.

neven commented on 2019-04-06 20:00 (UTC)

Thanks for your work!

It would be good to also include https://github.com/NationalSecurityAgency/ghidra-data

FID.md in that repo says that the datasets for Ghidra's Function Identification analyzer can be copied to ghidra.bin/Ghidra/Features/FunctionID/src/main/fidb , where ghidra.bin is a sibling directory of your clone of ghidra.