Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Informix arrogance, and a 4GL question

135 views
Skip to first unread message

David E. Grove (Alaska Dept. Corrections)

unread,
Jul 16, 2002, 1:59:05 PM7/16/02
to
Or should that be ignorance.

We use the GNU C compiler on our Sun UltrEnterprise 3000 running Solaris 8.

Recently, we bought 4GL. I set the C4GLFLAGS environment variable
appropriately, and edited the c4gl script to avoid the "-KPIC" compile
option problem. Manual compiling via c4gl works great..

One of our programmers wants to use the Informix 4GL Programming
Environment. The Programming Environment invokes binaries (i4glc* are not
scripts) when it compiles. The compile options are embedded in the binary,
and "-KPIC" is one of them. I tried hex editing the binaries (including the
lib4gsh.so that I think is linked in) to replace "-KPIC" string with
"-fPIC". I must not have found all the binaries, since gcc still complains
about "-KPIC".

At this point I got on horn to tech support, figuring that there must be a
proper way to use GCC with 4GL. The tech said GCC is only supported under
LINUX. I asked to submit a feature request for Solaris GCC support. The
tech said IBM has hundreds of GCC users, and the request has already been
submitted multiple times. She said the solution is to buy a Sun C compiler.
I then suggested that the documentation be modified, since it clearly says
in the system requirements, "To run the 4GL compiler, you must have a C
compiler installed on your computer." It says "A", not "SUN" C compiler.
She said IBM doesn't consider GCC to be a C compiler. She didn't explain
how the "hundreds of customers" [that use GCC] are able to get by without a
C compiler.

QUESTION: Is there any work around to use GCC with the Informix 4GL
Programming Environment?

Thanks

David Grove


Madison Pruet

unread,
Jul 16, 2002, 2:21:21 PM7/16/02
to
It's been a while since I've used 4GL, but I though that it used ${CC} to
determine the c compiler. You might need to check the documentation about that.

If that is the case, then could you simply set $CC to point to a wrapper script
that then filtered the -KPIC out of the command line? Somthing link

