Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

avys
Hello,
I'm trying to build a native mingw32 4.9.1 gcc (I want to build a 4.9.1 arm cross compiler, but I need a 4.9.1 host gcc for that, and the gcc that comes with mingw32 is 4.8.1)
I configure with:

../../src/gcc-4.9.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs  --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
(This is extracted from the 4.8.1 mingw32 native compiler by "gcc -v")

I'm getting the following error message - like ld does not recognize /mingw/lib:

# @multilib_flags@ is still needed because this may use
# /d/crossbuild/mingw32/gcc-4.9.1/./gcc/xgcc -B/d/crossbuild/mingw32/gcc-4.9.1/./gcc/ -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/mingw -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/w32api/lib -isystem /d/crossbuild/src/gcc-4.9.1/winsup/mingw/include -isystem /d/crossbuild/src/gcc-4.9.1/winsup/w32api/include -B/mingw/mingw32/bin/ -B/mingw/mingw32/lib/ -isystem /mingw/mingw32/include -isystem /mingw/mingw32/sys-include    and -O2 -I../../../../src/gcc-4.9.1/libgcc/../winsup/w32api/include -g -O2 -D_USE_32BIT_TIME_T -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  directly.
# @multilib_dir@ is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/sh ../../../../src/gcc-4.9.1/libgcc/../mkinstalldirs .
cp -p -f libgcc.map libgcc.map.def && if [ ! -d ./shlib ]; then mkdir ./shlib; else true; fi && /d/crossbuild/mingw32/gcc-4.9.1/./gcc/xgcc -B/d/crossbuild/mingw32/gcc-4.9.1/./gcc/ -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/mingw -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/w32api/lib -isystem /d/crossbuild/src/gcc-4.9.1/winsup/mingw/include -isystem /d/crossbuild/src/gcc-4.9.1/winsup/w32api/include -B/mingw/mingw32/bin/ -B/mingw/mingw32/lib/ -isystem /mingw/mingw32/include -isystem /mingw/mingw32/sys-include    -O2 -I../../../../src/gcc-4.9.1/libgcc/../winsup/w32api/include -g -O2 -D_USE_32BIT_TIME_T -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -shared -nodefaultlibs libgcc.map.def -Wl,--out-implib,./shlib/libgcc_s.a.tmp -o ./shlib/libgcc_s_dw2-1.dll.tmp -g -O2 -D_USE_32BIT_TIME_T -B./ _chkstk_s.o _chkstk_ms_s.o _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o gthr-win32_s.o cpuinfo_s.o tf-signs_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a  -lmingwthrd -lmingw32 -lmingwex -lmoldname -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 && if [ -f ./shlib/libgcc_s_dw2-1.dll ]; then mv -f ./shlib/libgcc_s_dw2-1.dll ./shlib/libgcc_s_dw2-1.dll.backup; else true; fi && mv ./shlib/libgcc_s_dw2-1.dll.tmp ./shlib/libgcc_s_dw2-1.dll && mv ./shlib/libgcc_s.a.tmp ./shlib/libgcc_s.a
c:\MinGW\mingw32\bin\ld.exe: cannot find dllcrt2.o: No such file or directory
c:\MinGW\mingw32\bin\ld.exe: cannot find -lmingwthrd
c:\MinGW\mingw32\bin\ld.exe: cannot find -lmingw32
c:\MinGW\mingw32\bin\ld.exe: cannot find -lmingwex
c:\MinGW\mingw32\bin\ld.exe: cannot find -lmoldname
c:\MinGW\mingw32\bin\ld.exe: cannot find -lmsvcrt
c:\MinGW\mingw32\bin\ld.exe: cannot find -ladvapi32
c:\MinGW\mingw32\bin\ld.exe: cannot find -lshell32
c:\MinGW\mingw32\bin\ld.exe: cannot find -luser32
c:\MinGW\mingw32\bin\ld.exe: cannot find -lkernel32
collect2.exe: error: ld returned 1 exit status
make[2]: *** [libgcc_s.dll] Error 1
make[2]: Leaving directory `/d/crossbuild/mingw32/gcc-4.9.1/mingw32/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/d/crossbuild/mingw32/gcc-4.9.1'
make: *** [all] Error 2

My C:\mingw is mounted (in fstab) as /mingw.  Here is the output of the mount command:

C:\Users\avy\AppData\Local\Temp on /tmp type user (binmode,noumount)
C:\MinGW\msys\1.0 on /usr type user (binmode,noumount)
C:\MinGW\msys\1.0 on / type user (binmode,noumount)
c:\MinGW on /mingw type user (binmode)
c: on /c type user (binmode,noumount)
d: on /d type user (binmode,noumount)
e: on /e type user (binmode,noumount)
f: on /f type user (binmode,noumount)
i: on /i type user (binmode,noumount)
k: on /k type user (binmode,noumount)
n: on /n type user (binmode,noumount)

Anybody can help please?
Thanks
Avy
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

Keith Marshall
On 20/09/14 08:47, avys wrote:
> Hello,
> I'm trying to build a native mingw32 4.9.1 gcc (I want to build a 4.9.1 arm
> cross compiler, but I need a 4.9.1 host gcc for that, and the gcc that comes
> with mingw32 is 4.8.1)

You should still be able to use that, as build compiler for a gcc-4.9.1
cross ... unless you absolutely need Ada, (which is a veritable pig to
build).

> I configure with:
>
> ../../src/gcc-4.9.1/configure --prefix=/mingw --host=mingw32 --build=mingw32
> --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
> --enable-libssp --disable-multilib --enable-languages=c,c++,ada

So, you *are* building Ada.  Unless you *really* need it, you may
achieve a more successful outcome without it.

> --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry
> --enable-libstdcxx-debug --enable-version-specific-runtime-libs
> --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp
> --enable-threads --with-libiconv-prefix=/mingw32
> --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s

Normally, for a native build, you *would* bootstrap it.

> CFLAGS=-D_USE_32BIT_TIME_T
> (This is extracted from the 4.8.1 mingw32 native compiler by "gcc -v")
>
> I'm getting the following error message - like ld does not recognize
> /mingw/lib:

Please describe *all* the steps you've taken, to get to this point; you
must already have done more than just configure.  How did you perform
the stage-1 (xgcc) build?  Build the requisite libraries?  (What you
describe here is indicative of a symptom which would appear only during
the stage-2 (final) GCC build).

I would also suggest that you search the ML archives; I described, in
full detail, the procedure I employ for building cross GCC, just a
couple of months ago.  Also, search the MinGW-Dvlpr ML archives, for
David Gressett's description of how he successfully built (Ada enabled)
native GCC-4.9.1; (he posted this just a couple of weeks ago).

> # @multilib_flags@ is still needed because this may use
> # /d/crossbuild/mingw32/gcc-4.9.1/./gcc/xgcc
> -B/d/crossbuild/mingw32/gcc-4.9.1/./gcc/
> -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/mingw
> -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/w32api/lib -isystem
> /d/crossbuild/src/gcc-4.9.1/winsup/mingw/include -isystem
> /d/crossbuild/src/gcc-4.9.1/winsup/w32api/include -B/mingw/mingw32/bin/
> -B/mingw/mingw32/lib/ -isystem /mingw/mingw32/include -isystem
> /mingw/mingw32/sys-include    and -O2
> -I../../../../src/gcc-4.9.1/libgcc/../winsup/w32api/include -g -O2
> -D_USE_32BIT_TIME_T -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings
> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
> -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
> directly.
> # @multilib_dir@ is not really necessary, but sometimes it has
> # more uses than just a directory name.
> /bin/sh ../../../../src/gcc-4.9.1/libgcc/../mkinstalldirs .
> cp -p -f libgcc.map libgcc.map.def && if [ ! -d ./shlib ]; then mkdir
> ./shlib; else true; fi && /d/crossbuild/mingw32/gcc-4.9.1/./gcc/xgcc

Here, you are running the locally built xgcc, (from the stage-1 build),
*not* any pre-built native compiler...

> -B/d/crossbuild/mingw32/gcc-4.9.1/./gcc/
> -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/mingw
> -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/w32api/lib -isystem
> /d/crossbuild/src/gcc-4.9.1/winsup/mingw/include -isystem
> /d/crossbuild/src/gcc-4.9.1/winsup/w32api/include -B/mingw/mingw32/bin/
> -B/mingw/mingw32/lib/ -isystem /mingw/mingw32/include -isystem
> /mingw/mingw32/sys-include    -O2

...and I don't see any explicit reference there, for the requisite
library paths, other than those that you *should* have built and
installed between the stage-1 and stage-2 GCC builds; did you do so?

> ...
> c:\MinGW\mingw32\bin\ld.exe: cannot find dllcrt2.o: No such file or
> directory
> c:\MinGW\mingw32\bin\ld.exe: cannot find -lmingwthrd
> c:\MinGW\mingw32\bin\ld.exe: cannot find -lmingw32
> ...
> make[2]: *** [libgcc_s.dll] Error 1
> make[2]: Leaving directory `/d/crossbuild/mingw32/gcc-4.9.1/mingw32/libgcc'
> make[1]: *** [all-target-libgcc] Error 2
> make[1]: Leaving directory `/d/crossbuild/mingw32/gcc-4.9.1'
> make: *** [all] Error 2
>
> My C:\mingw is mounted (in fstab) as /mingw.

But, xgcc doesn't know about fstab, so may not be passing the proper
form of reference to ld.  Without a more complete description of how you
are doing this, I can't really speculate any further.

--
Regards,
Keith.

------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

avys
<quote author="Keith Marshall">
>On 20/09/14 08:47, avys wrote:
>> Hello,
>> I'm trying to build a native mingw32 4.9.1 gcc

>> I configure with:
>>
>> ../../src/gcc-4.9.1/configure --prefix=/mingw --host=mingw32 --build=mingw32
>> --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
>> --enable-libssp --disable-multilib --enable-languages=c,c++,ada

>So, you *are* building Ada.  Unless you *really* need it, you may
>achieve a more successful outcome without it.

Yes, I do need Ada.  I want a to build a mingw hosted arm Ada cross compiler, and for that the host compiler must be of the same verstion

>> --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry
>> --enable-libstdcxx-debug --enable-version-specific-runtime-libs
>> --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp
>> --enable-threads --with-libiconv-prefix=/mingw32
>> --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s

>Normally, for a native build, you *would* bootstrap it.

Since I didn't know what options I should use for the host compiler, I used the same options the current (4.8.1) mingw compiler reports with -v.  --disable-bootstrap was reported by the compiler.

>> CFLAGS=-D_USE_32BIT_TIME_T
>> (This is extracted from the 4.8.1 mingw32 native compiler by "gcc -v")
>>
>> I'm getting the following error message - like ld does not recognize
>> /mingw/lib:

>Please describe *all* the steps you've taken, to get to this point; you
>must already have done more than just configure.  How did you perform
>the stage-1 (xgcc) build?  Build the requisite libraries?  (What you
>describe here is indicative of a symptom which would appear only during
>the stage-2 (final) GCC build).

I just configured as described above and than did a 'make'.

>I would also suggest that you search the ML archives; I described, in
>full detail, the procedure I employ for building cross GCC, just a
>couple of months ago.  Also, search the MinGW-Dvlpr ML archives, for
>David Gressett's description of how he successfully built (Ada enabled)
>native GCC-4.9.1; (he posted this just a couple of weeks ago).

I wasn't aware about that - thanks for pointing that threads.  I'm going to look into them.

>> # @multilib_flags@ is still needed because this may use
>> # /d/crossbuild/mingw32/gcc-4.9.1/./gcc/xgcc
>> -B/d/crossbuild/mingw32/gcc-4.9.1/./gcc/
>> -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/mingw
>> -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/w32api/lib -isystem
>> /d/crossbuild/src/gcc-4.9.1/winsup/mingw/include -isystem
>> /d/crossbuild/src/gcc-4.9.1/winsup/w32api/include -B/mingw/mingw32/bin/
>> -B/mingw/mingw32/lib/ -isystem /mingw/mingw32/include -isystem
>> /mingw/mingw32/sys-include    and -O2
>> -I../../../../src/gcc-4.9.1/libgcc/../winsup/w32api/include -g -O2
>> -D_USE_32BIT_TIME_T -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings
>> -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
>> -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
>> directly.
>> # @multilib_dir@ is not really necessary, but sometimes it has
>> # more uses than just a directory name.
>> /bin/sh ../../../../src/gcc-4.9.1/libgcc/../mkinstalldirs .
>> cp -p -f libgcc.map libgcc.map.def && if [ ! -d ./shlib ]; then mkdir
>> ./shlib; else true; fi && /d/crossbuild/mingw32/gcc-4.9.1/./gcc/xgcc

>Here, you are running the locally built xgcc, (from the stage-1 build),
>*not* any pre-built native compiler...

Well, as I mentioned, I just configured (using the above line) and than 'make'ed.  That's what the script has done.  I guess I'm using it in some wrong way.

>> -B/d/crossbuild/mingw32/gcc-4.9.1/./gcc/
>> -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/mingw
>> -L/d/crossbuild/mingw32/gcc-4.9.1/mingw32/winsup/w32api/lib -isystem
>> /d/crossbuild/src/gcc-4.9.1/winsup/mingw/include -isystem
>> /d/crossbuild/src/gcc-4.9.1/winsup/w32api/include -B/mingw/mingw32/bin/
>> -B/mingw/mingw32/lib/ -isystem /mingw/mingw32/include -isystem
>> /mingw/mingw32/sys-include    -O2

>...and I don't see any explicit reference there, for the requisite
>library paths, other than those that you *should* have built and
>installed between the stage-1 and stage-2 GCC builds; did you do so?


Guess I'm missing again things here.  I'll look at the build procedure yiu are using

>> ...
>> c:\MinGW\mingw32\bin\ld.exe: cannot find dllcrt2.o: No such file or
>> directory
>> c:\MinGW\mingw32\bin\ld.exe: cannot find -lmingwthrd
>> c:\MinGW\mingw32\bin\ld.exe: cannot find -lmingw32
>> ...
>> make[2]: *** [libgcc_s.dll] Error 1
>> make[2]: Leaving directory `/d/crossbuild/mingw32/gcc-4.9.1/mingw32/libgcc'
>> make[1]: *** [all-target-libgcc] Error 2
>> make[1]: Leaving directory `/d/crossbuild/mingw32/gcc-4.9.1'
>> make: *** [all] Error 2
>>
>> My C:\mingw is mounted (in fstab) as /mingw.

>But, xgcc doesn't know about fstab, so may not be passing the proper
>form of reference to ld.  

That is wierd.  I thought that the shell (and underlying MSYS) knows about the mount and passes
the files in it to the child processes they create.  Am I wrong?  
Is there a way to pass the proper form of reference to ld directly?

>>Without a more complete description of how you
>>are doing this, I can't really speculate any further.

What more information should I include?

>--
>Regards,
>Keith.

Sincerely
Avy
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

David Gressett
on Saturday, September 20, 2014 11:41 AM, avys wrote

>>On 20/09/14 08:47, avys wrote:
>>> Hello,
>>> I'm trying to build a native mingw32 4.9.1 gcc

... snipped everything ...

Here's a bit more information, as I have done more
build attempts for 4.9.1 since I successfully built 4.9.1.

first: This has been said before, but it is worth repeating:

***********************************************
The MinGW V4 runtime and Win 32 api have serious problems.
Do not use them. Replace them with with the V3 equivalents.
This is particularly important for building gcc 4.9.1. There are
many things that will in fact successfully build with the 4.0 libraries.
gcc 4.9.1 is not one of them.
***********************************************

2nd: the MinGW gcc 4.8.1, as installed on Windows with the
MinGW installer and using the V3 runtime and Win32 api
will not build gcc 4.9.1. I'm guessing that the released 4.8.1
compiler was built with the V4 runtime and win32 api  installed
 on the computer that built it.

Mt first success in building gcc 4.9.1 was when the building compiler
(gcc 4.8.3) was built with itself, with the V3 runtime and win32 api.
It appears that the V4 runtime and win32 api are so toxic that a
4.8 compiler built with them cannot build a 4.9 compiler, even if
the V3 runtime and Win32 api are installed at the time of the
4.9 build. Some bad code seems to be statically linked into
the compiler. It won't stop you from building gcc 4.8.3.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

David Gressett

>on Saturday, September 20, 2014 11:41 AM, avys wrote

>>>On 20/09/14 08:47, avys wrote:
>>>> Hello,
>>>> I'm trying to build a native mingw32 4.9.1 gcc

>... snipped everything ...

>Here's a bit more information, as I have done more
> build attempts for 4.9.1 since I successfully built 4.9.1.

... snip ...

> My first success in building gcc 4.9.1 was when the building compiler
>(gcc 4.8.3) was built with itself, with the V3 runtime and win32 api.
>It appears that the V4 runtime and win32 api are so toxic that a
>4.8 compiler built with them cannot build a 4.9 compiler, even if
>the V3 runtime and Win32 api are installed at the time of the
>4.9 build. Some bad code seems to be statically linked into
>the compiler. It won't stop you from building gcc 4.8.3.

I forgot to mention something that may very well be significant:
When I rebuilt the 4.8.3 compiler with itself, I also rebuilt and
installed the gmp, mpfr, and mpc libraries with the V3 runtime
and win32 api, so that these no-V4-contamination  libraries were
the ones used to build the compiler. I had no idea how the ones
delivered by the installer were built, so I made sure by doing it myself.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

avys
David,
I already knew about the version 4 libraries and tried the build with versuin 3 libraries.  I guess that my failure emphsize your concusion about the need to re-build 4.8 compiler first.

Two questions:
1. The re-build that you mentioned for gmp, mpfr, and mpc libraries was done before or after the re-build of the 4.8.3 compiler?
2. Since re-building the host compiler for me is only a milestone in getting an ARM Ada cross compiler - did you save your host 4.9.1 compiler build in a place where it can be downloadable?
Thanks for all the help.
Avy


----- Original Message -----
From: David Gressett <[hidden email]>
To: MinGW Users List <[hidden email]>
Cc:
Sent: Tuesday, September 23, 2014 2:02 AM
Subject: Re: [Mingw-users] Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)


>on Saturday, September 20, 2014 11:41 AM, avys wrote

>>>On 20/09/14 08:47, avys wrote:
>>>> Hello,
>>>> I'm trying to build a native mingw32 4.9.1 gcc

>... snipped everything ...

>Here's a bit more information, as I have done more
> build attempts for 4.9.1 since I successfully built 4.9.1.

... snip ...

> My first success in building gcc 4.9.1 was when the building compiler
>(gcc 4.8.3) was built with itself, with the V3 runtime and win32 api.
>It appears that the V4 runtime and win32 api are so toxic that a
>4.8 compiler built with them cannot build a 4.9 compiler, even if
>the V3 runtime and Win32 api are installed at the time of the
>4.9 build. Some bad code seems to be statically linked into
>the compiler. It won't stop you from building gcc 4.8.3.

I forgot to mention something that may very well be significant:
When I rebuilt the 4.8.3 compiler with itself, I also rebuilt and
installed the gmp, mpfr, and mpc libraries with the V3 runtime
and win32 api, so that these no-V4-contamination  libraries were
the ones used to build the compiler. I had no idea how the ones
delivered by the installer were built, so I made sure by doing it myself.




------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

David Gressett

on September 25, 2014 2:07 AM, avy st wrote:
To: MinGW Users List
Subject: Re: [Mingw-users] Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

>From: David Gressett <[hidden email]>
>To: MinGW Users List <[hidden email]>
.. snip ..

>on Saturday, September 20, 2014 11:41 AM, avys wrote

>>>On 20/09/14 08:47, avys wrote:
>>>>> Hello,
>>>>> I'm trying to build a native mingw32 4.9.1 gcc

>>... snipped everything ...

>>Here's a bit more information, as I have done more
>> build attempts for 4.9.1 since I successfully built 4.9.1.

>... snip ...

>> My first success in building gcc 4.9.1 was when the building compiler
>>(gcc 4.8.3) was built with itself, with the V3 runtime and win32 api.
>>It appears that the V4 runtime and win32 api are so toxic that a
>>4.8 compiler built with them cannot build a 4.9 compiler, even if
>>the V3 runtime and Win32 api are installed at the time of the
>>4.9 build. Some bad code seems to be statically linked into
>>the compiler. It won't stop you from building gcc 4.8.3.

>I forgot to mention something that may very well be significant:
>When I rebuilt the 4.8.3 compiler with itself, I also rebuilt and
>installed the gmp, mpfr, and mpc libraries with the V3 runtime
>and win32 api, so that these no-V4-contamination libraries were
>the ones used to build the compiler. I had no idea how the ones
>delivered by the installer were built, so I made sure by doing it myself.

>David,
>I already knew about the version 4 libraries and tried the build
>with versuin 3 libraries. I guess that my failure emphsize your
>concusion about the need to re-build 4.8 compiler first.

Please follow the mailing list rules and don't top post;

>Two questions:
>1. The re-build that you mentioned for gmp, mpfr, and mpc libraries
>was done before or after the re-build of the 4.8.3 compiler?

My first 4.8.3 compiler was built with the V4 libraries,
then installed, replacing the 4.8.1 compiler. Then I went
to the good V3 libraries and built it again, then installed,
replacing the V4-built compiler. I then rebuilt and installed
the gmp, mpfr, and mpc libraries and installed,
them. Then I rebuilt and installed the 4.8.3 compiler again.

Note, there is a minor problem with the sources for gmp,
mpfr, and mpc librairies: the directory names that result
from untarring the sources do not match the ones used in
the CONFOPT line in the various package.ini files. For the
compiler build, just delete the references to gmp, mpfr, and
mpc from the CONFOPT line, and use the MinGW installer to
make sure that they are installed before the compiler is built.
Using installed gmp, mpfr, and mpc is now the method
recommended by the upstream gcc project.

Do not delete the references when building gmp, mpfr,
and mpc - you should edit them so that they are correct.
I found that using the method used for the compiler works
 for gmp and mpfr but the mpc build fails due to a missing
libgmp.la file. (After I finished building the compiler,
I searched the gmp, mpfr, and mpc stg directories for .la
 files that failed to install and manually installed them in
the appropriate places in the MinGW directories.)

> 2. Since re-building the host compiler for me is only a
> milestone in getting an ARM Ada cross compiler - did
> you save your host 4.9.1 >compiler build in a place where
> it can be downloadable? Thanks for all the help.
>Avy

No, I didn't.

A final note about list etiquette:  your message text appears to
be left to wrap at the edge of your mail display. (MS Outlook?)
That works fine for me, as I am reading this with Outlook, but it
is a major  annoyance for list users who use Unix or Linux mail
clients. I always set my Outlook to send plain text and manually
wrap lines to keep them within 72 characters of length, which
requires an eyball guess, as Outlook doesn't count characters.



------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe

________________________________________

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

Eli Zaretskii
> From: David Gressett <[hidden email]>
> Date: Thu, 25 Sep 2014 09:41:13 -0500
>
> A final note about list etiquette:  your message text appears to
> be left to wrap at the edge of your mail display. (MS Outlook?)
> That works fine for me, as I am reading this with Outlook, but it
> is a major  annoyance for list users who use Unix or Linux mail
> clients.

Not if one uses Emacs (on Unix or elsewhere).

FWIW, I find these notes about mail formatting annoying: I think the
readers of the list should be expected to be able to deal with that,
or install a better mail client.  But that's me.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

avys
In reply to this post by David Gressett
I can happily report a successful build of a 4.9.1 native compiler on a clean MinGW installation, without first re-building gcc, mpc, mpfr and gmp!

I basically followed a path similar to the path suggested by David Gressett in the reply above, and was able to build the 4.9.1 compiler.  However, since I made a lot of trials and some dirty shortcuts (like using 'make install' for the compiler instead of mingw-get), I decided to check the things on a clean start.  So, I deleted all the MinGW tree and re-installed MinGW.

To my surprise, the new installation included the good V3 libraries instead of the offending V4 libraries (mingwrt 3.20-1 and w32api 3.17-2), and gcc 4.8.1-4 instead of 4.8.1-3.  So, I decided to skip the re-hosting of the 4.8.3 compiler and the re-build of mpc, mpfr and gmp, and went directly to build the 4.9.1 compiler, using the build-gcc-4.9.1-1-mingw32.zip files generated by David Gressett.  
Everything worked smoothly.  This time I installed using the mingw installer, by copying the .lzma files to the C:\MinGW\var\cache\mingw-get\packages directory, and modifying C:\MinGW\var\lib\mingw-get\data\mingw32-gcc4.xml to include the 4.9.1 packages (is there a better way of doing this?).

The new compiler already built binutils and gcc for ARM, including bare-metal Ada.

One problem during the building of the ARM gcc was several errors of the kind:

/d/crossbuild/build_arm/gcc-4.9.1/./gcc/xgcc -B/d/crossbuild/build_arm/gcc-4.9.1/./gcc/ -B/c/arm-none-eabi/arm-none-eabi/bin/ -B/c/arm-none-eabi/arm-none-eabi/lib/ -isystem /c/arm-none-eabi/arm-none-eabi/include -isystem /c/arm-none-eabi/arm-none-eabi/sys-include    -g -O2 -mthumb -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fno-inline -I. -I. -I../../.././gcc -I../../../../../src/gcc-4.9.1/libgcc -I../../../../../src/gcc-4.9.1/libgcc/. -I../../../../../src/gcc-4.9.1/libgcc/../gcc -I../../../../../src/gcc-4.9.1/libgcc/../include    -o _satfractunsUDIDA.o -MT _satfractunsUDIDA.o -MD -MP -MF _satfractunsUDIDA.dep -DL_satfractuns -DFROM_UDI -DTO_DA -c ../../../../../src/gcc-4.9.1/libgcc/fixed-bit.c -fvisibility=hidden -DHIDE_EXPORTS
C:\MinGW\msys\1.0\bin\make.exe: *** couldn't commit memory for cygwin heap, Win32 error 0
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/d/crossbuild/build_arm/gcc-4.9.1/arm-none-eabi/libgcc'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/d/crossbuild/build_arm/gcc-4.9.1/arm-none-eabi/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/d/crossbuild/build_arm/gcc-4.9.1'
make: *** [all] Error 2

I Overcome these errors by re-doing a make command, several times, to continue the build.  Looks to me as a msys problem.  I saw several old posts about rebasing msys, but currently did none.

Avy
Reply | Threaded
Open this post in threaded view
|

Re: Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

David Gressett
On September 27, 2014 9:23 AM, avys wrote:
>Subject: Re: [Mingw-users] Failue when trying to build native mingw32 4.9.1 gcc (c, c++, ada)

>I can happily report a successful build of a 4.9.1 native compiler on a clean
>MinGW installation, without first re-building gcc, mpc, mpfr and gmp!

>I basically followed a path similar to the path suggested by David Gressett
>in the reply above, and was able to build the 4.9.1 compiler. However,
>since I made a lot of trials and some dirty shortcuts (like using 'make
>install' for the compiler instead of mingw-get), I decided to check the
>things on a clean start. So, I deleted all the MinGW tree and re-installed
>MinGW.

>To my surprise, the new installation included the good V3 libraries instead
>of the offending V4 libraries (mingwrt 3.20-1 and w32api 3.17-2), and gcc
>4.8.1-4 instead of 4.8.1-3.

That's good to know - my 4.8.1 build was modified to drop the
CFLAGS definition of   _USE_32BIT_TIME_T that was introduced in the -4
MinGW build in an unsuccessful attempt to fix an Ada runtime bug
uncovered by the V4 libraries. My build used the V4  libraries, but fixed the
Ada bug.

------------------------------------------------------------------------------
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe