Opened 12 years ago

Closed 12 years ago

#32560 closed submission (fixed)

radare2 @0.9 New submission

Reported by: g5pw (Aljaž Srebrnič) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: pixilla (Bradley Giesbrecht), ryandesign (Ryan Carsten Schmidt)
Port: radare2

Description

This is a basic portfile for the amazing reverse-engineering software made by pancake and his team! It does not include bindings, I will add them as soon as possible!

First portfile ever. Open for suggestions!

Attachments (3)

Portfile (790 bytes) - added by g5pw (Aljaž Srebrnič) 12 years ago.
Portfile.2 (1.0 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
revised portfile proposal
patch-libr-db-sdb-src-Makefile.diff (336 bytes) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.

Download all attachments as: .zip

Change History (11)

Changed 12 years ago by g5pw (Aljaž Srebrnič)

Attachment: Portfile added

comment:1 Changed 12 years ago by pixilla (Bradley Giesbrecht)

Keywords: radare2 removed

a2piratesoft: Your Portfile matches our guide very well. Thanks.

Does radare2 installed by your Portfile work for you? It seems to me that the compiled binaries have incorrect library paths.

$ otool -L ./work/destroot/opt/local/lib/radare2/0.8.6/bin_elf64.dylib 
./work/destroot/opt/local/lib/radare2/0.8.6/bin_elf64.dylib:
	bin_elf64.dylib.0.8.6 (compatibility version 0.0.0, current version 0.0.0)
	libr_util.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

comment:2 Changed 12 years ago by g5pw (Aljaž Srebrnič)

Hmm... yes, it does! However, this could be a false positive because I installed it previously, then uninstalled but maybe some libraries weren't removed. Will check now!

comment:3 Changed 12 years ago by g5pw (Aljaž Srebrnič)

Removed all files, removed radare2 and reinstalled radare2 from macports. No problem whatsoever, radare2 seems to run just fine for me!

comment:4 Changed 12 years ago by pixilla (Bradley Giesbrecht)

I do not know how to use radare2. Here is what I see:

$ radare2
dyld: Library not loaded: libr_core.dylib
  Referenced from: /opt/local/bin/radare2
  Reason: image not found
Trace/BPT trap

$ otool -L /opt/local/bin/radare2 
/opt/local/bin/radare2:
	libr_core.dylib (compatibility version 0.0.0, current version 0.0.0)
...
	/opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
...

Usually it would be a full path to libr_core.dylib like the path /opt/local/lib/libssl.1.0.0.dylib

comment:5 Changed 12 years ago by g5pw (Aljaž Srebrnič)

Hmm.. interesting! looking into it now...

comment:6 Changed 12 years ago by g5pw (Aljaž Srebrnič)

Looks like some issues with the configure script, I contacted the developer, will keep you posted!

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: Portfile.2 added

revised portfile proposal

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: pixilla@… ryandesign@… added

I'm attaching a revised Portfile proposal with these changes from the original:

  • Fixed whitespace to use only spaces not tabs and rearranged some lines
  • Used modern checksum types
  • Fixed license
  • Adjusted descriptions
  • Adjusted homepage and master_sites
  • Added dependencies on libraries that get used
  • Added args and a patchfile to ensure we're UsingTheRightCompiler and -arch flags
  • Disabled universal variant and explained why; this could possibly be reinstated later using the muniversal portgroup

There still remain issues. The install_name of the libraries is wrong, as Bradley mentioned, because the build process only passes the library name in the -install_name argument, when it needs to be passing the entire absolute path the library will ultimately be installed at. The build process also is not passing the -compatibility_version and -current_version flags when building the libraries, which it should be doing. Finally, the library names have the version number at the end (i.e. bin_elf64.dylib.0.8.6) which might be how things are done on Linux but is not correct on OS X (we use e.g. bin_elf64.0.8.6.dylib).

comment:8 Changed 12 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: newclosed

g5pw == a2piratesoft, so I can now take care of this :)

Note: See TracTickets for help on using tickets.