|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Difficulty cross-compilingHello,
I'm trying to cross-compile a library that uses GNU Autotools (Google Coredumper, to be specific) for PPC using the MontaVista tool chain. The sequence of commands I'm following is: $ ./configure --host=ppc CC=/path/to/gcc CXX=/path/to/g++ $ make $ [next step would normally be "make install"] For a normal (not cross-compile) configuration, issuing "make" causes a .libs/ directory to be generating containing .a, .o, and .so files (and variants thereof). When I cross-compile for PPC, the directory is created and populated with a .a file, but no .so files. I can see .o and .lo files being generated, so the code *is* getting compiled, but the linking stage gets skipped. When I review the make output, there are no error messages or warnings-the commands related to the .so files are simply missing. I've tried additionally manually specifying paths for the other components of the GNU toolchain (linker, assembler, etc.) and, at the suggestion of the people on the CLFS mailer, I've tried running ./configure with -enable-shared="yes" -enable-static="no". None of these suggestions have helped. *Summary*: When I try to cross-compile, make mysteriously and silently skips one or more parts of the build. (If I build for the same architecture, it works fine.) I've tried diff-ing the Makefiles generated by ./configure for the different architectures, and they look the same (other than the paths to the compiler executables being different). I've also tried grepping the Makefiles for the relevant commands that I see in the output; I get no matches in either Makefile, so Autotools is doing something arcane here. Any input would be appreciated. --- William Tracy |
|
|
Re: Difficulty cross-compilingHi William,
On 10/12/2009 12:26 PM, William Tracy (wtracy) wrote: > I'm trying to cross-compile a library that uses GNU Autotools (Google > Coredumper, to be specific) for PPC using the MontaVista tool chain. The > sequence of commands I'm following is: > > $ ./configure --host=ppc CC=/path/to/gcc CXX=/path/to/g++ > > $ make > > $ [next step would normally be "make install"] > > For a normal (not cross-compile) configuration, issuing "make" causes a > .libs/ directory to be generating containing .a, .o, and .so files (and > variants thereof). When I cross-compile for PPC, the directory is > created and populated with a .a file, but no .so files. I can see .o and > .lo files being generated, so the code *is* getting compiled, but the > linking stage gets skipped. When I review the make output, there are no > error messages or warnings-the commands related to the .so files are > simply missing. > You don't state your target OS, only the CPU architecture, and I'm not familiar with MontaVista, so I'm not sure I'm helping here. But if your target platform is AIX, or anything like it, you may be experiencing AIX-library-naming-difference syndrome - a sense of disorientation associated with not being able to find your AIX shared libraries after building. ;-) The default library extension for some versions of AIX is .a. These .a files contain the equivalent of standard Unix static /and dynamic/ libraries. Thus, on AIX/PPC, .a files are dynamically loaded just like .so files on Solaris or Linux. The .a files also contain the static objects linked into a binary when static linking is requested. Regards, John |
|
|
RE: Difficulty cross-compilingThis is a semi-embedded Linux system that I am trying to build for.
MontaVista is a Linux distribution that also provides a cross-compiling toolchain--their own builds of the GNU toolchain, really. Their build follows their own interesting naming convention, which isn't making this simpler. >_< Thanks for the reply, though. --- William Tracy -----Original Message----- From: John Calcote [mailto:john.calcote@...] Sent: Monday, October 12, 2009 12:00 PM To: William Tracy (wtracy) Cc: automake@... Subject: Re: Difficulty cross-compiling You don't state your target OS, only the CPU architecture, and I'm not familiar with MontaVista, so I'm not sure I'm helping here. But if your target platform is AIX, or anything like it, you may be experiencing AIX-library-naming-difference syndrome - a sense of disorientation associated with not being able to find your AIX shared libraries after building. ;-) The default library extension for some versions of AIX is .a. These .a files contain the equivalent of standard Unix static /and dynamic/ libraries. Thus, on AIX/PPC, .a files are dynamically loaded just like .so files on Solaris or Linux. The .a files also contain the static objects linked into a binary when static linking is requested. Regards, John |
|
|
Re: Difficulty cross-compilingOn 10/12/2009 08:26 PM, William Tracy (wtracy) wrote:
> Hello, > > > > I'm trying to cross-compile a library that uses GNU Autotools (Google > Coredumper, to be specific) for PPC using the MontaVista tool chain. The > sequence of commands I'm following is: > > > > $ ./configure --host=ppc CC=/path/to/gcc CXX=/path/to/g++ Normally, a cross-toolchain's tools are called <host>-<tool> i.e. * one normally doesn't have to set CC nor CXX. * the value being passed to --host is the tool prefix and therefore must match the tool-prefix being used by your toolchain. Ralf |
|
|
Re: Difficulty cross-compilingWilliam,
I did a lot of what you are talking about when I was there - do you have access to any of the ATC stuff? H |
|
|
RE: Difficulty cross-compilingProbably not, but I could poke around and see.
I suspect I ultimately need to grab someone from our build team and get them to escalate this to MontaVista; I thought I'd try on a few mailers first and see if I might get a response without going through multiple layers of indirection. :-P Ralph: MontaVista's binaries seem to follow the naming convention <arch>-<variant>-linux-gnu-<app>. I haven't figured out yet what flags to pass to ./configure to make it work, so I've just been explicitly specifying which binaries to use. :-P --- William Tracy -----Original Message----- From: Harlan Stenn [mailto:stenn@...] Sent: Tuesday, October 13, 2009 6:31 PM To: William Tracy (wtracy) Cc: John Calcote; automake@... Subject: Re: Difficulty cross-compiling William, I did a lot of what you are talking about when I was there - do you have access to any of the ATC stuff? H |
| Free embeddable forum powered by Nabble | Forum Help |