Author Topic: TDM's GCC 4.2.1 (now with iconv, Obj-C++ and Treelang)  (Read 23058 times)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #15 on: August 04, 2007, 12:50:45 am »
i use Build.txt description to install and run scripts under mSYS/mingw.
This probably won't work without major modification; I build under Ubuntu Linux (7.04), and the scripts aren't designed with mSYS in mind.
At any rate, I'm not entirely certain about the multiple main definitions error, but the undefined reference to yyparse probably means you don't have Bison installed.

The only problem that I found was in some .la in the lib directory that was pointing to yours cross-compile directory.
Oops. Is this causing problems during normal usage?

can anyone compile allegro 4.2.2 with this?
This is definitely a bug in GCC. I'll see about a bug report on this one, too.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #16 on: August 04, 2007, 01:01:33 pm »
I just decided to try out gcc 4 (your gcc 4.2.1 build) and did a little benchmark.
Here are the results:

Time to build wxMSW 2.8.4 (configuration for cb):
  • gcc 3.4.5: 20 min 22 seconds
  • gcc 4.2.1: 21 min 55 seconds
Note: I didn't redirect console output.

Time to build codeblocks svn 4346 (without contrib plugins):
  • gcc 3.4.5: 9 min 24 seconds
  • gcc 4.2.1: 11 min 33 seconds


Sizes:
wxmsw28u_gcc_custom.dll
  • gcc 3.4.5: 9,86 MB (10.342.139 bytes)
  • gcc 4.2.1: 10,3 MB (10.897.346 bytes)

output\codeblocks.exe
  • gcc 3.4.5: 1,05 MB (1.105.408 bytes)
  • gcc 4.2.1: 1,32 MB (1.387.520 bytes)

output\codeblocks.dll
  • gcc 3.4.5: 3,68 MB (3.859.456 bytes)
  • gcc 4.2.1: 3,94 MB (4.137.984 bytes)

devel\codeblocks.exe
  • gcc 3.4.5: 7,69 MB (8.073.979 bytes)
  • gcc 4.2.1: 10,9 MB (11.480.689 bytes)

devel\codeblocks.dll
  • gcc 3.4.5: 22,9 MB (24.091.398 bytes)
  • gcc 4.2.1: 28,0 MB (29.406.839 bytes)

devel\
  • gcc 3.4.5: 96,6 MB (101.298.572 bytes)
  • gcc 4.2.1: 136 MB (143.010.198 bytes)

output\
  • gcc 3.4.5: 14,7 MB (15.469.645 bytes)
  • gcc 4.2.1: 18,3 MB (19.213.389 bytes)

My system:
WinXP Sp2
AMD XP 2600+
1,5 gb ram

Since optimization doesn't greatly matter for me, I think I'll stick to 3.4.5
What do you think?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #17 on: August 04, 2007, 03:27:01 pm »
I achieved similar results in this post (using GCC 4.1.2). If you need optimization, better error detection, or a 3.4.x bug fixed, upgrade; otherwise, stay where you are.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline roland

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #18 on: August 05, 2007, 05:50:15 pm »
Thanks TDragon. Can you link to the bug report when its up?

raph: extreamly informative, thanks. Filesize doesn't really matter to me, but things not compiling certainly does. :P I guess for a lot of things I must stick with 3.4.5 for the time being. Still, looking at the /deve/ dir, over a 40MB difference  :shock: geeze...

Offline dwmcqueen

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #19 on: August 05, 2007, 10:15:36 pm »
I must be missing something.  This is on a clean machine - I followed your instructions and downloaded the other packages (w32api, etc) on your website.

I installed MinGW 4.2.1 to C:MinGW-4.2.1

I get several errors about missing files when compiling a basic console app:

-------------- Build: Debug in Test ---------------
Compiling: main.cpp
In file included from c:/mingw-4.2.1/bin/../lib/gcc/mingw32/4.2.1/../../../../include/c++/4.2.1/mingw32/bits/c++locale.h:47,
                 from C:/MinGW-4.2.1/include/c++/4.2.1/iosfwd:45,
                 from C:/MinGW-4.2.1/include/c++/4.2.1/ios:43,
                 from C:/MinGW-4.2.1/include/c++/4.2.1/ostream:45,
                 from C:/MinGW-4.2.1/include/c++/4.2.1/iostream:45,
                 from C:\Test\main.cpp:1:
C:/MinGW-4.2.1/include/c++/4.2.1/clocale:51:20: error: locale.h: No such file or directory

Any thoughts?

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #20 on: August 05, 2007, 10:22:25 pm »
C:/MinGW-4.2.1/include/c++/4.2.1/clocale:51:20: error: locale.h: No such file or directory
Does that file exist?
EDIT: i really need sleep :roll:
« Last Edit: August 05, 2007, 11:12:41 pm by raph »

Offline dwmcqueen

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #21 on: August 05, 2007, 10:42:52 pm »
locale.h???

I have a locale file (note with no extension) in the include/c++/4.2.1 folder off that package, but no locale.h

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #22 on: August 05, 2007, 11:09:08 pm »
Any thoughts?
You forgot to install the mingw-runtime package? Make sure that there is a locale.h in <mingw>\include.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline dwmcqueen

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #23 on: August 06, 2007, 12:23:44 am »
I knew it was something I missed - thanks!

Offline dwmcqueen

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #24 on: August 06, 2007, 12:42:38 am »
Did notice this strange occurence - I was compiling the libcurl library and got this error:

In file included from C:/MinGW-4.2.1/include/stdio.h:407,
                 from C:\Projects\Third-Party\curl-7.16.4\lib\/setup.h:157,
                 from C:\Projects\Third-Party\curl-7.16.4\lib\connect.c:24:
C:/MinGW-4.2.1/include/sys/types.h:104: error: two or more data types in declaration specifiers
C:/MinGW-4.2.1/include/sys/types.h:104: warning: useless type name in empty declaration

The offending code in types.h is :

#ifndef   _NO_OLDNAMES
typedef _ssize_t ssize_t;
#endif
#endif /* Not _SSIZE_T_ */


Offline dwmcqueen

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #25 on: August 06, 2007, 04:03:24 pm »
I've posted this question to the MinGW list as I have noticed this before.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #26 on: August 06, 2007, 05:50:35 pm »
dwmcqueen:
It'll probably be fixed with another update to the mingw-runtime package whenever the official MinGW GCC 4.2.x is released.

Ramazan Kartal:
I'm testing GCC 4.2.1 TDM-2 right now, which is iconv-enabled. Hopefully I'll be able to upload it later today or tomorrow.

Cheers,
John E. / TDM
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline dwmcqueen

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #27 on: August 06, 2007, 06:08:06 pm »
What should be the change?  I just commented it out.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM's GCC 4.2.1 for MinGW available
« Reply #28 on: August 06, 2007, 06:52:43 pm »
What should be the change?
I couldn't say without taking a look at the libcurl sources. You'd need to find where ssize_t was being defined earlier and see if there is a macro that will prevent it, or create another macro that disables that definition in that specific case -- or, just comment it out (if you can be sure that nothing else needs it...).
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM's GCC 4.2.1 (now with iconv, Obj-C++ and Treelang)
« Reply #29 on: August 06, 2007, 06:57:59 pm »
GCC 4.2.1 TDM-2 is now available! Objective-C++ and Treelang packages have been added, and GCC now uses libiconv for support for non-UTF-8 charsets (see -finput-charset, etc.). As always, you should be able to install in almost any directory, and use it from almost any directory (unless you're running Vista).

See http://www.tdragon.net/recentgcc/ for details.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)