• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

gcc 4.3.3

Started by Blonde Guy, 2009.02.01, 17:11:20

Previous topic - Next topic

Blonde Guy

I'm trying to use Paul Smedley's build of GCC to buils PMMail/2.

Most OS/2 compilers are stand alone, and work independently to compile source code. All of the compilers, GCC 3.3.5, VAC and OpenWatcom, work this way.

Paul's build is supposed to just fit into the Mozilla build tools. I need it to work differently to make PMMail/2 build.

Forgetting PMMail/2 for the moment, I'll just try hello.cpp

// a small C++ program
#include <iostream>
int main()
{
    std::cout << "Hello, world!" << std::endl;
    return 0;
}


Installing GCC 4.3.3 for the moment in \usr, and executing the gcc433.cmd I find there, I try to compile hello.cpp, and I get a load of error messages on stderr.

I've attached a text file captured from stderr.

Can anyone explain about setting up the environment for this compiler?

Expert Consulting for OS/2 and eComStation

abwillis

GCC 4.3.3 requires GCC 3.3.5 for now.  The setup script assumes that 3.3.5 and 4.3.3 are both in \usr. 
If you look in \usr\local432 you will see a bin, lib, include, and a couple other directories.  These do not contain all the necessary files (I think mostly due to libc stuff) but rely on the 3.3.5 files.  By default 3.3.5 would go under \usr and have the bin, lib, include, and such directories.  If you have moved them elsewhere (as I have) then you need to point to that location in the script. 
Andy

Paul Smedley

Quote from: abwillis on 2009.02.01, 22:20:16
GCC 4.3.3 requires GCC 3.3.5 for now.  The setup script assumes that 3.3.5 and 4.3.3 are both in \usr. 
If you look in \usr\local432 you will see a bin, lib, include, and a couple other directories.  These do not contain all the necessary files (I think mostly due to libc stuff) but rely on the 3.3.5 files.  By default 3.3.5 would go under \usr and have the bin, lib, include, and such directories.  If you have moved them elsewhere (as I have) then you need to point to that location in the script. 
Andy

Andy is correct - the current GCC 4.3.3 package is not a standalone package - perhaps I need to make this more clear in the readme.os2.  At some point I will create a full package - but this may not occur until I get libc compiling with GCC 4.3.3

Blonde Guy

OK, I did what Andy said, and hello world is compiling nicely. PMMail/2 isn't compiling just yet. Is it possible that GCC 4.3.3 is pickier about some things than GCC 3.3.5? I'm getting a lot of warnings I wasn't getting before. Like this:

acct.c:140: warning: pointer targets in passing argument 3 of 'acct_show_stats' differ in signedness

What I'm trying to figure out now is why this statement (located in a loop)

        (volatile int) folder_n_reindexing       = 0;

compiles under 3.3.5, but under 4.3.3 gives error: lvalue required as left operand of assignment.
Expert Consulting for OS/2 and eComStation

Paul Smedley

Quote from: Blonde Guy on 2009.02.02, 06:26:09
OK, I did what Andy said, and hello world is compiling nicely. PMMail/2 isn't compiling just yet. Is it possible that GCC 4.3.3 is pickier about some things than GCC 3.3.5? I'm getting a lot of warnings I wasn't getting before. Like this:

acct.c:140: warning: pointer targets in passing argument 3 of 'acct_show_stats' differ in signedness

What I'm trying to figure out now is why this statement (located in a loop)

        (volatile int) folder_n_reindexing       = 0;

compiles under 3.3.5, but under 4.3.3 gives error: lvalue required as left operand of assignment.

GCC 4.x is absolutely 'pickier' that GCC 3.3.5 - there were several OS/2 specific files in mozilla that needed to be updated as GCC 3.3.5 accepted the code, but 4.3.x gave errors/warnings.

No idea however on why you get an error with the above code.

Cheers,

Paul.