---------------- Dummy CC Script ----------------
CMD=""
while [ $# -gt 0 ]
do
if [ $1 != "-KPIC" ]
then
CMD=${CMD}" "$1
fi
shift
done
GCC ${CMD}
---------------------------------------------------------

--
---------------------------------------
Madison Pruet
Enterprise Replication Product Development
IBM Informix Dynamic Server
Dallas, Texas


Scott Crockford

unread,
Jul 16, 2002, 5:10:57 PM7/16/02
to

I just tried this on our system. If you add the -static option to your c4gl
command line, you don't get the error.

Scott Crockford

Jack Parker

unread,
Jul 16, 2002, 4:46:33 PM7/16/02
to

Most of us (that I know of) don't bother using the 'developers' environment.
It doesn't buy you much and can be a pain (as you are discovering) to work
around. Hence why you are running into issues that would have been solved
eons ago if anybody had bothered to use the thing and whine about it. Most
of us opt(ed) for makefiles.

cheers
j.

Marco Greco

unread,
Jul 17, 2002, 4:55:58 AM7/17/02
to

David,
gcc works fine (subject to certain provisos) on solaris with or without the
IDE (mind you, why would anybody in his right mind want to use the IDE, is
beyond me). The problem is that you are making an unsupported use of your
environmental variables. C4GLFLAGS is used to override certain 4gl specific
flags, while CC is used to override your c compiler (or c compiler options) -
no need to hack anything, not even c4gl (which is, BTW, unsupported) or the
binaries (horror!): the usage of such environmental variables is clearly
documented in several places of the 4gl reference manual (eg chapter 1 or
appendix D)
--
Ciao,
Marco
______________________________________________________________________________
Marco "IBM pays my salary" Greco Standard disclaimers apply!

Informix faq http://www.iiug.org/techinfo/faq/informix.htm
4glworks http://www.4glworks.com
Informix on Linux http://www.4glworks.com/ifmxlinux.htm

Marco Greco

unread,
Jul 17, 2002, 5:11:00 AM7/17/02
to

Actually, come to think of it, there is even INFORMIXC (you can tell I haven't
been doing much SCO on linux stuff with iBCS, lately!), and TFM even points you
to the certain provisos to be aware of when using gcc!

Malcolm Weallans

unread,
Jul 17, 2002, 6:06:18 AM7/17/02
to

Marco's response merely serves to underline the arrogance that many
people show towards the question of using the programmers development
environment.
A product provides a facility which some users find useful. It works
for them and they like it. Other more qualified users find it is
lacking in some sophistication and therefore tell the first user that he
shouldn't use it. And then they use that as an argument for not
maintaining the facility correctly.
I'm sorry, but if Informix continue to provide the developers
environment and continue to document it in the manuals then they must be
prepared to fully support it. And that applies to all the support
staff.
I know whole companies who use the developers environment, have done so
for years, and don't understand why they shouldn't. But they aren't
command line junkies.

regards

Malcolm

DISCLAIMER
This message contains confidential information and is intended only for
the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. The sender therefore does not accept liability for any
errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. If verification is required please
request a hard-copy version.

Marco Greco

unread,
Jul 17, 2002, 6:57:26 AM7/17/02
to

Malcolm,
I'm not too sure what you are driving at: the IDE is supported, maintained and
works as expected, indeed it even does what David says it can't do, and it has
done it since version 4! How does my opinion (which is mine, not IBM's) on its
usefullness have any relation to whether it is/isn't/should be/should't be
maintained correctly?
The whole point of my post was that David should have just RTFM, and he would
have found that the product, which *he* reckons IBM does not maintain properly,
does what he needs...
--
Ciao,
Marco
______________________________________________________________________________

Marco "IBM pays my salary" Greco Standard disclaimers apply!

Tim Schaefer

unread,
Jul 17, 2002, 8:44:51 AM7/17/02
to
Ackshully....

I found the IDE promotes to a certain degree some bad
programming practice, namely many of the features of
the IDE are specific to a point that the programs become
dependent on the IDE in order to maintain them. This is
one of the faults that I find with it. On the other hand the
debugger has been useful to me on a couple of occasions,
especially when the customer actually bought the thing
along with c4gl. Thanks to the marketing department at
Informix, over the years, many customers bought 4GL
without the debugger or the IDE. So in my experience I
was not always able to use either the IDE or the debugger,
and had to learn the command-line way. This is one error
the marketing dept did that was a good thing, but they
should have just gone ahead and destroyed the IDE along
time ago instead of even offering it as an option. The debugger
is nice but it too didn't always work for me. I ended up instead
becoming a better programmer and using lots of display
statements. :-)

I also found some of the newbies using the IDE were adopting
bad program maintenance habits, becoming messy and/or lazy,
when they should have taken the time to learn Make and SCCS
or RCS. While you may argue that Make is tedious, and not for
the weak, it was designed to save you time and allow a good
structure in programming practice. It was designed to work
with the idea in mind that you break up your programs into
smaller, more manageable pieces, thus saving you time when
making changes, etc.

So I opted out a long time ago, and built my own make_mk
tool, which generates makefiles for 4GL programs. I haven't
used it in years, but I do know it will compile I4GL as well as
c4gl programs, and even generate the runner for the 4go's.
It is extremely simple to use, one merely creates a list of
files to be compiled, and voila, the makefile is created. It
really can't get any better than that unless there is a voice
recognition system on your computer that will let you talk
to the computer and tell it to make the program.

Regarding Sun's compiler, they charge an arm and a leg
for it, so a lot of sites don't have it. One of these days
Sun will get with the program, just like SCO. :-)

You can still get a copy of make_mk and other oddities
at my website, http://www.datad.com . Look in the tools
section. There is even bas_4gl for the brave which generates
complete one-table 4GL programs for you by simply giving
the program a table name. I also have WebTop DBA, which
is a prototype of a DBA tool, but this is for the really brave,
and strictly a work-in-progress... well, not anymore at all
actually.

:-)

Thanks,

Tim


"Malcolm Weallans" <MWEA...@lqgroup.org.uk> wrote in message news:ah3hkn$7ei$1...@terabinaries.xmission.com...

David E. Grove (Alaska Dept. Corrections)

unread,
Jul 17, 2002, 12:21:36 PM7/17/02
to
Thank you.

Your suggestion was effective.

David Grove


"Madison Pruet" <mpr...@attbi.com> wrote in message
news:3D346363...@attbi.com...

Richard Head

unread,
Jul 17, 2002, 12:36:44 PM7/17/02
to
Malcolm Weallans wrote:
> Marco's response merely serves to underline the arrogance that many
> people show towards the question of using the programmers development
> environment.

Did it? It seemed merely to be a simple, throwaway line to me.

> A product provides a facility which some users find useful. It works
> for them and they like it. Other more qualified users find it is
> lacking in some sophistication and therefore tell the first user that he
> shouldn't use it. And then they use that as an argument for not
> maintaining the facility correctly.

Do they? I didn't see anything in Marco's post that seemed to show that
the facility was not being maintained correctly or that he was
advocating it. Do you have some evidence for this assertion?

> I'm sorry, but if Informix continue to provide the developers
> environment and continue to document it in the manuals then they must be
> prepared to fully support it. And that applies to all the support
> staff.

Personally, if I were a support staff member (which I thankfully am not)
and someone told me that they had binary edited my hypothetical
company's product executables and it wasn't working, I would probably
have told them to **** off, right after I'd stopped laughing.

David seemed very sure that Informix was arrogant or ignorant, when he
had clearly not not even bothered to crack the spine on the manual, or
even better, done a search on the PDF version. I am guilty of arrogance
and ignorance often enough myself to recognise it in others, and David
arrogantly assumed that the best way of doing it was to patch
executables and was ignorant of the supported and documented way.

To be fair to David, though, it does seem that the support staff member
hadn't RTFMed either.

> I know whole companies who use the developers environment, have done so
> for years, and don't understand why they shouldn't. But they aren't
> command line junkies.
>

> -----Original Message-----
> From: Marco Greco [mailto:ma...@4glworks.com]
>

Richard Head

unread,
Jul 17, 2002, 12:39:20 PM7/17/02
to
Tim Schaefer wrote:
>
> time ago instead of even offering it as an option. The debugger
> is nice but it too didn't always work for me. I ended up instead
> becoming a better programmer and using lots of display
> statements. :-)

In the days before you wrote perfect code first time, every time, eh?

David E. Grove (Alaska Dept. Corrections)

unread,
Jul 17, 2002, 1:44:27 PM7/17/02
to
I found the following to be true:

1) In our Solaris 64 bit environment, the Informix 4GL scripts and
binaries which compile programs call the C compiler with "-KPIC" (to creae
position independent code) and a "-xarch=v9a" (to set SPARVv9 architecture)
options. The binaries, as delivered, and used as directed in the manual,
(which I read thoroughly), do not work with GCC in our Sun/Solaris 8, 64 bit
Informix 4GL. This behavior is demonstrable and repeatable. It is clearly
observable and understandable by using a script to catch the compile command
that the i4glc* binaries send to the compiler. The unambiguous result is
that the binaries form a compiler option string which is Sun-specific.

2) GCC doesn't support a "-K" option, and the "-x" option means
something completely different (sets the language, not the architecture).

3) There are work arounds for GCC: use "-f" instead of "-K"; use "-m64"
to create 64 bit code (automatically sets the SPARCv9a architecture); either
eliminate the "-xarch=v9a" flag, or insert "-x none" in the GCC call.

4) The c4gl script can be easily edited to accomplish this. I did this
and it worked.

5) The binaries are not easily altered.

6) C4GLFLAGS may be used as intended to feed compile options to the C
compiler when using Informix 4GL. This handy environment variable can be
used to pass options, such as "-fwritable-strings", which the manual
identifies as required when using GCC. (It enables the Informix-used, but
poor practice of writing to constants).

7) IBM Informix tech support told me that they have "hundreds of
customers" that use GCC.

8) IBM Informix tech support told me that they do not consider GCC to
be a C compiler.

9) IBM Informix tech support told me that a Sun C compiler is required.

10) The documentation says "A" C compiler is required, without specifiying
any particular vendors or products.

11) Madison Pruet helpfully suggested using a shell script wrapper to
edit the invoking string and actually execute the compilation.

12) My tech support call was not made on the basis of failed binary
edits. (That lark was merely a capricious, last attempt to solve a problem
before calling tech support.) The basis of my call was that a properly
bought, licensed, and supported product failed to perform according to the
manual.

13) It is not my job to choose the tools my boss or our programmers use.
It is my job to support their efforts, and get the tools installed and
performing according to the documentation.

14) I observe that, both in this newsgroup, and other fora, other folks
have had similar problems getting Informix 4GL to work with GCC.
(Specifically, the "-KPIC" option has been a problem.)

BOTTOM LINE:
Informix 4GL can work with GNU GCC. One can use C4GLFLAGS to pass
"-fwritable-stores" and other options that may be required by Informix 4GL.
One can edit the c4gl script so that manual compiles work. One can use a
script wrapper to effectively edit the compiler invocation that the binaries
pass, thus enabling compilation from the Programming Environment.


Thanks to those who responded, especially Madison Pruet.

David Grove


"David E. Grove (Alaska Dept. Corrections)"

<david...@correct.state.ak.us> wrote in message
news:uj8nmq5...@corp.supernews.com...

David E. Grove (Alaska Dept. Corrections)

unread,
Jul 17, 2002, 2:16:44 PM7/17/02
to
Lest there be any misunderstanding...

The "arrogance" in my subject line referred to the attitude displayed by
asserting that GNU GCC is not a C compiler. I inferred that the tech
implied that free software doesn't "count". The engineer as much as said
that when she said that the phrase "a C compiler" in the manual really meant
Sun Visual Workbench (which is now known as Forte) C. My point of
contention is that, if that be the case, then state it clearly. Don't
sandbag me by re-interpreting the pre-requisites after we have bought and
paid for the product.

I intended institutional, not personal, denigration.

David Grove


"David E. Grove (Alaska Dept. Corrections)"
<david...@correct.state.ak.us> wrote in message

news:ujbb7bs...@corp.supernews.com...

Jack Parker

unread,
Jul 17, 2002, 4:01:30 PM7/17/02
to

Interesting point. I can understand a non-hardware-specific database vendor
saying something generic like that - and then covering it more thoroughly in
the release notes.

Informix has no control over all of the other 'c' compilers, they certainly
can't try to support them from the tech desk - can you imagine someone just
trying to maintain the list of what compilers worked with 4gl? That would
be a full time job.

HP also delivers a generic (fairly useless) 'c' compiler with HP-UX. If you
want to do real work you have to purchase the real compiler. I don't recall
which of those 4gl works with.

cheers
j.

----- Original Message -----
From: "David E. Grove (Alaska Dept. Corrections)"
<david...@correct.state.ak.us>

To: <inform...@iiug.org>
Sent: Wednesday, July 17, 2002 2:16 PM
Subject: Re: Informix arrogance, and a 4GL question

Tsutomu Ogiwara

unread,
Jul 17, 2002, 11:10:32 PM7/17/02
to

Hi David.

Try it.

setenv INFORMIXC gcc
set path=(/usr/local/bin $path) <- /usr/local/bin has gcc.
setenv C4GLFLAGS -fwritable-strings

Regards.


--
Tsutomu Ogiwara from Japan.


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Obnoxio The Original And Best

unread,
Jul 18, 2002, 2:05:44 AM7/18/02
to
David E. Grove (Alaska Dept. Corrections) wrote:
> Lest there be any misunderstanding...
>
> The "arrogance" in my subject line referred to the attitude displayed by
> asserting that GNU GCC is not a C compiler. I inferred that the tech
> implied that free software doesn't "count". The engineer as much as said
> that when she said that the phrase "a C compiler" in the manual really meant
> Sun Visual Workbench (which is now known as Forte) C. My point of
> contention is that, if that be the case, then state it clearly. Don't
> sandbag me by re-interpreting the pre-requisites after we have bought and
> paid for the product.
>
> I intended institutional, not personal, denigration.

Oh, well that's perfectly alright then. And really, you should have
intended personal denigration (which is much more prevalent here
anyway!) because another tech support engineer pointed out how the one
you spoke to was "inadequately informed"...

Andy Lennard

unread,
Jul 18, 2002, 2:16:08 AM7/18/02
to
>
> 4) The c4gl script can be easily edited to accomplish this. I did this
>and it worked.
>
> 8) IBM Informix tech support told me that they do not consider GCC to
>be a C compiler.

I was told similar things about esql when I encountered problems using
gcc, .ecp files and wanted to create a threaded app. (>2yrs ago)

I was told that gcc was not a supported compiler on Sun. It was only
supported on the Linux platform.

I have a modified esql script...

--
Andrew Lennard an...@kontron.demon.co.uk

QueriX / Mehdi

unread,
Jul 18, 2002, 6:45:37 AM7/18/02
to

GCC should work fine, it is a shame you had to pay for your copy of 4GL
Compiler. :)

========== ************* ====*************==========

Querix is supplier of Informix 4GL Compatible compilers, and various GUI front
ends to traditional 4GL programs, and a variety of back end DBs.

Querix Development tools are FREEWARE for Informix and can be downloaded
from:

http://www.querix.com/

========== ************* ====*************==========
Mehdi

Farrell, Thomas M.Mr. NGB-ARNG

unread,
Jul 18, 2002, 8:09:49 AM7/18/02
to

Hmm...

Andy Lennard wrote:
"I was told that gcc was not a supported compiler on Sun. It was only
supported on the Linux platform."

Interesting. During the summer of 2000 on a previous contract, we moved to
GCC on Solaris 2.6 after confirming with Informix that it was a supported
compiler on Solaris for ESQL/C. Unfortunately I do not have the email
stating this anymore.

Cheers,
Thom

Andy Lennard

unread,
Jul 18, 2002, 9:26:17 AM7/18/02
to
In message <ah6d1m$s09$1...@terabinaries.xmission.com>, "Farrell, Thomas M.Mr. NGB-
ARNG" <Thomas....@ngb.army.mil> writes

Extracts from 3 e-mails from Informix, August/September 2000:

"I am afraid that GCC is not a supported compiler, so I will not be able to log
this as a bug."

"The only compiler that we test against is the system default. So for the case of
Solaris this would be the Sun compiler."

"The only compiler that is supported with the Solaris version of ESQL is
SPARCworks which is the one used to compile the product. GCC is supported, but
only with the Linux version.

I hope this helps to clarify the situation."

--
Andrew Lennard an...@kontron.demon.co.uk

Farrell, Thomas M.Mr. NGB-ARNG

unread,
Jul 18, 2002, 11:24:28 AM7/18/02
to

Andy,

I hear you but, none the less, I got a quite different answer in the past to
what appears to be the same question.

Cheers,
Thom

David E. Grove (Alaska Dept. Corrections)

unread,
Jul 18, 2002, 12:18:07 PM7/18/02
to
Yes, I understand the potential problem if IBM Informix were to try to
support every C compiler.

However, I'm not suggesting that they bear that burden. What I have in mind
is something more along the lines of first, they identify and disclose the
specific options or capabilities they require in a C compiler. Then, have a
config file which sets up those options. Informix could ship product with
predefined entries for any specific compiler(s) of their choosing. That way
Informix supports only the compilers they choose, yet users have the
flexibility to edit the config file to use compilers they might choose.
Users would bear the burdens (and reap any rewards) of finding a suitable
alternative compiler and editing the config file.

DG


"Jack Parker" <jpa...@artentech.com> wrote in message
news:ah4j5g$3a8$1...@terabinaries.xmission.com...

Obnoxio The Original And Best

unread,
Jul 18, 2002, 12:37:59 PM7/18/02
to
David E. Grove (Alaska Dept. Corrections) wrote:
> Yes, I understand the potential problem if IBM Informix were to try to
> support every C compiler.
>
> However, I'm not suggesting that they bear that burden. What I have in mind
> is something more along the lines of first, they identify and disclose the
> specific options or capabilities they require in a C compiler. Then, have a
> config file which sets up those options. Informix could ship product with
> predefined entries for any specific compiler(s) of their choosing. That way
> Informix supports only the compilers they choose, yet users have the
> flexibility to edit the config file to use compilers they might choose.
> Users would bear the burdens (and reap any rewards) of finding a suitable
> alternative compiler and editing the config file.

I am confused as f*ck: why don't you just RTFM, then use the environment
variables and see what happens? I mean, if you were prepared to patch
the binaries, you patently were prepared to just see if it worked?

To be honest, I've generally used the shipped compiler for everything,
even on HP <shudder>, but even when I've swapped in gcc I never had a
problem.

David E. Grove (Alaska Dept. Corrections)

unread,
Jul 18, 2002, 1:17:53 PM7/18/02
to
I have read the manual, I have tried several experiments (all before I
called tech support or posted any messages), and I know exactly what
happens. Both the 4GL binaries and scripts pass options which cause gcc to
fail. The script can be easily fixed.

The manual makes some reference to GCC. (Presumably, this would be the same
GCC that Informix tech support says is not a C compiler.) The manual does
not say how to eliminate the hardwired options. Specifically, it does not
say how to eliminate the "-K" option. It does not say how to eliminate the
"-xarch=v9a" option. Either (both) of these will cause gcc to fail. There
is no environment variable to undo these options which are hardwired into
the compiler call by i4glc* binaries. (The c4gl script can be edited, of
course.) There is a C4GLFLAGS environment variable whose value is inserted
into the compiler invocation by both c4gl and the binaries. This is useful
for setting such things as "-fwritable-strings" (which the manual mentions
as being necessary if one uses the [non-compiler] GCC compiler) and "-m64"
(which essentially replaces in GCC the "-xarch-v9a" option that the Sun
compiler uses). However, C4GLFLAGS can't be used to erase the "-K" and "-x"
options which are already passed by the i4glc* binaries. (One can add "-x
none" to the C4GLFLAGS string, which GCC will use to "cancel" the earlier
specification of "-xarch=v9a" that the binaries insert).

If there were a shipped C compiler with Solaris, we would use it.

Regards,

David Grove


"Obnoxio The Original And Best" <obn...@hotmail.com> wrote in message
news:3D36EEE7...@hotmail.com...

James Maes

unread,
Jul 18, 2002, 3:08:30 PM7/18/02
to

Could you not replace your call to gcc with a call to a script which
filtered out the unneeded parameters and then call gcc?

David E. Grove (Alaska Dept. Corrections)

unread,
Jul 18, 2002, 3:47:38 PM7/18/02
to

Thank you, Mr. Maes, that is exactly the solution I am using.

I should have thought of it myself, and not wasted bandwidth here and over
the phone, trying to argue that GCC is, in fact, a C compiler. :-)

DG

0 new messages