|
From: James T. <jam...@gm...> - 2009-01-05 18:41:50
|
what does the following error mean? crt2.o: file not recognized: File format is ambiguous crt2.o: matching formats: coff-i386 pe-i386 from the following command: ld -mi386pe --oformat pei-i386 --subsystem console -s crt2.o <snip(more .o's)> -o file.exe ld shows the following: supported emulations: elf_i386_ldso elf_i386 elf_x86_64 i386pe supported targets: elf32-i386 coff-i386 elf64-x86-64 elf64-little elf64-big elf32-little elf32-big pe-i386 pei-i386 srec symbolsrec tekhex binary ihex OS: solaris 10 x86 binutils: 2.19 from mingw gcc: 3.4.6 TIA, -James -- -- Eddie Izzard - "I grew up in Europe, where the history comes from." |
|
From: Kai T. <kti...@go...> - 2009-01-05 19:06:39
|
2009/1/5 James Trickel <jam...@gm...>: > what does the following error mean? > > crt2.o: file not recognized: File format is ambiguous > crt2.o: matching formats: coff-i386 pe-i386 > > from the following command: > > ld -mi386pe --oformat pei-i386 --subsystem console -s crt2.o > <snip(more .o's)> -o file.exe > > ld shows the following: > supported emulations: elf_i386_ldso elf_i386 elf_x86_64 i386pe > supported targets: elf32-i386 coff-i386 elf64-x86-64 elf64-little > elf64-big elf32-little elf32-big pe-i386 pei-i386 srec symbolsrec > tekhex binary ihex > > OS: solaris 10 x86 > binutils: 2.19 from mingw > gcc: 3.4.6 > > TIA, > -James > > -- > -- > Eddie Izzard - "I grew up in Europe, where the history comes from." > > ------------------------------------------------------------------------------ > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > > _______________________________________________ > This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists. > We ask that you be polite and do the same. > Hi James, you have to add the option '-m i386pe' here. You need to specify the emulation to be used directly, because ld has otherwise conflicts to find the proper emulation. By specifying this option, it should work. Cheers, Kai -- | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | (")_(") him gain world domination |
|
From: James T. <jam...@gm...> - 2009-01-05 19:24:56
|
On Mon, Jan 5, 2009 at 2:05 PM, Kai Tietz <kti...@go...> wrote: > 2009/1/5 James Trickel <jam...@gm...>: >> what does the following error mean? >> >> crt2.o: file not recognized: File format is ambiguous >> crt2.o: matching formats: coff-i386 pe-i386 >> >> from the following command: >> >> ld -mi386pe --oformat pei-i386 --subsystem console -s crt2.o >> <snip(more .o's)> -o file.exe >> >> ld shows the following: >> supported emulations: elf_i386_ldso elf_i386 elf_x86_64 i386pe >> supported targets: elf32-i386 coff-i386 elf64-x86-64 elf64-little >> elf64-big elf32-little elf32-big pe-i386 pei-i386 srec symbolsrec >> tekhex binary ihex >> >> OS: solaris 10 x86 >> binutils: 2.19 from mingw >> gcc: 3.4.6 >> >> TIA, >> -James >> >> -- >> -- >> Eddie Izzard - "I grew up in Europe, where the history comes from." > > Hi James, > > you have to add the option '-m i386pe' here. You need to specify the > emulation to be used directly, because ld has otherwise conflicts to > find the proper emulation. By specifying this option, it should work. > > Cheers, > Kai > I'm confused..... The command I am using(below) has the '-mi386pe' option... am I missing something? >> ld -mi386pe --oformat pei-i386 --subsystem console -s crt2.o >> <snip(more .o's)> -o file.exe TIA, -James -- -- Paula Poundstone - "I don't have a bank account because I don't know my mother's maiden name." |
|
From: Kai T. <kti...@go...> - 2009-01-05 19:53:35
|
2009/1/5 James Trickel <jam...@gm...>: > On Mon, Jan 5, 2009 at 2:05 PM, Kai Tietz <kti...@go...> wrote: >> 2009/1/5 James Trickel <jam...@gm...>: >>> what does the following error mean? >>> >>> crt2.o: file not recognized: File format is ambiguous >>> crt2.o: matching formats: coff-i386 pe-i386 >>> >>> from the following command: >>> >>> ld -mi386pe --oformat pei-i386 --subsystem console -s crt2.o >>> <snip(more .o's)> -o file.exe >>> >>> ld shows the following: >>> supported emulations: elf_i386_ldso elf_i386 elf_x86_64 i386pe >>> supported targets: elf32-i386 coff-i386 elf64-x86-64 elf64-little >>> elf64-big elf32-little elf32-big pe-i386 pei-i386 srec symbolsrec >>> tekhex binary ihex >>> >>> OS: solaris 10 x86 >>> binutils: 2.19 from mingw >>> gcc: 3.4.6 >>> >>> TIA, >>> -James >>> >>> -- >>> -- >>> Eddie Izzard - "I grew up in Europe, where the history comes from." >> >> Hi James, >> >> you have to add the option '-m i386pe' here. You need to specify the >> emulation to be used directly, because ld has otherwise conflicts to >> find the proper emulation. By specifying this option, it should work. >> >> Cheers, >> Kai >> > > I'm confused..... > The command I am using(below) has the '-mi386pe' option... am I > missing something? > >>> ld -mi386pe --oformat pei-i386 --subsystem console -s crt2.o >>> <snip(more .o's)> -o file.exe > > TIA, > -James > -- > -- > Paula Poundstone - "I don't have a bank account because I don't know > my mother's maiden name." > > ------------------------------------------------------------------------------ > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > > _______________________________________________ > This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists. > We ask that you be polite and do the same. > I am not sure, maybe a space? Kai -- | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | (")_(") him gain world domination |
|
From: Earnie B. <ea...@us...> - 2009-01-06 13:04:56
|
Quoting Kai Tietz <kti...@go...>: >> _______________________________________________ >> This list observes the Etiquette found at >> http://www.mingw.org/Mailing_Lists. >> We ask that you be polite and do the same. >> > > I am not sure, maybe a space? > Along with top posting the Etiquette sited in every recent list mail states that you should trim your posting. Leaving the message trailers isn't quite trimmed. Your response is quite lost with the rest of the message. Earnie |
|
From: James T. <jam...@gm...> - 2009-01-06 14:30:08
|
Sorry about not following the Etiquette. I tried adding a space to the '-mi386pe' option '-m i386pe' and I get the same results. crt2.o: file not recognized: File format is ambiguous crt2.o: matching formats: coff-i386 pe-i386 The command I am using: ld -m i386pe --oformat pei-i386 --subsystem console -s crt2.o .... (multiple *.o's) -o file.exe On Mon, Jan 5, 2009 at 8:44 PM, JonY <10...@gm...> wrote: > Shouldn't it be "i686-pc-mingw-ld" rather than just "ld". I am assuming > you are cross-compiling on a Solaris machine for Windows. > You may need to install a cross-assembler as well. This is from the third party 'maven-launch4j-plugin'. The above command works on linux and solaris sparc. Also, the above packages the 'ld' and 'windres' commands only for linux and sparc. I have tried to contact the maintainer to no avail. I built the binutils and simply followed the 'maven-launch4j-plugin' method of packaging the 'ld/windres' binaries. I built binutils with the following: configure --enable-targets=i686-pc-mingw32 --disable-nls binutils/ld/ld-new binutils/binutils/windres I then copied these to the 'maven-launch4j-plugin' configuration to create the required pkgs. hope the above makes a little more sense at what I am doing. -James -- Everett Dirksen - "A billion here, a billion there, and pretty soon you're talking about real money." |
|
From: JonY <10...@gm...> - 2009-01-06 14:59:18
|
On 1/6/2009 22:30, James Trickel wrote: > Sorry about not following the Etiquette. > > I tried adding a space to the '-mi386pe' option '-m i386pe' and I get > the same results. > crt2.o: file not recognized: File format is ambiguous > crt2.o: matching formats: coff-i386 pe-i386 > > The command I am using: > ld -m i386pe --oformat pei-i386 --subsystem console -s crt2.o .... > (multiple *.o's) -o file.exe > > On Mon, Jan 5, 2009 at 8:44 PM, JonY<10...@gm...> wrote: >> Shouldn't it be "i686-pc-mingw-ld" rather than just "ld". I am assuming >> you are cross-compiling on a Solaris machine for Windows. > >> You may need to install a cross-assembler as well. > > This is from the third party 'maven-launch4j-plugin'. The above > command works on linux and solaris sparc. Also, the above packages the > 'ld' and 'windres' commands only for linux and sparc. I have tried to > contact the maintainer to no avail. I built the binutils and simply > followed the 'maven-launch4j-plugin' method of packaging the > 'ld/windres' binaries. > > I built binutils with the following: configure > --enable-targets=i686-pc-mingw32 --disable-nls > binutils/ld/ld-new > binutils/binutils/windres > I then copied these to the 'maven-launch4j-plugin' configuration to > create the required pkgs. > > hope the above makes a little more sense at what I am doing. > -James Hi, You should pass "--build=<local triplet> --host=<local triplet> --target=i686-pc-mingw32" to binutils configure instead. Not too sure what's the triplet for Solaris on X86, i386-pc-solaris2.11 maybe? You should end up with the cross assemblers which will work right for Windows out of the box. The cross-linker executable should be visible as i686-pc-mingw32-ld after you install it. |
|
From: JonY <10...@gm...> - 2009-01-06 02:26:10
|
On 1/6/2009 02:41, James Trickel wrote: > what does the following error mean? > > crt2.o: file not recognized: File format is ambiguous > crt2.o: matching formats: coff-i386 pe-i386 > > from the following command: > > ld -mi386pe --oformat pei-i386 --subsystem console -s crt2.o > <snip(more .o's)> -o file.exe > > ld shows the following: > supported emulations: elf_i386_ldso elf_i386 elf_x86_64 i386pe > supported targets: elf32-i386 coff-i386 elf64-x86-64 elf64-little > elf64-big elf32-little elf32-big pe-i386 pei-i386 srec symbolsrec > tekhex binary ihex > > OS: solaris 10 x86 > binutils: 2.19 from mingw > gcc: 3.4.6 > > TIA, > -James > Hi, Your command line is a bit suspicious. Shouldn't it be "i686-pc-mingw-ld" rather than just "ld". I am assuming you are cross-compiling on a Solaris machine for Windows. You may need to install a cross-assembler as well. |
|
From: James T. <jam...@gm...> - 2009-01-06 16:05:51
|
On Tue, Jan 6, 2009 at 9:58 AM, JonY <10...@gm...> wrote: > Hi, > > You should pass "--build=<local triplet> --host=<local triplet> > --target=i686-pc-mingw32" to binutils configure instead. > > Not too sure what's the triplet for Solaris on X86, i386-pc-solaris2.11 > maybe? Ok, we have a winner.... I used the above configure options with '<local triplet>' being i386-pc-solaris2.10. strange, though that during the compile without the '--build/--host' it shows them being the proper <local triplet>, so I assumed that they were not needed. Thanks a million. -James |
|
From: JonY <10...@gm...> - 2009-01-06 16:53:43
|
On 1/7/2009 00:05, James Trickel wrote: > On Tue, Jan 6, 2009 at 9:58 AM, JonY<10...@gm...> wrote: >> Hi, >> >> You should pass "--build=<local triplet> --host=<local triplet> >> --target=i686-pc-mingw32" to binutils configure instead. >> >> Not too sure what's the triplet for Solaris on X86, i386-pc-solaris2.11 >> maybe? > Ok, we have a winner.... > I used the above configure options with '<local triplet>' being > i386-pc-solaris2.10. > strange, though that during the compile without the '--build/--host' > it shows them being the proper<local triplet>, so I assumed that they > were not needed. > > Thanks a million. > -James > Hi, If the "target" bit was not explicitly defined, configure assumes you are building and running binutils for your own machine. configure does the right thing most of the time, specifying your "build" and "host" machine is for safety. |
|
From: Keith M. <kei...@us...> - 2009-01-06 19:02:06
|
On Tuesday 06 January 2009 16:53:32 JonY wrote: > If the "target" bit was not explicitly defined, configure assumes > you are building and running binutils for your own machine. Uhmm, that is not strictly true! If `--target' is not specified, and it is relevant for the package being built[*], then configure should assume that it relates to the architecture of the `--host' machine. Of course, if `--host' itself is not specified, then that defaults to the local machine, resulting in the effect you describe. > configure does the right thing most of the time, specifying your > "build" and "host" machine is for safety. Safety, in what respect? If both relate to the local machine, then specifying them is redundant; it is perfectly safe to omit both. Regards, Keith. [*] `--target' specs are relevant *only* for applications which themselves generate code, for deployment on a specific architecture. Packages which do not provide code generators should neither use, nor make *any* assumptions about `--target[**]. [**] Our own mingwrt and w32api are two packages for which `--target' should be completely irrelevant; both are library packages, and as such neither provides any form of code generator, yet both *misuse* the `--target' setting to control installation and packaging options. These are anomalies which are on my "round tuit" list for correction. |
|
From: JonY <10...@gm...> - 2009-01-07 01:23:00
|
On 1/7/2009 02:45, Keith Marshall wrote: > On Tuesday 06 January 2009 16:53:32 JonY wrote: >> If the "target" bit was not explicitly defined, configure assumes >> you are building and running binutils for your own machine. > > Uhmm, that is not strictly true! If `--target' is not specified, and > it is relevant for the package being built[*], then configure should > assume that it relates to the architecture of the `--host' machine. > Of course, if `--host' itself is not specified, then that defaults to > the local machine, resulting in the effect you describe. > >> configure does the right thing most of the time, specifying your >> "build" and "host" machine is for safety. > > Safety, in what respect? If both relate to the local machine, then > specifying them is redundant; it is perfectly safe to omit both. > > Regards, > Keith. > > [*] `--target' specs are relevant *only* for applications which > themselves generate code, for deployment on a specific architecture. > Packages which do not provide code generators should neither use, nor > make *any* assumptions about `--target[**]. > > [**] Our own mingwrt and w32api are two packages for which `--target' > should be completely irrelevant; both are library packages, and as > such neither provides any form of code generator, yet both *misuse* > the `--target' setting to control installation and packaging options. > These are anomalies which are on my "round tuit" list for correction. > > Hi, you are right about omitting the host and build part. Sorry, carry over from using ancient versions of hacked up autotools/configure. |
|
From: Keith M. <kei...@us...> - 2009-01-06 19:01:58
|
On Tuesday 06 January 2009 16:05:50 James Trickel wrote: > strange, though that during the compile without the > '--build/--host' it shows them being the proper <local triplet>, so > I assumed that they were not needed. I believe that your assumption is correct! On your solaris host, you are building a self-hosted ld, to target mingw32, so: $ configure --target=mingw32 --disable-nls should be sufficient; it is not necessary to specify --build or --host for this case. Do note however, (ignoring the difference between `mingw32' and `i686-pc-mingw32', which is not significant), that this is *not* the same as the command you originally cited, viz: $ configure --enable-targets=mingw32 --disable-nls (`--enable-targets' does *not* have the same effect as `--target', and it would have been the `--target' which had the desired effect). -- Regards, Keith. |