Author Topic: A couple issues I have with QB64  (Read 462 times)

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
A couple issues I have with QB64
« on: April 16, 2013, 09:15:41 PM »
There are a couple of issues with QB64 that aren't really GL-specific. One of them is the size of the package, which seems to be quite large for some reason.

The bin folder is about 30 MB, and it contains the C++ compiler but it also contains a bunch of tools that are definitely not needed to compile QB64 programs.

The lib and include folders in the folders "i686-w64-mingw32" and "mingw" are 30 MB each, meaning about 120 MB in total.

The executables in libexec are about 10 MB each:
cc1, cc1obj, cc1objplus, cc1plus, lto1

There are 5 of them, so in total there is about 170 MB worth of stuff which I don't know what it does, plus the garbage command-line tools.

----

Another issue, and this is a minor one, is that the IDE keeps asking me if I want to update. Because I didn't get QB64 through an installer package, it doesn't make sense to me why I would want to auto-update. If I want to update QB64, I will download the newest package myself.

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: A couple issues I have with QB64
« Reply #1 on: April 16, 2013, 11:46:07 PM »
That's the Mingw64 compiler. Because QB64 provides DECLARE LIBRARY functionality, it makes sense to include the full version of the C/C++ compiler. I used to offer a stripped down version of MinGW which amounted to a lot less size. Rest assured this bulk has nothing to do with QB64 itself, it's a completely 3rd party package.

Quote
Another issue, and this is a minor one, is that the IDE keeps asking me if I want to update. Because I didn't get QB64 through an installer package, it doesn't make sense to me why I would want to auto-update. If I want to update QB64, I will download the newest package myself.
Turn off checking for updates in the Options menu. If there's no such option, then you are running and earlier version of QB64-GL and should get a later version where this does not happen.
Something old... Something new... Something borrowed... Something blue...

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
Re: A couple issues I have with QB64
« Reply #2 on: April 17, 2013, 01:10:12 AM »
I suppose that if complete C++ functionality were desired, the complete MinGW package would be necessary, but 200 MB is huge! I'm going to research DECLARE LIBRARY and try to figure out its mysteries.

Quote
Turn off checking for updates in the Options menu. If there's no such option, then you are running and earlier version of QB64-GL and should get a later version where this does not happen.
That must be what is going on, because I don't see the option. (If you ask me, it should be turned off by default anyways.) I am using a version of QB64-GL that is one release outdated. When the licensing issues are resolved, I will have a reason to download the newest GL release. I don't think I could help with debugging anyways.

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: A couple issues I have with QB64
« Reply #3 on: April 17, 2013, 05:07:51 AM »
http://code.google.com/p/qb64/source/browse/internal/source/options.bin
1) Go to site
2) Click show details
3) Click view binary
4) Download to qb64\internal\temp\options.bin
Update problem should resolve itself.
Or... download the latest version of QB64-GL
Something old... Something new... Something borrowed... Something blue...

Billbo

  • Sr. Member
  • ****
  • Posts: 286
    • Email
Re: A couple issues I have with QB64
« Reply #4 on: April 17, 2013, 05:14:48 AM »
Galleon,

You indicate, "Because QB64 provides DECLARE LIBRARY functionality, it makes sense to include the full version of the C/C++ compiler." Can the compiler be used as a stand-alone C/C++ compiler? And, pardon, if so, how?

Thanks,

Bill

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: A couple issues I have with QB64
« Reply #5 on: April 17, 2013, 05:23:56 AM »
Quote
Can the compiler be used as a stand-alone C/C++ compiler?
Yes.

Quote
And, pardon, if so, how?
qb64\internal\c\c_compiler\bin\gcc.exe is the main C compiler, gpp.exe is the C++ compiler
It's as simple as
...qb64\internal\c\c_compiler\bin> gcc.exe myprogram.c
(though do take the time to look up gcc/gpp switches)
Something old... Something new... Something borrowed... Something blue...

