Error compiling myschema on Solaris 7 X86
Posted in 2007
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
I get the following error making myschema:
2:$ gmake -f myschema.mk.norcs
INFORMIXC=gcc esql -O3 -EDNOINT8=1 -c myschema.ecmyschema.ec:147: invalid macro name `1'
myschema.eh:172: `defined' without an identifier
myschema.eh:172: parse error
gmake: *** [myschema.o] Error 1
3:% esql -V
INFORMIX-ESQL Version 7.10.UD1
6:% gcc -v
Reading specs from /usr/sww/pkg/egcs-1.1.2/lib/gcc-lib/i386-pc-
solaris2.6/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
On Feb 13, 12:01 am, "JaxenT" <jax...@gmail.com> wrote:
> I get the following error making myschema:
>
> 2:$ gmake -f myschema.mk.norcs
> INFORMIXC=gcc esql -O3 -EDNOINT8=1 -c myschema.ec> myschema.ec:147: invalid macro name `1'
> myschema.eh:172: `defined' without an identifier
> myschema.eh:172: parse error
> gmake: *** [myschema.o] Error 1
>
> 3:% esql -V
> INFORMIX-ESQL Version 7.10.UD1
>
> 6:% gcc -v
> Reading specs from /usr/sww/pkg/egcs-1.1.2/lib/gcc-lib/i386-pc-
> solaris2.6/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
Regarding your problem, I can not help directly. I can recommend to
register with Sun and get their Sun Studio for free. I am just not
sure if it suports Solaris 2.6 that you seem to use, but that can be
checked. C, C++ and FORTRAN compilers are included. I never had
problems with Sun compilers, and I did with gcc compiling Informix
related stuff, albeit I am not close to have an expert knowledge of
gcc.
BTW: Anyone care to say if we can expect Informix on Solaris x86/x64
again? I am tired of following kernel, glibc etc variations. And I
don't consider to use BSOD OS for databases on Intel/AMD.
Darko Krstic
JaxenT wrote:
You have a VERY old esql/c, and ancient C compiler that does not recognize
ANSI macro constructs, and an older version of the myschema source. I'll
help where I can, but you'll likely have to upgrade SOMETHING!
> I get the following error making myschema:
>
> 2:$ gmake -f myschema.mk.norcs
> INFORMIXC=gcc esql -O3 -EDNOINT8=1 -c myschema.ec> myschema.ec:147: invalid macro name `1'
I think that's my problem, and I don't know why it even compiles for me! On
line 147 (line 155 in my release) remove the redundant '#define MAINCODE 1'
that follows the 'EXEC SQL DEFINE MAINCODE 1;' on the previous line. The
first macro is making the second look like '#define 1 1 '. AAARRGGHH!!
> myschema.eh:172: `defined' without an identifier
> myschema.eh:172: parse error
> gmake: *** [myschema.o] Error 1
Can't help much with this. Your C preprocessor is very old. Change any
constructs that I used that look like:
#if defined( VARNAME )
--into something like:
#ifdef VARNAME
which is the older syntax. I seriously don't like that syntax so, sorry,
but I'm not 'fixing' the distributed source.
>
> 3:% esql -V
> INFORMIX-ESQL Version 7.10.UD1
ESQL/C 7.10 was distributed in 1994 & 1995! You should be able to use the
latest CSDK version and the ESQL/C that's included in that. It's free and
backward compatible. You'll want to install it in a separate directory from
INFORMIXDIR until you recompile/relink all of your existing ESQL/C code,
though, the C code that the ESQL/C preprocessor generates changed after
v7.24, so the shared libraries are likely not compatible with older
executables. However, recompiled/relinked tasks should talk to whatever
release of IDS you are running without problems.
> 6:% gcc -v
> Reading specs from /usr/sww/pkg/egcs-1.1.2/lib/gcc-lib/i386-pc-
> solaris2.6/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
The Solaris release is circa 1993-1994 also, IB.
And GCC ... nevermind you know what you've got and why you've got it. Sorry
(and I sincerely mean that in whichever way you choose to take it).
Art S. Kagel