|
From: Jannick <thi...@gm...> - 2016-10-02 08:53:33
|
> From: Eli Zaretskii [mailto:el...@gn...] > Sent: Sunday, October 2, 2016 8:58 AM > > Here a way to get the initial main.c (see the initial posting) > > compiled purely with MinGW (i.e. without any reference to msys if I am > > not missing anything behind the scenes) and a linking a freshly > > compiled GNU binutils package (from > > https://www.gnu.org/software/binutils, v2.27 as of today). In a msys > > shell I compiled the package with > > > > ./configure --disable-nls > > make > > These two commands need MSYS to run correctly, because otherwise you > won't have Posix-compliant shell, Make, and other utilities needed for the > build. Fully agree for the first step creating necessary libraries to then compile main.c with *MinGW*. This is why I did it this way. > > (I am hesitating to run 'make install' after passing > > '--prefix=C:/MinGW' to ./configure to not overwrite other files and > > executables). > > No need to hesitate: just say > > make install prefix=/some/where/else > > to get everything installed in that other place. Well, I have not checked that due to potentially concurring versions of libraries shipped with MinGW on one hand and those sitting in the other folder as you proposed on the other hand. But certainly a good idea to give it a try. Thanks for this. > > I guess it would be great to push that - if possible - thru the MinGW > > package in one of the next MinGW releases. But this is certainly up to > > the maintainers, of course. > > To push what? addr2line is already included in the Binutils distribution, so > what else is needed? I cannot find the library (lib)addr2line.a in my MinGW distribution which I intended this thread to be all about as indicated in its subject and in the very first posting. Of course, there is addr2line.exe which is a different story though. Happy to see how to load (lib)addr2line.a, because I could not find how to do. > (I'm not a MinGW maintainer.) Happy to add here again what appears to be missing in the MinGW distribution: So what would be great to have is libbfd.a including its required dependencies (such as libliberty.a) such that the MinGW compilation of, say, the sample program main.c in the first posting works. The workaround using a GNU binutils package newly compiled with msys as proposed above (overcoming the link error to intl, too) apparently provides for these requirements, but it would be great to have that in the MinGW distribution. Given that MinGW does currently ship libbfd.a and bfd.h, however without sufficient dependencies to link with, it might be an objective of the MinGW distribution. I hope that this could clarify. Sorry for having been too sloppy in the first place. I am wide open for other solutions to link with (lib)bfd.a with MinGW's linker, of course. Thanks, J. |