mcalkins

  • Hero Member
  • *****
  • Posts: 1269
    • qbasicmichael.com
    • Email
Re: A couple issues I have with QB64
« Reply #6 on: April 17, 2013, 07:01:53 AM »
It is possible to delete some of the files. This was for 0.954:
http://www.qb64.net/forum/index.php?topic=7255.0
You will notice that some of the executables are identical to each other. (They get combined in the .7z, so it's not a problem there, but it is waste when they are extracted.)
Deleting some of those files might reduce your DECLARE LIBRARY capability, or perhaps the ability to make DLLs, etc...

Regards,
Michael
The QBASIC Forum Community: http://www.network54.com/index/10167 Includes off-topic subforums.
QB64 Off-topic subforum: http://qb64offtopic.freeforums.org/

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
Re: A couple issues I have with QB64
« Reply #7 on: April 17, 2013, 07:18:00 AM »
Fine, I won't touch it, I'm just saying, huge file sizes make things less portable. I can fit my entire operating system in the space QB64 takes up twice over.

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: A couple issues I have with QB64
« Reply #8 on: April 17, 2013, 07:26:51 AM »
If Microsoft shipped a C/C++ compiler with Windows your install wouldn't even need the c_compiler folder. In Free-Linux and MacOSXNot-Free-Linux that folder doesn't even exist.
Something old... Something new... Something borrowed... Something blue...

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
Re: A couple issues I have with QB64
« Reply #9 on: April 17, 2013, 07:39:14 AM »
Gosh, you're right about that! Still, it doesn't seem fair. I mean, on OSX one has to download/install XCode and enable the command line tools or whatever. On Windows, they have to download a huge package (that's what she said). On Linux, GCC is a fairly standard component. Years and years of computer technology, and this is the furthest we've come. It makes one not want to use C++. Even just regular C takes up several orders of magnitude less space.

mcalkins

  • Hero Member
  • *****
  • Posts: 1269
    • qbasicmichael.com
    • Email
Re: A couple issues I have with QB64
« Reply #10 on: April 17, 2013, 08:01:53 AM »
I don't think that it's fair to blame C++ as opposed to C. C++ shouldn't be responsible for that much difference in the size of the compiler package.

The import libraries and, particularly, the header files contribute significantly to the size of the package. Most of these apply to both C and C++. A minority of them are for the C++ standard library.

Quote
Even just regular C takes up several orders of magnitude less space.

Please elaborate/demonstrate. Comparing to Tiny C Compiler is not a valid comparison.

C++ is the standard language for Windows applications programming. C is basically a dead language on Windows. Microsoft does not keep up with the new C standards, only C++.

Regards,
Michael
The QBASIC Forum Community: http://www.network54.com/index/10167 Includes off-topic subforums.
QB64 Off-topic subforum: http://qb64offtopic.freeforums.org/

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
Re: A couple issues I have with QB64
« Reply #11 on: April 17, 2013, 08:37:47 AM »
I don't know how I'm going to argue with you. I was going to compare to TCC. MinGW/GCC is a big software package. Out of the C/C++ compilers out there, I believe it is one of the biggest. I just don't see all of that extra crap as being worth it unless it offers something incredibly valuable and unique. I don't think it does.

As for what Microsoft wants to support, they can shove it.

mcalkins

  • Hero Member
  • *****
  • Posts: 1269
    • qbasicmichael.com
    • Email
Re: A couple issues I have with QB64
« Reply #12 on: April 17, 2013, 10:02:12 AM »
I'm not saying that MinGW isn't bloated. I think that it is.

TCC has lousy optimization, and comes with a subset of the Windows API headers. I don't even see "gl.h".

On a separate, but related, point: libstdc++-6.dll is huge, because it contains symbols and/or debug info.

Code: [Select]
Copy of libstdc++-6.dll:     file format pei-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         0008d764  6fc41000  6fc41000  00000600  2**4
                  CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
  1 .data         000065b8  6fccf000  6fccf000  0008de00  2**5
                  CONTENTS, ALLOC, LOAD, DATA
  2 .rdata        00009ea0  6fcd6000  6fcd6000  00094400  2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .bss          00000ea0  6fce0000  6fce0000  00000000  2**5
                  ALLOC
  4 .edata        0002d900  6fce1000  6fce1000  0009e400  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .idata        00000e30  6fd0f000  6fd0f000  000cbe00  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  6 .CRT          0000002c  6fd10000  6fd10000  000cce00  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .tls          00000020  6fd11000  6fd11000  000cd000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  8 .reloc        00005450  6fd12000  6fd12000  000cd200  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  9 .debug_aranges 00005dd0  6fd18000  6fd18000  000d2800  2**3
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_info   0025db18  6fd1e000  6fd1e000  000d8600  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_abbrev 0002251f  6ff7c000  6ff7c000  00336200  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_line   00044806  6ff9f000  6ff9f000  00358800  2**0
                  CONTENTS, READONLY, DEBUGGING
 13 .debug_frame  0001e4f0  6ffe4000  6ffe4000  0039d200  2**2
                  CONTENTS, READONLY, DEBUGGING
 14 .debug_str    0000badf  70003000  70003000  003bb800  2**0
                  CONTENTS, READONLY, DEBUGGING
 15 .debug_loc    0008f302  7000f000  7000f000  003c7400  2**0
                  CONTENTS, READONLY, DEBUGGING
 16 .debug_ranges 00033188  7009f000  7009f000  00456800  2**0
                  CONTENTS, READONLY, DEBUGGING

Code: [Select]
QB64 0.954 before and after being stripped:
2011-06-27  14:48           443,699 Copy of libgcc_s_sjlj-1.dll
2011-06-27  14:48         5,666,546 Copy of libstdc++-6.dll
2013-04-17  16:50            96,256 libgcc_s_sjlj-1.dll
2013-04-17  16:50           861,696 libstdc++-6.dll

Windows XP SP3:
2008-04-14  07:00           343,040 msvcrt.dll

Visual C++ 2008 SP1 Express:
from redist:
2008-07-29  13:05           572,928 msvcp90.dll
2008-07-29  13:05           655,872 msvcr90.dll
latest from WinSxS:
2011-04-19  03:51           569,680 msvcp90.dll
2011-04-19  03:51           653,136 msvcr90.dll

One final point is that I think that needing import libraries for linking to DLLs is a bit silly. There is no reason why a linker should not be able to handle it without an import library. In fact, MinGW/GCC's ld.exe can. However, import libraries are still used for the Microsoft DLLs. (Sometimes, the import library might contain some static stuff that might be needed, but in most cases, it is unnecessary.)

Regards,
Michael
« Last Edit: April 17, 2013, 10:21:36 AM by mcalkins »
The QBASIC Forum Community: http://www.network54.com/index/10167 Includes off-topic subforums.
QB64 Off-topic subforum: http://qb64offtopic.freeforums.org/

Billbo

  • Sr. Member
  • ****
  • Posts: 286
    • Email
Re: A couple issues I have with QB64
« Reply #13 on: April 17, 2013, 01:59:11 PM »
Galleon,

Thanks for the information. That's good to know. Not
only do we have a BASIC language here, but two
compilers. Keep up the FANTASTIC! work.

Bill

fluffrabbit

  • Sr. Member
  • ****
  • Posts: 393
Re: A couple issues I have with QB64
« Reply #14 on: April 17, 2013, 04:44:48 PM »
I definitely agree on the import libraries thing. I never understood that bit. However, I don't think that is what is bloating GCC. True, there are libraries that inflate the size of executables with useless debug stuff, but that doesn't explain the hundreds of megabytes for just simple executables with ambiguous names like "cc1".