Comments (15)
I would love to have Windows support, both for building/running on Windows and for analyzing Windows executables.
I'd be happy to take patches to make Bloaty compile on Cygwin and/or MSVC, and any bugfixes for those platforms. I'd also be happy to take patches that enable automated Windows testing on AppVeyor.
I would be curious to know why Cygwin requires -gnu++11
instead of c++11
.
from bloaty.
@andrew-donnell I solved it by building bloaty in Ubuntu in WSL instead.
from bloaty.
In that case the first step (imo) would be to add CMake support,
so that we do not have to use cygwin to build on windows.
(I am suggesting CMake because both dependencies support that).
After that:
- Edit the CMake configuration so that it works for windows (msvc)
- Make it build for windows (msvc)
- Setup AppVeyor builds
bloaty needs gnu++11 because otherwise __bswap_32
(and 16, 64) are not defined.
re2 needs it for the RW locks.
from bloaty.
Sounds good. I don't know anything about CMake, but all of that sounds great and patches are welcome!
I think I would prefer to keep the existing Makefile also, so that CMake is not a hard dependency on Linux / OS X.
from bloaty.
After looking into it some more:
Creating a (working) cmake configuration for windows/msvc is fairly simple, but then some problems with some of the design choices present themselves:
- Minimum version is visual studio 2015 (because of
constexpr
) - c++filt does not exist on windows, so that mechanism wont fly.
- Without cygwin, the fork / pipe kinda functions are not going to work on windows.
For the demangling, maybe __cxa_demangle
could be used? (and preferably as library, so that windows can use it as well!)
One minor issue:
msvc is choking on the construction from BuildActionBuf:
syntax error: identifier 'IndexSequence<,unsigned int, ?? >' src\dwarf.cc:1353
from bloaty.
Thanks for looking into it!
- How many people have VS2015? It is unreasonable to require VS2015?
- How many changes are required to support an earlier version of VS? I don't think there is anywhere that
constexpr
is integral to the design of Bloaty. - Yes definitely we'd need some other way of demangling on Windows. It looks like there is a
UnDecorateSymbolName()
function available. - Even on Linux it would be nice to link in the demangler instead of shelling out. I bet we could extract the demangling code from LLVM llvm/lib/Demangle/ItaniumDemangle.cpp to avoid shelling out to
c++filt
. - fork/pipe are only necessary if we're shelling out, but if we have native file readers on for both files and symbols, that shouldn't be a problem.
Hmm, it's hard to know what MVSC is complaining about in BuildActionBuf. I have a virtual machine with Windows installed but I'm having troubles using the community edition of MSVC.
from bloaty.
- VS2015 is not unreasonable, however I do not have that at home.
- VS2013 should be reasonable to support, constexpr should be removed and it looks like some vararg template constructions are not entirely supported.
- UnDecorateSymbolName is an option on windows, however it will only demangle MSVC symbols.
I have cloned your repository, added the initial cmake + appveyor stuff in it, and gave you push access (so that you can test stuff).
from bloaty.
If it adds anything to this conversation, I was able to get everything to build in msys2 + mingw-w64, besides needing to define WEXITED. I need to do some more to see if it actually works and I'm not really sure why I was expecting it to run on PE files (duh, on my part). It does work pretty nicely on my ARM elf files though.
from bloaty.
This might be a better first step then!
Initially I tried with cygwin because I did not know that msys2 has support for popen and that kinda stuff,
but the cygwin builds crashed when testing it.
That is why I moved on to trying msvc.
@Phyllostachys : Are the cmake files in https://github.com/learn-more/bloaty needed at all to get this working? (I assume not)
from bloaty.
Correct, I didn't use any cmake files, just the makefile that comes with the repo. I think I found this issue after that fact or else I would have tried those too.
from bloaty.
In case someone needs a bloaty-like tool for MSVC-compiled binary right now, I can recommend SymbolSort. It works on .obj files (via dumpbin
) or compiled binaries with PDB symbols.
from bloaty.
I'd like to be able to use bloaty to analyze android elf binaries on Windows. I'm getting these errors: Command line error D8004: '/W' requires an argument
from bloaty.
Any tips on building on Windows? I used cygwin to clone, but I'm running into issues building in MSVS. I keep getting:
Error D8004: '/W' requires an argument
or
Error D8021: 'invalid numeric argument '/Wno-sign-compare'.
from bloaty.
I'd like to be able to use bloaty to analyze android elf binaries on Windows. I'm getting these errors:
Command line error D8004: '/W' requires an argument
@parbo I had the same issue. I was able to resolve in VS by going into properties and adding an argument (could also be done by modifying the cmake .txt file) but then I ran into the Error D8021: 'invalid numeric argument '/Wno-sign-compare'
issue. When I took that out, all hell broke loose 😝
from bloaty.
@haberman this is solved now
from bloaty.
Related Issues (20)
- Add SORTBY option for vm and file size diffs
- bloaty broken on ubuntu 22.04 HOT 3
- Overflow in vm range HOT 1
- Total size in compare dont show correctly ! HOT 1
- Allow builders to prefer using system libraries
- Build broken on Arch Linux with ABSL_ASSUME errors from protobuf headers HOT 3
- Compiling under C++17 produces hundreds of warnings
- Plus sign confusing when size decreased
- zlib build failure when using bundled version HOT 1
- Size diff broken after PR #313 "Preserve Size Information During Diff"
- `couldn't find abbreviation for code` when run with `-d compileunits`
- Add support for DWARF form 30
- this tool support for windows? HOT 1
- --raw-map option missing from help string
- crash on reversed high_pc/low_pc with -d compileunits
- error building due to refinition in abseil-cpp/absl/numeric/int128.cc
- How to read the debuginfo from the Chromium output object file
- Bloaty accepts `-n 0` but not `max_rows_per_level: 0` when using `-c` option
- OSS-Fuzz issue 68551
- Cannot build bloaty on my Amazon Linux 2 docker image due to dwarf util error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bloaty.