esql compile error. esql[952]: cc: not found.
Posted in 2008
Summary
On AIX, compiling any .ec file with esql failed with "esql[952]: cc: not found". The cause was that no compiler named 'cc' existed; the fix is to install a C compiler or set the INFORMIXC environment variable to the actual compiler name (e.g. gcc). That led to a second error, "gcc: `-b' must come at the start of the command line", because the esql script passes AIX xlc-specific flags. The advice was to copy $INFORMIXDIR/bin/esql, strip the -b option it passes to the compiler, and use that modified script (earlier in PATH or in place of the original). The poster didn't confirm the outcome.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
I'm getting the esql[952]: cc: not found. error on AIX
when trying to compile any *.ec program.
Did a hello world and it gets the error
Anyone have any ideas why or how to fix.
Thanks,
Dave
↪ replying to kermada
On Thu, 2008-02-21 at 12:00 -0800, kermada wrote:
> I'm getting the esql[952]: cc: not found. error on AIX
> when trying to compile any *.ec program.
> Did a hello world and it gets the error
>
> Anyone have any ideas why or how to fix.
Two possibilities:
1) You don't have a C compiler.
2) You have a C compiler, but it's not called "cc".
Solution to 1: Install a C compiler.
Solution to 2: Set the INFORMIXC environment variable to the correct
name of your C compiler.
HTH,
--
Carsten Haese
http://informixdb.sourceforge.net
↪ replying to Carsten Haese
On Feb 21, 2:12 pm, Carsten Haese <cars...@uniqsys.com> wrote:
> On Thu, 2008-02-21 at 12:00 -0800, kermada wrote:
> > I'm getting the esql[952]: cc: not found. error on AIX
> > when trying to compile any *.ec program.
> > Did a hello world and it gets the error
>
> > Anyone have any ideas why or how to fix.
>
> Two possibilities:
>
> 1) You don't have a C compiler.
>
> 2) You have a C compiler, but it's not called "cc".
>
> Solution to 1: Install a C compiler.
>
> Solution to 2: Set the INFORMIXC environment variable to the correct
> name of your C compiler.
>
> HTH,
>
> --
> Carsten Haesehttp://informixdb.sourceforge.net
Oh, now that was the answer to that question.
Now, I'm getting "gcc: `-b' must come at the start of the command
line".
And gcc is there an compiles the hello.c program just fine.
Dave
↪ replying to kermada
kermada wrote:
> On Feb 21, 2:12 pm, Carsten Haese <cars...@uniqsys.com> wrote:
>
You are using GNU C (gcc) on AIX, but the esql script is passing
arguments that are for the native AIX C compiler, xlc (which is usually
installed with a link to it named cc for compatibility). Make a copy of
$INFORMIXDIR/bin/esql and modify it to remove the -b option it's
passing to $(CC). Then either put the new script earlier in your path
or rename esql and replace it with your modified one.
Art S. Kagel
Oninit
>> On Thu, 2008-02-21 at 12:00 -0800, kermada wrote:
>>
>>> I'm getting the esql[952]: cc: not found. error on AIX
>>> when trying to compile any *.ec program.
>>> Did a hello world and it gets the error
>>>
>>> Anyone have any ideas why or how to fix.
>>>
>> Two possibilities:
>>
>> 1) You don't have a C compiler.
>>
>> 2) You have a C compiler, but it's not called "cc".
>>
>> Solution to 1: Install a C compiler.
>>
>> Solution to 2: Set the INFORMIXC environment variable to the correct
>> name of your C compiler.
>>
>> HTH,
>>
>> --
>> Carsten Haesehttp://informixdb.sourceforge.net
>>
>
> Oh, now that was the answer to that question.
> Now, I'm getting "gcc: `-b' must come at the start of the command
> line".
> And gcc is there an compiles the hello.c program just fine.
>
> Dave
Related threads