Re: ESQL, 4GL and C/gcc on Solaris




On 7/25/05, Neil Truby <neil.truby@xxxxxxxxxxx> wrote:
> I'm trying to compile some elderly programs on a system we're migrating to
> IDS 10.0, 4GL 7.32 and ESQL , all FC versions, all on Solaris 9 on a 64-bit
> server.
> Solaris 9 doesn't come with a C compiler as standard, so I've installed gcc.
>
> When I try to compile:
>
> # make -f Makefile
> cfglgo fgiusr.c extras.o nfile.o ndates.o getakey.o read_ln.o scan_weeks.o
> read_merged.o last_access.o -o /home/caps/tabs/bin/run4gl
> gcc: language arch=v9 not recognized
> gcc: language arch=v9 not recognized
> <repeated many times>
> gcc: language arch=v9 not recognized
> ld: fatal: file fgiusr.c: unknown file type
> ld: fatal: File processing errors. No output written to
> /home/caps/tabs/bin/run4gl
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `run4gl'
>
> I read some cdi stiff that says that the 'arch' flag is a Solaris C thing,
> and commented it out of $INFORMIXDIR/bin/cfglgo
>
> Now I get:
> # make -f Makefile
> cfglgo fgiusr.c extras.o nfile.o ndates.o getakey.o read_ln.o scan_weeks.o
> read_merged.o last_access.o -o /home/caps/tabs/bin/run4gl
> ld: warning: file /opt/informix/10.0/lib/tools/libfmain.a(fgiapi.o): wrong
> ELF class: ELFCLASS64
> ld: warning: file /opt/informix/10.0/lib/tools/lib4io.a(effin.o): wrong ELF
> class: ELFCLASS64
> ld: fatal: file /opt/informix/10.0/lib/esql/libiffgisql.so: wrong ELF class:
> ELFCLASS64
> ld: fatal: file /opt/informix/10.0/lib/libifasf.so: wrong ELF class:
> ELFCLASS64
> ld: fatal: file /opt/informix/10.0/lib/esql/libifgen.so: wrong ELF class:
> ELFCLASS64
> ld: fatal: file /opt/informix/10.0/lib/esql/libifos.so: wrong ELF class:
> ELFCLASS64
> ld: fatal: file /opt/informix/10.0/lib/esql/libifgls.so: wrong ELF class:
> ELFCLASS64
> ld: fatal: file /opt/informix/10.0/lib/esql/checkapi.o: wrong ELF class:
> ELFCLASS64
> ld: fatal: File processing errors. No output written to
> /home/caps/tabs/bin/run4gl
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `run4gl'
>
> Can it not all be made to work with gcc? Do I need to buy a pukka Solaris C
> compiler?


You're gonna need to do some fairly extensive surgery on the esql,
c4gl and cfglgo scripts.
Take copies before you start!

Assuming you have a sufficiently recent version of GCC (v3.x if not
4.0.x), then you should be able to rig things so that -xarch=v9 (or
sparcv9) is replaced by '-m64'. You need to replace '-KPIC' with
'-fPIC'. There may be other options that you need to fettle too (or
remove). If you're not using GCC 4.0.x, you should add
-fwriteable-strings; if you are using 4.0.0, you can't do that (and
you should probably, therefore, downgrade to 3.x). ESQL/C will be OK
as long as you're careful; C4GL may or may not be OK (it usually ends
up with a core dump when it tries to modify a non-writable string);
I4GL-RDS might be OK - it is unlikely to have any strings in read-only
memory..


--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@xxxxxxxxxxxxx, jleffler@xxxxxxxxxx
Guardian of DBD::Informix v2005.01 -- http://dbi.perl.org/

sending to informix-list
.



Relevant Pages

  • Re: Need to install gcc (Solaris 9) - some packages missing?
    ... |compile Apache on a Sparc machine. ... |install a binary gcc distribution, but according to some Solaris FAQs ...
    (comp.unix.solaris)
  • Re: ESQL, 4GL and C/gcc on Solaris
    ... > I'm trying to compile some elderly programs on a system we're migrating to ... > Solaris 9 doesn't come with a C compiler as standard, so I've installed gcc. ... > ld: fatal: File processing errors. ... > make: Fatal error: Command failed for target `run4gl' ...
    (comp.databases.informix)
  • Re: C and GCC Compilers....
    ... > compile it using C. ... GCC doesn't seem to be available as a binary, ... > gunzipping the downloaded .gz file I get a tar file; the Solaris tar ... How do I install it from ...
    (comp.unix.solaris)
  • Re: native compiler question
    ... I've compiled it with gcc ... > someone who was trying to run it on another Solaris box, ... gcc generated shared libraries should work. ... You compile on the oldest possible Solaris OS you care to ...
    (comp.unix.programmer)
  • Re: native compiler question
    ... Tom Miskiewicz wrote: ... > trying to run it on another Solaris box, on that there is no gcc. ... If I compile the shared lib with cc, ...
    (comp.unix.programmer)