-
Notifications
You must be signed in to change notification settings - Fork 143
support building on newer Linux systems and Makefile cleanups #116
Conversation
- try to share some bits between different makefiles, make modifying global compiler flags not such a huge pain. - directly specify we should be using the gold rather than bpf linker - make compiler output largely quiet except where we care - allow warnings to actually be visible - don't delete downloaded tarballs with --really-clean - add missing dependencies between libraries (--no-add-needed/--no-copy-dt-needed-entries causes lots of trouble) - update readme to show what to install to build I made minimal changes to the loader makefile - it breaks easily. -Os prevents if from being able to load libc, for instance
Hmm, it failed on whatever travis runs - time to play whack-a-build :) |
Test PASSED. |
Test PASSED. |
Giving a chance to it! |
I need to compile on different platforms and test some ubuntu / fedora versions, will land if no stoppers, look good to me =) |
Working on fedora 15:
|
Fedora 20 (64 bits)
|
Ubuntu 14.04:
Coolio! :-) I'm try to compile on other systems now ! |
=) |
When compiling on fedora 15:
Which according to what I discussed @bcook-r7 has sense. Honestly I feel like it's better to have meterpreter compiling without special tweaking/problems on modern distributions, even when the use-ld option could be not available on older distributions with older gcc toolchains... |
Build on Fedora 20 has been successful: The built binaries work on fedora:
And ubuntu 14.04:
|
Definitely it's much better than the actual built I think, even when the build will fail on older gcc chains (see Fedora 15). Maybe worths to add some documentation to the Readme.md with some guidance about where to build the linux flavor of meterpreter =) |
Hmm, I thought I took care of older compilers with this one little trick that dentists hate: 9c15923 That was largely to make Travis CI happy, guess I missed a spot. |
@bcook-r7 ooom damnit maybe my fault, stopped the build after seeing that message. Re-run it an got an wget stopper after that message..., really? xD
|
maybe it couldn't verify the current openssl certificate at that time :? I dunno for sure... |
Nah, fedora 15 probably really has outdated SSL certs and actually can't verify properly. But, it feels wrong to download an SSL library without checking its validity. Would anyone get mad if I just checked in the darn tarballs somewhere? The first message is just the makefile checking if -fuse-ld-gold is accepted by the compiler, not an actual error :) |
@bcook-r7 coolio :-) so that's all! Really nice PR! |
@bcook-r7 Does this support building binaries that run on really old kernels? (2.4.x) |
@hmoore-r7 @bcook-r7 wanted to say yes :P, but I had to check... I'm a coward...
|
@bcook-r7 @hmoore-r7 binaries can be tested from this branch rapid7/metasploit-framework#4600 btw, @bcook-r7 should review that PR, just to be sure the binaries I'm attaching are good, or if there is just a procedure I'm forgetting to update binaries :) |
@jvazquez-r7 thanks! |
Hopefully the last manual build before packaging the Linux bins into meterpreter_bins as well. This includes all of the fixes and improvements over the past month. rapid7/meterpreter#116 rapid7/meterpreter#117 rapid7/meterpreter#121 rapid7/meterpreter#124
This fixes some issues building Meterpreter under recent linux distributions and quiets some of the noise to make further development feasible.
I made minimal changes to the loader makefile - it breaks easily.
-Os prevents if from being able to load libc, for instance
Verification Steps
On Ubuntu 14.04 or Fedora 21 x64, try these things:
Build should look a little nicer, it stashes a lot of the 3rd party build noise into log files:
Though the extensive use of 'HANDLE' in a unix environment is imperfect, so there are lots of bad casts and things that will be solved later. My editor also auto-deletes trailing whitespace on save, so sorry in advance for the noise.