Author Topic: Compiling PMMail with GCC 4.9.2  (Read 401 times)

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 25
  • Posts: 420
    • View Profile
    • Blonde Guy
Compiling PMMail with GCC 4.9.2
« on: June 03, 2019, 07:42:03 pm »
I'd like to compile PMMail using GCC 4.9.2. Currently I have GCC 3.3.5 and a bunch of tools working.

I had hoped to just drop in GCC 4.9.2 in place of GCC 4.9.2, but somehow my GCC 4.9.2 setup is wrong.

It compiles PMMail just fine until it hits a va_start() macro. I have the same trouble compiling the attached vatest.c

In file included from k:/programs/gcc/include/machine/stdarg.h:2:0,
                 from k:/programs/gcc/include/stdarg.h:2,
                 from vatest.c:1:
vatest.c: In function 'int sum(int, ...)':
vatest.c:18:4: error: '__builtin_stdarg_start' was not declared in this scope
    va_start(ap, num_args);

Those don't look like the right include files to me. Something is wrong, but what?
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 10
  • -Receive: 138
  • Posts: 1980
    • View Profile
Re: Compiling PMMail with GCC 4.9.2
« Reply #1 on: June 03, 2019, 09:18:03 pm »
I can't find a reference anywhere to a header containing the __builtin_stdarg_start but attempting to compile here using GCC 4.9.2 results in
Code: [Select]
[Z:\Mozprofiles\Downloads]gcc -Zomf vatest.c

[Z:\Mozprofiles\Downloads]dir vatest*

The volume label in drive Z is mozprofiles.
The Volume Serial Number is E5C3:E5BD.
Directory of Z:\Mozprofiles\Downloads

 6-03-19 12:05p           453      0 a---  vatest.c
 6-03-19 12:13p         4,904      0 a---  vatest.exe
        2 file(s)       5,357 bytes used
                   20,105,801 K bytes free

[Z:\Mozprofiles\Downloads]vatest.exe
Sum of 10, 20 and 30 = 60
Sum of 4, 20, 25 and 30 = 79

Why aren't you installing GCC 4.9.2 with YUM/RPM or ANPM?

Gregg Young

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 44
    • View Profile
Re: Compiling PMMail with GCC 4.9.2
« Reply #2 on: June 03, 2019, 11:37:30 pm »
Try reinstalling libc-0.1.1-1-devel which is where the header for this is located. The header is "include\386\stdarg.h". It defines va_start.

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 25
  • Posts: 420
    • View Profile
    • Blonde Guy
Re: Compiling PMMail with GCC 4.9.2
« Reply #3 on: June 04, 2019, 02:35:38 am »

Why aren't you installing GCC 4.9.2 with YUM/RPM or ANPM?

I tried installing gcc with yum/rpm. I can compile the example code with that gcc.

But I can't find the environment. How does that copy of gcc find its header files?

Neil
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 10
  • -Receive: 138
  • Posts: 1980
    • View Profile
Re: Compiling PMMail with GCC 4.9.2
« Reply #4 on: June 04, 2019, 05:07:48 am »
It's basically hard coded to look in @UNIXROOT/usr/include as well as @UNIXROOT/usr/lib/gcc/i386-pc-os2-emx/4.9.2/include and include-fixed. You can override with set C_INCLUDE_PATH and CPLUS_INCLUDE_PATH.

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 25
  • Posts: 420
    • View Profile
    • Blonde Guy
Re: Compiling PMMail with GCC 4.9.2
« Reply #5 on: June 05, 2019, 06:05:53 am »
OK, I combined gcc installed by rpm/yum with the rest of the PMMail build environment. It looks promising.

I can supply ilink.exe myself, but is there one in the rpm/yum universe?
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 10
  • -Receive: 138
  • Posts: 1980
    • View Profile
Re: Compiling PMMail with GCC 4.9.2
« Reply #6 on: June 05, 2019, 06:56:47 am »
Use wlink (wl.exe). Run emxomfld with no parameters to see the environment variables to set to use it. You may have to also use lxlite on the resulting binary as wlink doesn't pack the binary like ilink can do. Package is watcom-wlink-hll.
« Last Edit: June 05, 2019, 07:01:33 am by Dave Yeo »