OS/2, eCS & ArcaOS - Technical > Programming
Compiling PMMail with GCC 4.9.2
Neil Waldhauer:
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?
Dave Yeo:
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: ---[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
--- End code ---
Why aren't you installing GCC 4.9.2 with YUM/RPM or ANPM?
Gregg Young:
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:
--- Quote from: Dave Yeo on June 03, 2019, 09:18:03 pm ---
Why aren't you installing GCC 4.9.2 with YUM/RPM or ANPM?
--- End quote ---
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
Dave Yeo:
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.
Navigation
[0] Message Index
[#] Next page
Go to full version