Utils2_ak error gcc: error: unrecognized command l
Posted in 2017
On AIX/POWER8, building Art Kagel's utils2_ak with gcc failed because the Informix esql script (and the makefile) pass IBM xlc-specific flags such as -q64, -qchars=signed, -qlanglvl=extc99, -qmaxmem, which gcc rejects. Advice given: either install/use xlc, or copy the esql script and edit it, stripping the -q* flags from the CC, CC_TH, CPP and CPP_TH lines and substituting -m64, plus change -q64 to -m64 and drop -qmaxmem in both makefiles; the portable ar utility (ar_port/ar2) is also needed for myschema. The poster still reported errors after a partial edit, and the thread shows no confirmed successful build.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Migration, Import/Export & Data Conversion, Platform-Specific Issues, Internationalization & Character Sets
Hi guys,
We download utils2_ak and installed in server
System Model: IBM,8286-42A
Machine Serial Number: 213713W
Processor Type: PowerPC_POWER8
Processor Implementation Mode: POWER 8
Processor Version: PV_8_Compat
Number Of Processors: 2
Processor Clock Speed: 3891 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 5 QROPSIFIMG
Memory Size: 20480 MB
Good Memory Size: 20480 MB
Platform Firmware level: SV830_068
Firmware Version: IBM,FW830.10 (SV830_068)
With GCC
:/home/crcruz/Utils2_ak:gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/lto-w
rapper
Target: powerpc-ibm-aix7.1.0.0
Configured with: ../gcc-4.7.2/configure --with-as=/usr/bin/as
--with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware
--mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-threads
--enable-version-specific-runtime-libs --disable-nls
--enable-decimal-float=dpd --host=powerpc-ibm-aix7.1.0.0
Thread model: aix
gcc version 4.7.2 (GCC)
And Makefile
#
# This version is GNU Make specific
#
# If your copy of GNU make is not called 'make' or is not first in
# your path set the variable MAKE appropriately so the recursive make
# of myschema will use the correct version of make.
MAKE=make
.SUFFIXES:
.SUFFIXES: .ec .c .o
# INSTALLDIR is used when you run 'make install'. Set it to the bin directory
# you would like the executables installed into.
INSTALLDIR=/usr/local/bin
# Uncomment appropriate options.
ESQL=/informix/bin/esql
# ESQL=c4gl # For using C4GL 7.xx if you don't have iSDK or ESQL/C
# PLTFM_FLAGS=-O
# PLTFM_FLAGS=-O3 # For GNU C (gcc) to maximize code optimization
# PLTFM_FLAGS=-O -Ae # For HP's C compiler to enable ANSI source parsing
# PLTFM_FLAGS=-O -Ae +DD64 # For HP to enable ANSI and 64bit executable
## PLTFM_FLAGS=-O2 -qmaxmem=32768 # For AIX to improve code optimization if
desired
PLTFM_FLAGS=-q64 -O2 -qmaxmem=32768 -static # AIX 64bit mode static link
# PLTFM_FLAGS=-O -xarch=v9 # For Solaris to get a 64bit executable using
Solaris C or WS
CFLAGS=$(PLTFM_FLAGS) -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 # Use my getopt w/
listdb7 & dostats
GETOPT=getopt.c
GETOPTFLG=-I.
# If you have AIX or an older HPUX you may need to download and compile my
# portable ar utility ar2 from the IIUG Software Repository. In that case
# uncomment the following line and comment the one after.
AR=ar2
##AR=ar
EDFLAGS=
##EDFLAGS=-g # For debugging in ESQL/C source.
# EDFLAGS=-G # For debugging in C source (better).
# EDFLAGS=-g -keep # For debugging using the C4GL compiler script
##GEN=-L/usr/lib -lgen # Library containing the function basename().
GEN=-lc # On AIX and some other BSD UNIXes the libgen funcs are in libc
##ECFLAGS=$(EDFLAGS) $(CFLAGS)
ECFLAGS=$(EDFLAGS) $(CFLAGS) -DNOINT8=1 -EDC4GL_720_COMPILER=1 # Needed for
ESQL/C 7.xx or C4GL 7.xx
#ECFLAGS=$(EDFLAGS) $(CFLAGS) -EDbigint=int # Needed for CSDK versions prior
to 3.50 that don't
# support BIGINT. Note support of very large tables
# is disabled for these CSDK versions.
CC=gcc
# CC=cc # For HP and others without GNU C
# CC=xlc # For AIX
INFORMIXC=$(CC)
progs: ul printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct
sqlstruct myschema dbscript dbsavail dbmove bload bunload
install: progs
chmod u+w printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct
sqlstruct myschema ul bload bunload mydbdiff drive_dostats dbsc
ript dbsavail dbmove
chmod +x printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct sqlstruct
myschema ul bload bunload mydbdiff drive_dostats dbscr
ipt dbsavail dbmove
cp -p printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct sqlstruct
myschema ul mydbdiff drive_dostats dbscript dbsavail dbmo
ve $(INSTALLDIR)
-rm $(INSTALLDIR)/bunload $(INSTALLDIR)/bload
-ln $(INSTALLDIR)/ul $(INSTALLDIR)/bload
-ln $(INSTALLDIR)/ul $(INSTALLDIR)/bunload
touch -h $(INSTALLDIR)/bunload $(INSTALLDIR)/bload
ul: ul.ec
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^ $(GEN)
bload: ul
-rm bload
-ln ul bload
touch -h bload
bunload: ul
-rm bunload
-ln ul bunload
touch -h bunload
printfreeB: printfreeB.ec
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^
listdb5: listdb5.ec
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^
listdb7: listdb7.ec $(GETOPT)
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^
dbstruct: dbstruct.ec
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^
sqlstruct: sqlstruct.ec $(GETOPT)
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^
dbscript: dbscript.ec $(GETOPT)
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^
dbsavail: dbsavail.ec $(GETOPT)
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^
dbmove: dbmove.ec $(GETOPT)
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^
# For dostats: Some platforms may require the addition of '-cp' to the
# compile line above to eliminate spurious warnings caused by dual
# declaration of getrowcount() for C4GL use. -- Art S. Kagel
#
# If you have a server or compiler which is not supported by dostats_ng.ec,
# change the source file to dostats.ec If you are also using c4gl to compile
# you will have to edit the makefile. The 4gl compiler is not supported
# by dostats_ng.ec
#
dostats: dostats_ng.ec $(GETOPT)
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $?
dbdelete: dbdelete.ec
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $?
dbcopy: dbcopy.ec
INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $?
myschema: myschema.d
cd myschema.d; \\\\
$(MAKE) -f myschema.mk.norcs; \\\\
cp -p myschema ..
myschema.d:
if [ ! -d myschema.d ]; then mkdir myschema.d; fi; \\\\
if [ ! -f myschema.d/myschema.source.ar ]; then mv myschema.source.ar
myschema.d; fi; \\\\
cd myschema.d; \\\\
if [ ! -f myschema.ec ]; then $(AR) -x myschema.source.ar; fi; \\\\
cd ..
When we execute the make command we gets this error messages
/home/crcruz/Utils2_ak:make
INFORMIXC=gcc /informix/bin/esql -q64 -O2 -qmaxmem=32768 -static-DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -DNOINT8=1 -EDC4GL_720_COMPILER=1 -o ul
-lc
gcc: error: unrecognized command line option '-qchars=signed'
gcc: error: unrecognized command line option '-q64'
gcc: error: unrecognized command line option '-qlanglvl=extc99'
gcc: error: unrecognized command line option '-qalign=natural'
gcc: error: unrecognized command line option '-qcheck=nullptr'
gcc: error: unrecognized command line option '-qmaxmem=-1'
gcc: error: unrecognized command line option '-qspill=2000'
gcc: error: unrecognized command line option '-q64'
gcc: error: unrecognized command line option '-qmaxmem=32768'
make: 1254-004 The error code from the last command is 1.
Stop.
Some one could help us?
Regards
CCR
This is because the esql precompiler is configured to general options for IBMs
xlc compiler.
I would copy it somewhere safe and then change the original to generate the
appropriate gcc equivalents of the xlc options.
No, I dont know what they are.
Also, make sure you dont have the xlc compiler (or parts thereof) installed.
It can also cause weirdness. And if it is installed, just use that.
> On 7 Jul 2017, at 16:47, ENKI ROMERO <en.ki17@gmail.com> wrote:
>
> Hi guys,
>
> We download utils2_ak and installed in server
>
> System Model: IBM,8286-42A
> Machine Serial Number: 213713W
> Processor Type: PowerPC_POWER8
> Processor Implementation Mode: POWER 8
> Processor Version: PV_8_Compat
> Number Of Processors: 2
> Processor Clock Speed: 3891 MHz
> CPU Type: 64-bit
> Kernel Type: 64-bit
> LPAR Info: 5 QROPSIFIMG
> Memory Size: 20480 MB
> Good Memory Size: 20480 MB
> Platform Firmware level: SV830_068
> Firmware Version: IBM,FW830.10 (SV830_068)
>
> With GCC
>
> :/home/crcruz/Utils2_ak:gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
>
>
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix7.1.0.0/4.7.2/lto-w
rapper
> Target: powerpc-ibm-aix7.1.0.0
> Configured with: ../gcc-4.7.2/configure --with-as=/usr/bin/as
> --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware
> --mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-threads
> --enable-version-specific-runtime-libs --disable-nls
> --enable-decimal-float=dpd --host=powerpc-ibm-aix7.1.0.0
> Thread model: aix
> gcc version 4.7.2 (GCC)
>
> And Makefile
>
> #
> # This version is GNU Make specific
> #
>
> # If your copy of GNU make is not called 'make' or is not first in
> # your path set the variable MAKE appropriately so the recursive make
> # of myschema will use the correct version of make.
> MAKE=make
>
> ..SUFFIXES:
> ..SUFFIXES: .ec .c .o
>
> # INSTALLDIR is used when you run 'make install'. Set it to the bin directory
> # you would like the executables installed into.
> INSTALLDIR=/usr/local/bin
>
> # Uncomment appropriate options.
>
> ESQL=/informix/bin/esql
> # ESQL=c4gl # For using C4GL 7.xx if you don't have iSDK or ESQL/C
>
> # PLTFM_FLAGS=-O
> # PLTFM_FLAGS=-O3 # For GNU C (gcc) to maximize code optimization
> # PLTFM_FLAGS=-O -Ae # For HP's C compiler to enable ANSI source parsing
> # PLTFM_FLAGS=-O -Ae +DD64 # For HP to enable ANSI and 64bit executable
> ## PLTFM_FLAGS=-O2 -qmaxmem=32768 # For AIX to improve code optimization if
> desired
> PLTFM_FLAGS=-q64 -O2 -qmaxmem=32768 -static # AIX 64bit mode static link
> # PLTFM_FLAGS=-O -xarch=v9 # For Solaris to get a 64bit executable using
> Solaris C or WS
>
> CFLAGS=$(PLTFM_FLAGS) -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 # Use my getopt
w/
> listdb7 & dostats
> GETOPT=getopt.c
> GETOPTFLG=-I.
>
> # If you have AIX or an older HPUX you may need to download and compile my
> # portable ar utility ar2 from the IIUG Software Repository. In that case
> # uncomment the following line and comment the one after.
> AR=ar2
> ##AR=ar
>
> EDFLAGS=
> ##EDFLAGS=-g # For debugging in ESQL/C source.
> # EDFLAGS=-G # For debugging in C source (better).
> # EDFLAGS=-g -keep # For debugging using the C4GL compiler script
>
> ##GEN=-L/usr/lib -lgen # Library containing the function basename().
> GEN=-lc # On AIX and some other BSD UNIXes the libgen funcs are in libc
>
> ##ECFLAGS=$(EDFLAGS) $(CFLAGS)
> ECFLAGS=$(EDFLAGS) $(CFLAGS) -DNOINT8=1 -EDC4GL_720_COMPILER=1 # Needed for
> ESQL/C 7.xx or C4GL 7.xx
> #ECFLAGS=$(EDFLAGS) $(CFLAGS) -EDbigint=int # Needed for CSDK versions prior
> to 3.50 that don't
> # support BIGINT. Note support of very large tables
> # is disabled for these CSDK versions.
>
> CC=gcc
> # CC=cc # For HP and others without GNU C
> # CC=xlc # For AIX
> INFORMIXC=$(CC)>
> progs: ul printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct
> sqlstruct myschema dbscript dbsavail dbmove bload bunload
>
> install: progs
>
> chmod u+w printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct
> sqlstruct myschema ul bload bunload mydbdiff drive_dostats dbsc
> ript dbsavail dbmove
>
> chmod +x printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct
sqlstruct
> myschema ul bload bunload mydbdiff drive_dostats dbscr
> ipt dbsavail dbmove
>
> cp -p printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct sqlstruct
> myschema ul mydbdiff drive_dostats dbscript dbsavail dbmo
> ve $(INSTALLDIR)
>
> -rm $(INSTALLDIR)/bunload $(INSTALLDIR)/bload
>
> -ln $(INSTALLDIR)/ul $(INSTALLDIR)/bload
>
> -ln $(INSTALLDIR)/ul $(INSTALLDIR)/bunload
>
> touch -h $(INSTALLDIR)/bunload $(INSTALLDIR)/bload
>
> ul: ul.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^ $(GEN)>
> bload: ul
>
> -rm bload
>
> -ln ul bload
>
> touch -h bload
>
> bunload: ul
>
> -rm bunload
>
> -ln ul bunload
>
> touch -h bunload
>
> printfreeB: printfreeB.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> listdb5: listdb5.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> listdb7: listdb7.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> dbstruct: dbstruct.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> sqlstruct: sqlstruct.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> dbscript: dbscript.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> dbsavail: dbsavail.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> dbmove: dbmove.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> # For dostats: Some platforms may require the addition of '-cp' to the
> # compile line above to eliminate spurious warnings caused by dual
> # declaration of getrowcount() for C4GL use. -- Art S. Kagel
> #
> # If you have a server or compiler which is not supported by dostats_ng.ec,
> # change the source file to dostats.ec If you are also using c4gl to compile
> # you will have to edit the makefile. The 4gl compiler is not supported
> # by dostats_ng.ec
> #
> dostats: dostats_ng.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $?>
> dbdelete: dbdelete.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $?>
> dbcopy: dbcopy.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $?>
> myschema: myschema.d
>
> cd myschema.d; \\\\
>
> $(MAKE) -f myschema.mk.norcs; \\\\
>
> cp -p myschema ..
>
> myschema.d:
>
> if [ ! -d myschema.d ]; then mkdir myschema.d; fi; \\\\
>
> if [ ! -f myschema.d/myschema.source.ar ]; then mv myschema.source.ar
> myschema.d; fi; \\\\
>
> cd myschema.d; \\\\
>
> if [ ! -f myschema.ec ]; then $(AR) -x myschema.source.ar; fi; \\\\
>
> cd ..
>
> When we execute the make command we gets this error messages
>
> /home/crcruz/Utils2_a
Thanks for the answer, we dont locate that xlc command /home/crcruz/Utils2_ak:xlc ksh: xlc: not found. /home/crcruz/Utils2_ak:find / -name xlc -print 2>>/dev/null /home/crcruz/Utils2_ak: regards, CCR
Enki:
To build utils2_ak on AIX you will also need to download my portable ar
utility (ar_port) from the IIUG software repository if you haven't done
that already. That's because the myschema source is packed into a System V
format ar archive (which is the format that all UNIX-like systems use
except for AIX).
Now, if you do not have XLC (the native AIX C compiler package) and do not
want to install it, but want to use GNU C (gcc) then you will have to make
changes to the makefile and also to the esql script in $INFORMIXDIR/bin (or
make a copy of esql placed earlier in your path and modify that copy
instead - that's what I typically do). You have to change the "-q64" flag
to "-m64" and eliminate the "-qmaxmem=..." from the makefile (both the
makefile in the main directory and the one in the myschema.d subdirectory
named myschema.mk.norcs if you have the GNU make utility - see the Buidit
file for instructions if you do not have GNU make). There are also some
flags built into the esql script that you will have to change:
- On the CC=, CC_TH=, CPP=, & CPP_TH= lines remove all of the flags and
add back the -m64 flag
I think that's it. Let me know if you still cannot build the package.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Fri, Jul 7, 2017 at 10:47 AM, ENKI ROMERO <en.ki17@gmail.com> wrote:
> Hi guys,
>
> We download utils2_ak and installed in server
>
> System Model: IBM,8286-42A
> Machine Serial Number: 213713W
> Processor Type: PowerPC_POWER8
> Processor Implementation Mode: POWER 8
> Processor Version: PV_8_Compat
> Number Of Processors: 2
> Processor Clock Speed: 3891 MHz
> CPU Type: 64-bit
> Kernel Type: 64-bit
> LPAR Info: 5 QROPSIFIMG
> Memory Size: 20480 MB
> Good Memory Size: 20480 MB
> Platform Firmware level: SV830_068
> Firmware Version: IBM,FW830.10 (SV830_068)
>
> With GCC
>
> :/home/crcruz/Utils2_ak:gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
>
> COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-
> ibm-aix7.1.0.0/4.7.2/lto-wrapper
> Target: powerpc-ibm-aix7.1.0.0
> Configured with: ../gcc-4.7.2/configure --with-as=/usr/bin/as
> --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran
> --prefix=/opt/freeware
> --mandir=/opt/freeware/man --infodir=/opt/freeware/info --enable-threads
> --enable-version-specific-runtime-libs --disable-nls
> --enable-decimal-float=dpd --host=powerpc-ibm-aix7.1.0.0
> Thread model: aix
> gcc version 4.7.2 (GCC)
>
> And Makefile
>
> #
> # This version is GNU Make specific
> #
>
> # If your copy of GNU make is not called 'make' or is not first in
> # your path set the variable MAKE appropriately so the recursive make
> # of myschema will use the correct version of make.
> MAKE=make
>
> ..SUFFIXES:
> ..SUFFIXES: .ec .c .o
>
> # INSTALLDIR is used when you run 'make install'. Set it to the bin
> directory
> # you would like the executables installed into.
> INSTALLDIR=/usr/local/bin
>
> # Uncomment appropriate options.
>
> ESQL=/informix/bin/esql
> # ESQL=c4gl # For using C4GL 7.xx if you don't have iSDK or ESQL/C
>
> # PLTFM_FLAGS=-O
> # PLTFM_FLAGS=-O3 # For GNU C (gcc) to maximize code optimization
> # PLTFM_FLAGS=-O -Ae # For HP's C compiler to enable ANSI source parsing
> # PLTFM_FLAGS=-O -Ae +DD64 # For HP to enable ANSI and 64bit executable
> ## PLTFM_FLAGS=-O2 -qmaxmem=32768 # For AIX to improve code optimization if
> desired
> PLTFM_FLAGS=-q64 -O2 -qmaxmem=32768 -static # AIX 64bit mode static link
> # PLTFM_FLAGS=-O -xarch=v9 # For Solaris to get a 64bit executable using
> Solaris C or WS
>
> CFLAGS=$(PLTFM_FLAGS) -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 # Use my
> getopt w/
> listdb7 & dostats
> GETOPT=getopt.c
> GETOPTFLG=-I.
>
> # If you have AIX or an older HPUX you may need to download and compile my
> # portable ar utility ar2 from the IIUG Software Repository. In that case
> # uncomment the following line and comment the one after.
> AR=ar2
> ##AR=ar
>
> EDFLAGS=
> ##EDFLAGS=-g # For debugging in ESQL/C source.
> # EDFLAGS=-G # For debugging in C source (better).
> # EDFLAGS=-g -keep # For debugging using the C4GL compiler script
>
> ##GEN=-L/usr/lib -lgen # Library containing the function basename().
> GEN=-lc # On AIX and some other BSD UNIXes the libgen funcs are in libc
>
> ##ECFLAGS=$(EDFLAGS) $(CFLAGS)
> ECFLAGS=$(EDFLAGS) $(CFLAGS) -DNOINT8=1 -EDC4GL_720_COMPILER=1 # Needed for
> ESQL/C 7.xx or C4GL 7.xx
> #ECFLAGS=$(EDFLAGS) $(CFLAGS) -EDbigint=int # Needed for CSDK versions
> prior
> to 3.50 that don't
> # support BIGINT. Note support of very large tables
> # is disabled for these CSDK versions.
>
> CC=gcc
> # CC=cc # For HP and others without GNU C
> # CC=xlc # For AIX
> INFORMIXC=$(CC)>
> progs: ul printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct
> sqlstruct myschema dbscript dbsavail dbmove bload bunload
>
> install: progs
>
> chmod u+w printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct
> sqlstruct myschema ul bload bunload mydbdiff drive_dostats dbsc
> ript dbsavail dbmove
>
> chmod +x printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct
> sqlstruct
> myschema ul bload bunload mydbdiff drive_dostats dbscr
> ipt dbsavail dbmove
>
> cp -p printfreeB listdb5 listdb7 dostats dbdelete dbcopy dbstruct sqlstruct
> myschema ul mydbdiff drive_dostats dbscript dbsavail dbmo
> ve $(INSTALLDIR)
>
> -rm $(INSTALLDIR)/bunload $(INSTALLDIR)/bload
>
> -ln $(INSTALLDIR)/ul $(INSTALLDIR)/bload
>
> -ln $(INSTALLDIR)/ul $(INSTALLDIR)/bunload
>
> touch -h $(INSTALLDIR)/bunload $(INSTALLDIR)/bload
>
> ul: ul.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^ $(GEN)>
> bload: ul
>
> -rm bload
>
> -ln ul bload
>
> touch -h bload
>
> bunload: ul
>
> -rm bunload
>
> -ln ul bunload
>
> touch -h bunload
>
> printfreeB: printfreeB.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> listdb5: listdb5.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> listdb7: listdb7.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> dbstruct: dbstruct.ec
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> sqlstruct: sqlstruct.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> dbscript: dbscript.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
> dbsavail: dbsavail.ec $(GETOPT)
>
> INFORMIXC=$(INFORMIXC) $(ESQL) $(ECFLAGS) -o $@ $^>
Hi guys, We still have a problem to execute the make esql (copy from informix home directory to current working directory) ===================================================================== esql ---------------------------------------------------------------------- #!/bin/sh : ' : ************************************************************************ : : : Licensed Material - Property Of IBM : : "Restricted Materials of IBM" : : IBM Informix Client SDK : : Copyright IBM Corporation 2006, 2011. All rights reserved. : : : Title: esql.sh : Description: Source for shell script for running the ESQL/C preprocessor : : ************************************************************************* : ' INFDIR=${INFORMIXDIR=/usr/informix} PREPCC=${INFDIR}/lib/esql/esqlc CC="${INFORMIXC=cc} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural -qcheck=nullptr -qspill=2000 " CC_TH="${INFORMIXC=xlc_r} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural -qcheck=nullptr -qspill=2000 " CPP="${INFORMIXCPP=xlC} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural -qcheck=nullptr -qspill=2000 " CPP_TH="${INFORMIXCPP=xlC_r} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural -qcheck=nullptr -qspill=2000 " STATICFLAGS="" CP=${INFORMIXCP="$CC -E -C"} # cpp which runs before esqlc PROTECT=${INFDIR}/lib/esql/eprotect # make SQL keyword protection UPROTECT="${INFDIR}/lib/esql/eprotect -u" # undo SQL keyword protection CC_AMD32="" Usage() { echo ' Usage: esql [-e] [-thread] [-glu] [esqlcargs] [-cc] [otherargs] [-o outfile] [-cp] [-onlycp] [-np] [-nup] [-libs] esqlfile.ec [othersrc.c...] [otherobj.o...] [-lyourlib...] ' infxmsg 33490 -e infxmsg 33491 -thread infxmsg 33492 -glu infxmsg 33494 -esqlcargs infxmsg 33495 -cc infxmsg 33496 otherargs infxmsg 33497 -o infxmsg 33498 -libs infxmsg 33499 -cp infxmsg 38700 -onlycp infxmsg 38701 -np infxmsg 38702 -nup } if [ x$UNAMEM = "xx86_64" ] then CC="$CC $CC_AMD32" CPP="$CPP $CC_AMD32" else CC=$CC CPP=$CPP fi : ' : INFORMIX Global Language Support extensions : : Please set an appropriate value to the CC8BITLEVEL shell variable. : See guidelines below for specifying appropriate CC8BITLEVEL values. : ' MBFILTER=${INFDIR}/lib/esql/esqlmf CC8BITLEVEL=${CC8BITLEVEL-0} : ' : ---------------------------------------------------------------------------- : CC8BITLEVEL Remarks : ---------------------------------------------------------------------------- : : 0 C compiler does not allow 8th bit set bytes in literal : strings and comments. : : 1 C compiler does not allow 8th bit set bytes in literal : strings. : : 2 C compiler allows 8th bit set bytes in literal strings; it : expects all bytes in a multiple-byte character to have the : 8th bit set. The compiler complains about literal strings if : any byte of a multiple-byte character is not 8th bit set. : : Compilers on Japanese EUC codeset machines usually exhibit : this behavior. : : For example, the compiler will not allow literal multiple : byte characters with the bytes (\\\\), ("), and (%). : : 3 C compiler allows 8th bit set bytes in literal strings; it : does not expect all bytes in a multiple-byte character to : have the 8th bit set. : : Compilers on Japanese Shift-JIS codeset machines exhibit this : behavior. This also applies to Chinese Shift-Big5 codeset : C compilers. : : For example, the compiler will accept literal multiple byte : characters with bytes (\\\\), ("), or (%) as the non-zeroth : byte of a multibyte character. : : ---------------------------------------------------------------------------- : CC8BITLEVEL Causes $MBFILTER to be invoked as follows: : ---------------------------------------------------------------------------- : : 0 $MBFILTER -all -comm : 1 $MBFILTER -all : 2 $MBFILTER : 3 -- $MBFILTER is not executed -- : : ---------------------------------------------------------------------------- : : End of INFORMIX Global Language Support extensions : : ' STAT=0 TYPE=unix A= AO= B= BO= CA= PA= PREONLY= NOLINK= INCLUDE= THREAD= THREAD_SUB= STATOPT= TLIB= THRLIB= THLIB_SUB= CPFIRSTFILE=FALSE CPONLY=FALSE CPPOPTS= ETARGET= STAT=0 CFILE=FALSE CCOPT= CPF_DEF= ## Check for static option and set STATOPT if option is set for pass in $* do case $pass in -cc ) CCOPT=TRUE ;; -glu ) if [ "x$CCOPT" = "x" ] then GLUOPT=TRUE GL_USEGLU=1; export GL_USEGLU fi ;; -thread ) if [ "x$CCOPT" = "x" ] then THREAD_SUB="-thread" fi ;; -static ) if [ "x$CCOPT" = "x" ] then STATOPT="TRUE" fi ;; * ) ;; esac done CCOPT= # If libraries are added or removed make sure to update -libs option if [ "x$STATOPT" != "x" ] then SLIB=${INFDIR}/lib/esql/libifsql.a GLIB=${INFDIR}/lib/esql/libifgen.a OLIB=${INFDIR}/lib/esql/libifos.a ALIB=${INFDIR}/lib/libifasf.a GLSLIB=${INFDIR}/lib/esql/libifgls.a GLXLIB=${INFDIR}/lib/esql/libifglx.a COMB="$OLIB $GLIB" NETSTUB=${INFDIR}/lib/netstub.a else SLIB=-lifsql GLIB=-lifgen OLIB=-lifos ALIB=-lifasf GLSLIB=-lifgls GLXLIB=-lifglx NETSTUB="-lnetstub " fi SYSLIB="-lc_r -lmsaa -lbsd -ldl -lm_r " SYSNLIB="-ltli" TLILIB="/usr/lib/libnsl.a /usr/lib/libnsl.so" THLIB=$THREADLIB CHKAPI=${INFDIR}/lib/esql/checkapi.o LPATH=${LPATH=${INFDIR}/lib} nettli="FALSE" # check for the existence of libraries specified in TLILIB if test "x$TLILIB" != "x " -a "x$TLILIB" != "x" then for lib in $TLILIB do if test -f $lib then nettli="TRUE" break else continue fi done # Update SYSNLIB if nettli is false if test "$nettli" = "FALSE" then remove=`echo $lib | sed -e s:\\\\/.*\\\\/lib:-l: -e s:[.].*$::` SYSNLIB=`echo $SYSNLIB | sed -e s:"$remove":: ` fi else nettli="" fi # check if -thread option is used, then dynamic binding to be used by making # sure that -thread option is applied before the .ec file is processed. UNAMEM=`uname -m` case $# in 0) Usage echo "" $PREPCC
Hi,
Make a safe copy of the esql script (cp esql esql.orig)
Edit the esql script and removed the unrecognised options.
INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -m64 -O2 -static -DHAVE_GNU_GETOPT=1-DHAVE_GETOPT_H=1 -DNOINT8=1 -EDC4GL_720_COMPILER=1 -o ul -lc
gcc: error: unrecognized command line option '-qchars=signed'
gcc: error: unrecognized command line option '-m64'
gcc: error: unrecognized command line option '-qlanglvl=extc99'
gcc: error: unrecognized command line option '-qalign=natural'
gcc: error: unrecognized command line option '-qcheck=nullptr'
gcc: error: unrecognized command line option '-qspill=2000'
gcc: error: unrecognized command line option '-m64'
make: 1254-004 The error code from the last command is 1.
Regards,
David.
> On 10 July 2017 at 22:14 ENKI ROMERO <en.ki17@gmail.com> wrote:
>
>
> Hi guys,
>
> We still have a problem to execute the make
>
> esql (copy from informix home directory to current working directory)
>
> =====================================================================
> esql
> ----------------------------------------------------------------------
>
> #!/bin/sh
> : '
> : ************************************************************************
> :
> :
> : Licensed Material - Property Of IBM
> :
> : "Restricted Materials of IBM"
> :
> : IBM Informix Client SDK
> :
> : Copyright IBM Corporation 2006, 2011. All rights reserved.
> :
> :
> : Title: esql.sh
> : Description: Source for shell script for running the ESQL/C preprocessor
> :
> : *************************************************************************
> : '
> INFDIR=${INFORMIXDIR=/usr/informix}
> PREPCC=${INFDIR}/lib/esql/esqlc
> CC="${INFORMIXC=cc} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural
> -qcheck=nullptr -qspill=2000 "
> CC_TH="${INFORMIXC=xlc_r} -qchars=signed -m64 -qlanglvl=extc99
-qalign=natural
> -qcheck=nullptr -qspill=2000 "
> CPP="${INFORMIXCPP=xlC} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural
> -qcheck=nullptr -qspill=2000 "
> CPP_TH="${INFORMIXCPP=xlC_r} -qchars=signed -m64 -qlanglvl=extc99
> -qalign=natural -qcheck=nullptr -qspill=2000 "
> STATICFLAGS=""
>
> CP=${INFORMIXCP="$CC -E -C"} # cpp which runs before esqlc
> PROTECT=${INFDIR}/lib/esql/eprotect # make SQL keyword protection
> UPROTECT="${INFDIR}/lib/esql/eprotect -u" # undo SQL keyword protection
>
> CC_AMD32=""
>
> Usage()
> {
>
> echo '
> Usage: esql [-e] [-thread] [-glu] [esqlcargs] [-cc] [otherargs] [-o outfile]
>
> [-cp] [-onlycp] [-np] [-nup]
>
> [-libs] esqlfile.ec [othersrc.c...] [otherobj.o...] [-lyourlib...]
>
> '
>
> infxmsg 33490 -e
>
> infxmsg 33491 -thread
>
> infxmsg 33492 -glu
>
> infxmsg 33494 -esqlcargs
>
> infxmsg 33495 -cc
>
> infxmsg 33496 otherargs
>
> infxmsg 33497 -o
>
> infxmsg 33498 -libs
>
> infxmsg 33499 -cp
>
> infxmsg 38700 -onlycp
>
> infxmsg 38701 -np
>
> infxmsg 38702 -nup
>
> }
>
> if [ x$UNAMEM = "xx86_64" ]
> then
>
> CC="$CC $CC_AMD32"
>
> CPP="$CPP $CC_AMD32"
> else
>
> CC=$CC
>
> CPP=$CPP
> fi
>
> : '
> : INFORMIX Global Language Support extensions
> :
> : Please set an appropriate value to the CC8BITLEVEL shell variable.
> : See guidelines below for specifying appropriate CC8BITLEVEL values.
> : '
>
> MBFILTER=${INFDIR}/lib/esql/esqlmf
> CC8BITLEVEL=${CC8BITLEVEL-0}
>
> : '
> :
----------------------------------------------------------------------------
> : CC8BITLEVEL Remarks
> :
----------------------------------------------------------------------------
> :
> : 0 C compiler does not allow 8th bit set bytes in literal
> : strings and comments.
> :
> : 1 C compiler does not allow 8th bit set bytes in literal
> : strings.
> :
> : 2 C compiler allows 8th bit set bytes in literal strings; it
> : expects all bytes in a multiple-byte character to have the
> : 8th bit set. The compiler complains about literal strings if
> : any byte of a multiple-byte character is not 8th bit set.
> :
> : Compilers on Japanese EUC codeset machines usually exhibit
> : this behavior.
> :
> : For example, the compiler will not allow literal multiple
> : byte characters with the bytes (\\\\), ("), and (%).
> :
> : 3 C compiler allows 8th bit set bytes in literal strings; it
> : does not expect all bytes in a multiple-byte character to
> : have the 8th bit set.
> :
> : Compilers on Japanese Shift-JIS codeset machines exhibit this
> : behavior. This also applies to Chinese Shift-Big5 codeset
> : C compilers.
> :
> : For example, the compiler will accept literal multiple byte
> : characters with bytes (\\\\), ("), or (%) as the non-zeroth
> : byte of a multibyte character.
> :
> :
----------------------------------------------------------------------------
> : CC8BITLEVEL Causes $MBFILTER to be invoked as follows:
> :
----------------------------------------------------------------------------
> :
> : 0 $MBFILTER -all -comm
> : 1 $MBFILTER -all
> : 2 $MBFILTER
> : 3 -- $MBFILTER is not executed --
> :
> :
----------------------------------------------------------------------------
> :
> : End of INFORMIX Global Language Support extensions
> :
> : '
>
> STAT=0
> TYPE=unix
> A=
> AO=
> B=
> BO=
> CA=
> PA=
> PREONLY=
> NOLINK=
> INCLUDE=
> THREAD=
> THREAD_SUB=
> STATOPT=
> TLIB=
> THRLIB=
> THLIB_SUB=
> CPFIRSTFILE=FALSE
> CPONLY=FALSE
> CPPOPTS=
> ETARGET=
> STAT=0
> CFILE=FALSE
> CCOPT=
> CPF_DEF=
> ## Check for static option and set STATOPT if option is set
>
> for pass in $*
> do
>
> case $pass in
>
> -cc )
>
> CCOPT=TRUE
>
> ;;
>
> -glu )
>
> if [ "x$CCOPT" = "x" ]
>
> then
>
> GLUOPT=TRUE
>
> GL_USEGLU=1; export GL_USEGLU
>
> fi
>
> ;;
>
> -thread )
>
> if [ "x$CCOPT" = "x" ]
>
> then
>
> THREAD_SUB="-thread"
>
> fi
>
> ;;
>
> -static )
>
> if [ "x$CCOPT" = "x" ]
>
> then
>
> STATOPT="TRUE"
>
> fi
>
> ;;
>
> * )
>
> ;;
>
> esac
> done
>
> CCOPT=
>
> # If libraries are added or removed make sure to update -libs option
> if [ "x$STATOPT" != "x" ]
> then
>
> SLIB=${INFDIR}/lib/esql/libifsql.a
>
> GLIB=${INFDIR}/lib/esql/libifgen.a
>
> OLIB=${INFDIR}/lib/esql/libifos.a
>
> ALIB=${INFDIR}/lib/libifasf.a
>
> GLSLIB=${INFDIR}/lib/esql/libifgls.a
>
> GLXLIB=${INFDIR}/lib/esql/libifglx.a
>
> COMB="$OLIB $GLIB"
>
> NETSTUB=${INFDIR}/lib/netstub.a
> else
>
> SLIB=-lifsql
>
> GLIB
As noted previously, you have to change these four lines to eliminate all of the xlc specific options and replace some with GCC options. So replace these four lines: CC="${INFORMIXC=cc} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural -qcheck=nullptr -qspill=2000 " CC_TH="${INFORMIXC=xlc_r} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural -qcheck=nullptr -qspill=2000 " CPP="${INFORMIXCPP=xlC} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural -qcheck=nullptr -qspill=2000 " CPP_TH="${INFORMIXCPP=xlC_r} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural -qcheck=nullptr -qspill=2000 " With these four lines: CC="${INFORMIXC=gcc} -m64" CC_TH="${INFORMIXC=gcc} -m64 -pthread" CPP="${INFORMIXCPP=gxx} -m64" CPP_TH="${INFORMIXCPP=gxx} -m64 -pthread" Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Mon, Jul 10, 2017 at 4:14 PM, ENKI ROMERO <en.ki17@gmail.com> wrote: > Hi guys, > > We still have a problem to execute the make > > esql (copy from informix home directory to current working directory) > > ===================================================================== > esql > ---------------------------------------------------------------------- > > #!/bin/sh > : ' > : ************************************************************************ > : > : > : Licensed Material - Property Of IBM > : > : "Restricted Materials of IBM" > : > : IBM Informix Client SDK > : > : Copyright IBM Corporation 2006, 2011. All rights reserved. > : > : > : Title: esql.sh > : Description: Source for shell script for running the ESQL/C preprocessor > : > : ************************************************************ > ************* > : ' > INFDIR=${INFORMIXDIR=/usr/informix} > PREPCC=${INFDIR}/lib/esql/esqlc > CC="${INFORMIXC=cc} -qchars=signed -m64 -qlanglvl=extc99 -qalign=natural > -qcheck=nullptr -qspill=2000 " > CC_TH="${INFORMIXC=xlc_r} -qchars=signed -m64 -qlanglvl=extc99 > -qalign=natural > -qcheck=nullptr -qspill=2000 " > CPP="${INFORMIXCPP=xlC} -qchars=signed -m64 -qlanglvl=extc99 > -qalign=natural > -qcheck=nullptr -qspill=2000 " > CPP_TH="${INFORMIXCPP=xlC_r} -qchars=signed -m64 -qlanglvl=extc99 > -qalign=natural -qcheck=nullptr -qspill=2000 " > STATICFLAGS="" > > CP=${INFORMIXCP="$CC -E -C"} # cpp which runs before esqlc > PROTECT=${INFDIR}/lib/esql/eprotect # make SQL keyword protection > UPROTECT="${INFDIR}/lib/esql/eprotect -u" # undo SQL keyword protection > > CC_AMD32="" > > Usage() > { > > echo ' > Usage: esql [-e] [-thread] [-glu] [esqlcargs] [-cc] [otherargs] [-o > outfile] > > [-cp] [-onlycp] [-np] [-nup] > > [-libs] esqlfile.ec [othersrc.c...] [otherobj.o...] [-lyourlib...] > > ' > > infxmsg 33490 -e > > infxmsg 33491 -thread > > infxmsg 33492 -glu > > infxmsg 33494 -esqlcargs > > infxmsg 33495 -cc > > infxmsg 33496 otherargs > > infxmsg 33497 -o > > infxmsg 33498 -libs > > infxmsg 33499 -cp > > infxmsg 38700 -onlycp > > infxmsg 38701 -np > > infxmsg 38702 -nup > > } > > if [ x$UNAMEM = "xx86_64" ] > then > > CC="$CC $CC_AMD32" > > CPP="$CPP $CC_AMD32" > else > > CC=$CC > > CPP=$CPP > fi > > : ' > : INFORMIX Global Language Support extensions > : > : Please set an appropriate value to the CC8BITLEVEL shell variable. > : See guidelines below for specifying appropriate CC8BITLEVEL values. > : ' > > MBFILTER=${INFDIR}/lib/esql/esqlmf > CC8BITLEVEL=${CC8BITLEVEL-0} > > : ' > : ------------------------------------------------------------ > ---------------- > : CC8BITLEVEL Remarks > : ------------------------------------------------------------ > ---------------- > : > : 0 C compiler does not allow 8th bit set bytes in literal > : strings and comments. > : > : 1 C compiler does not allow 8th bit set bytes in literal > : strings. > : > : 2 C compiler allows 8th bit set bytes in literal strings; it > : expects all bytes in a multiple-byte character to have the > : 8th bit set. The compiler complains about literal strings if > : any byte of a multiple-byte character is not 8th bit set. > : > : Compilers on Japanese EUC codeset machines usually exhibit > : this behavior. > : > : For example, the compiler will not allow literal multiple > : byte characters with the bytes (\\\\), ("), and (%). > : > : 3 C compiler allows 8th bit set bytes in literal strings; it > : does not expect all bytes in a multiple-byte character to > : have the 8th bit set. > : > : Compilers on Japanese Shift-JIS codeset machines exhibit this > : behavior. This also applies to Chinese Shift-Big5 codeset > : C compilers. > : > : For example, the compiler will accept literal multiple byte > : characters with bytes (\\\\), ("), or (%) as the non-zeroth > : byte of a multibyte character. > : > : ------------------------------------------------------------ > ---------------- > : CC8BITLEVEL Causes $MBFILTER to be invoked as follows: > : ------------------------------------------------------------ > ---------------- > : > : 0 $MBFILTER -all -comm > : 1 $MBFILTER -all > : 2 $MBFILTER > : 3 -- $MBFILTER is not executed -- > : > : ------------------------------------------------------------ > ---------------- > : > : End of INFORMIX Global Language Support extensions > : > : ' > > STAT=0 > TYPE=unix > A= > AO= > B= > BO= > CA= > PA= > PREONLY= > NOLINK= > INCLUDE= > THREAD= > THREAD_SUB= > STATOPT= > TLIB= > THRLIB= > THLIB_SUB= > CPFIRSTFILE=FALSE > CPONLY=FALSE > CPPOPTS= > ETARGET= > STAT=0 > CFILE=FALSE > CCOPT= > CPF_DEF= > ## Check for static option and set STATOPT if option is set > > for pass in $* > do > > case $pass in > > -cc ) > > CCOPT=TRUE > > ;; > > -glu ) > > if [ "x$CCOPT" = "x" ] > > then > > GLUOPT=TRUE > > GL_USEGLU=1; export GL_USEGLU > > fi > > ;; > > -thread ) > > if [ "x$CCOPT" = "x" ] > > then > > THREAD_SUB="-thread" > > fi > > ;; > > -static ) > > if [ "x$CCOPT" = "x" ] > > then > > STATOPT="TRUE"@@NL
Hi,
Thanks for the quick response, we made the modifications on esql file (4 lines
)
"esql" 945 lines, 25306 characters
#!/bin/sh
: '
: ************************************************************************
:
:
: Licensed Material - Property Of IBM
:
: "Restricted Materials of IBM"
:
: IBM Informix Client SDK
:
: Copyright IBM Corporation 2006, 2011. All rights reserved.
:
:
: Title: esql.sh
: Description: Source for shell script for running the ESQL/C preprocessor
:
: *************************************************************************
: '
INFDIR=${INFORMIXDIR=/usr/informix}
PREPCC=${INFDIR}/lib/esql/esqlc
CC="${INFORMIXC=gcc} -m64 "
CC_TH="${INFORMIXC=gcc} -m64 -pthread "
CPP="${INFORMIXCPP=gcc} -m64 "
CPP_TH="${INFORMIXCPP=gcc} m64 -pthread "
STATICFLAGS=""
We run again the make command and get this error messages
make
INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -m64 -O2 -static -DHAVE_GNU_GETOPT=1-DHAVE_GETOPT_H=1 -DNOINT8=1 -EDC4GL_720_COMPILER=1 -o ul -lc
gcc: error: unrecognized command line option '-m64'
gcc: error: unrecognized command line option '-m64'
make: 1254-004 The error code from the last command is 1.
Stop.
Try removing the -m64. I don't remember this causing a problem the last
time I needed to do this, but ... whatever works works. You'll have to
remove it from the four lines you modified in the esql script and also from
the CFLAGS entry in the makefile.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Mon, Jul 10, 2017 at 4:49 PM, ENKI ROMERO <en.ki17@gmail.com> wrote:
> Hi,
>
> Thanks for the quick response, we made the modifications on esql file (4
> lines
> )
>
> "esql" 945 lines, 25306 characters
> #!/bin/sh
> : '
> : ************************************************************************
> :
> :
> : Licensed Material - Property Of IBM
> :
> : "Restricted Materials of IBM"
> :
> : IBM Informix Client SDK
> :
> : Copyright IBM Corporation 2006, 2011. All rights reserved.
> :
> :
> : Title: esql.sh
> : Description: Source for shell script for running the ESQL/C preprocessor
> :
> : ************************************************************
> *************
> : '
> INFDIR=${INFORMIXDIR=/usr/informix}
> PREPCC=${INFDIR}/lib/esql/esqlc
> CC="${INFORMIXC=gcc} -m64 "
> CC_TH="${INFORMIXC=gcc} -m64 -pthread "
> CPP="${INFORMIXCPP=gcc} -m64 "
> CPP_TH="${INFORMIXCPP=gcc} m64 -pthread "
> STATICFLAGS=""
>
> We run again the make command and get this error messages
>
> make
>
> INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -m64 -O2 -static> -DHAVE_GNU_GETOPT=1
> -DHAVE_GETOPT_H=1 -DNOINT8=1 -EDC4GL_720_COMPILER=1 -o ul -lc
> gcc: error: unrecognized command line option '-m64'
> gcc: error: unrecognized command line option '-m64'
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
We already change those 4 lines from esql file.
CC="${INFORMIXC=gcc} -m64"
CC_TH="${INFORMIXC=gcc} -m64 -pthread"
CPP="${INFORMIXCPP=gcc} -m64"
CPP_TH="${INFORMIXCPP=gcc} m64 -pthread"
We run make command and gets this messages:
INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -m64 -O2 -static -DHAVE_GNU_GETOPT=1-DHAVE_GETOPT_H=1 -DNOINT8=1 -EDC4GL_720_COMPILER=1 -o ul -lc
gcc: error: unrecognized command line option '-m64'
gcc: error: unrecognized command line option '-m64'
make: 1254-004 The error code from the last command is 1.
Stop.
Regards
CCR
Remove -m64 everywhere.
Regards,
David.
> On 10 July 2017 at 23:21 ENKI ROMERO <en.ki17@gmail.com> wrote:
>
>
> We already change those 4 lines from esql file.
>
> CC="${INFORMIXC=gcc} -m64"
> CC_TH="${INFORMIXC=gcc} -m64 -pthread"
> CPP="${INFORMIXCPP=gcc} -m64"
> CPP_TH="${INFORMIXCPP=gcc} m64 -pthread"
>
> We run make command and gets this messages:
>
> INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -m64 -O2 -static-DHAVE_GNU_GETOPT=1
> -DHAVE_GETOPT_H=1 -DNOINT8=1 -EDC4GL_720_COMPILER=1 -o ul -lc
> gcc: error: unrecognized command line option '-m64'
> gcc: error: unrecognized command line option '-m64'
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
> Regards
>
> CCR
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
CHANGE THEM AGAIN! Remove the "-m64" flags from there and also remove the
"-m64" flag from the makefiles (makefile.norcs and
myschema.d/myschema.mk.norcs or makefile.norcs.nognumake and
myschema.d/myschema.mk.norcsnognumake)
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Mon, Jul 10, 2017 at 5:21 PM, ENKI ROMERO <en.ki17@gmail.com> wrote:
> We already change those 4 lines from esql file.
>
> CC="${INFORMIXC=gcc} -m64"
> CC_TH="${INFORMIXC=gcc} -m64 -pthread"
> CPP="${INFORMIXCPP=gcc} -m64"
> CPP_TH="${INFORMIXCPP=gcc} m64 -pthread"
>
> We run make command and gets this messages:
>
> INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -m64 -O2 -static> -DHAVE_GNU_GETOPT=1
> -DHAVE_GETOPT_H=1 -DNOINT8=1 -EDC4GL_720_COMPILER=1 -o ul -lc
> gcc: error: unrecognized command line option '-m64'
> gcc: error: unrecognized command line option '-m64'
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
> Regards
>
> CCR
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Hi
We remove all -m64 references and running again the make command and get this
messages.
:make
INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -O2 -DHAVE_GNU_GETOPT=1-DHAVE_GETOPT_H=1 -EDbigint=int -o ul -lc
gcc: error: unrecognized command line option '-brtl'
make: 1254-004 The error code from the last command is 1.
Stop.
Regards,
CCR
The script is designed for the xlc compiler. You are going to have to
remove every xlc-specific option wherever it appears. Keep going without
further consultation until it works.
On Tue, Jul 11, 2017 at 08:30 ENKI ROMERO <en.ki17@gmail.com> wrote:
> Hi
>
> We remove all -m64 references and running again the make command and get
> this
> messages.
>
> :make
>
> INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -O2 -DHAVE_GNU_GETOPT=1> -DHAVE_GETOPT_H=1 -EDbigint=int -o ul -lc
> gcc: error: unrecognized command line option '-brtl'
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
> Regards,
>
> CCR
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
> --
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2015.1101 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
AHA, I KNEW there was something else that needed to be changed but I
couldn't remember what it was and I didn't find it when I reviewed the copy
of the esql script you uploaded. Look in your esql script at around line
922 you will see a block that looks like this:
#
# Put back the -o options removed from A and CPPOPTS, if
# GL_USEGLU is set.
#
if [ x$GL_USEGLU = "x1" ]
then
A="$A $ETARGET"
STATICFLAGS="$STATICFLAGS -brtl"
fi
Remove the "-brtl" flag from the STATICFLAGS definition. Then about 15
lines further down in the compile block:
if [ x$STAT = x0 ]
then
# compile .c files, link with c++ .o's in $BO
if test "$STATOPT"
then
exec $CC -I$INFDIR/incl/esql $INCLUDE $STATICFLAGS $A $BO $COMB
$SLIB $ALIB $COMB $SLIB $GLSLIB $GLXLIB $SYSNLIB $THRLIB $SYSLIB
else
exec $CC -I$INFDIR/incl/esql $INCLUDE -brtl $LIBPATHS $A $CHKAPI
$BO $LDF $SLIB $ALIB $GLIB $OLIB $GLSLIB $GLXLIB $SYSNLIB $THRLIB $SYSLIB
fi
STAT=$?
fi
Do the same in the second "exec $CC" line - remove the "-brtl" flag. That
should be the last change!
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Tue, Jul 11, 2017 at 10:30 AM, ENKI ROMERO <en.ki17@gmail.com> wrote:
> Hi
>
> We remove all -m64 references and running again the make command and get
> this
> messages.
>
> :make
>
> INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -O2 -DHAVE_GNU_GETOPT=1> -DHAVE_GETOPT_H=1 -EDbigint=int -o ul -lc
> gcc: error: unrecognized command line option '-brtl'
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
> Regards,
>
> CCR
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
thanks guys we made that changes to remove option '-brtl' and we execute the
make command, now we get this messages related to XCOFF64 object files are not
allowed in 32-bit mode
make
INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -O2 -DHAVE_GNU_GETOPT=1-DHAVE_GETOPT_H=1 -EDbigint=int -o ul -lc
ld: 0711-736 ERROR: Input file /informix/lib/esql/checkapi.o:
XCOFF64 object files are not allowed in 32-bit mode.
collect2: error: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.
Stop.
We sorry be a pain head, but we never done things like this before.
Regards,
CCR
It would appear that you have a 32-bit only version of GCC. Which version
are you using? (gcc --version tells you). You need to get a 64-bit GCC
compiler (and then maybe the -m64 options will work). You may need to
upgrade to a different (newer?) version of GCC (7.1.0 is the current GA
release, for example; 3.x is archaic, 4.x is still used by Linux but is
otherwise pretty much obsolete, 5.x is not being actively maintained, 6.x
still gets maintained, while 7.x is current â see https://gcc.gnu.org for
more information).
Or you need to get a 32-bit CSDK, if such a thing is still available.
You can run the 'file' command on the object files you create and on
/informix/lib/esql/checkapi.o and see that they are (presumably, given the
error message) different.
On Tue, Jul 11, 2017 at 8:55 AM, ENKI ROMERO <en.ki17@gmail.com> wrote:
> thanks guys we made that changes to remove option '-brtl' and we execute
> the
> make command, now we get this messages related to XCOFF64 object files are
> not
> allowed in 32-bit mode
>
> make
>
> INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -O2 -DHAVE_GNU_GETOPT=1> -DHAVE_GETOPT_H=1 -EDbigint=int -o ul -lc
> ld: 0711-736 ERROR: Input file /informix/lib/esql/checkapi.o:
>
> XCOFF64 object files are not allowed in 32-bit mode.
> collect2: error: ld returned 8 exit status
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
> We sorry be a pain head, but we never done things like this before.
>
> Regards,
>
> CCR
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2015.1101 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
OK, that explains why the -m64 wasn't being accepted. You apparently have a
32bit GCC compiler installed. If the Informix CSDK you have is 64bit - ie
if the version string produced by "esql -V" ends in .U?? it is 32bit if it
ends in .F?? then it is 64bit - then the libraries will not be compatible
with the gcc compiler's output and you will not be able to link!
You can try deleting all the *.o files and make again from scratch. If the
compiler and CSDK are both 32bit (or 64bit for that matter) then the
problem is just that there is some .o file that was compiled with the wrong
word size, so deleting that .o and recompiling should fix it.
Sorry this has become so tedius for you. AIX with GCC is the most
complicated combination to configure for (at least among the platforms that
still exist). Linux and Solaris with a native compiler are trivial (they
compile out-of-the-box) and AIX and HP/UX with the native compilers are not
difficult either with only a few makefile changes needed (all documented in
the makefiles). Having to use GCC instead of the native compiler is where
it gets dicey and complicated.
FWIW, I just went through a client's esql script configured like yours. It
looks like I had found a way to include the -brtl option to the linker
(it's not actually a compile time flag) when using gcc when I made the
changes for them several years ago. You have to change "-brtl" to
"-Wl,-brtl" in the makefile (rather than deleting it) essentially telling
gcc to pass the "-brtl" to the linker. That flag forces shared objects to
be loaded into memory at startup rather than waiting until they are
referenced. Adding it may slow the initial loading of the program but may
improve runtime slightly. At any rate there is little of no harm in having
deleted the flag altogether (I have done so at other client sites).
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Tue, Jul 11, 2017 at 10:55 AM, ENKI ROMERO <en.ki17@gmail.com> wrote:
> thanks guys we made that changes to remove option '-brtl' and we execute
> the
> make command, now we get this messages related to XCOFF64 object files are
> not
> allowed in 32-bit mode
>
> make
>
> INFORMIXC=gcc /home/crcruz/Utils2_ak/esql -O2 -DHAVE_GNU_GETOPT=1> -DHAVE_GETOPT_H=1 -EDbigint=int -o ul -lc
> ld: 0711-736 ERROR: Input file /informix/lib/esql/checkapi.o:
>
> XCOFF64 object files are not allowed in 32-bit mode.
> collect2: error: ld returned 8 exit status
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
> We sorry be a pain head, but we never done things like this before.
>
> Regards,
>
> CCR
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
Thanks for the advice we have installed GCC on this box gcc --version gcc (GCC) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. We have to request AIX sysadmin install the new GCC version and test again. regards, CCR
We do the command file to /informix/lib/esql/checkapi.o: it printsis 64-Bit file /informix/lib/esql/checkapi.o /informix/lib/esql/checkapi.o: 64-bit XCOFF executable or object module not stripped we run also the esql -v: it prints FC7 / FC8 = 64 Bits sql -version Program Name: esqlc Build Version: 3.70.FC7 Build Number: N011 Build Host: aello Build OS: AIX 1 Build Date: Wed Nov 28 05:23:34 CST 2012 GLS Version: glslib-5.00.FC8 CCR
Correct, so you either need the 32bit CSDK or a 64bit versoin of GNU C. If you get the 64bit GNU C add the -m64 flag back in. Art Art S. Kagel, President and Principal Consultant ASK Database Management www.askdbmgt.com Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Tue, Jul 11, 2017 at 12:35 PM, ENKI ROMERO <en.ki17@gmail.com> wrote: > We do the command file to /informix/lib/esql/checkapi.o: it printsis 64-Bit > > file /informix/lib/esql/checkapi.o > /informix/lib/esql/checkapi.o: 64-bit XCOFF executable or object module not > stripped > > we run also the esql -v: it prints FC7 / FC8 = 64 Bits > > sql -version > Program Name: esqlc > Build Version: 3.70.FC7 > Build Number: N011 > Build Host: aello > Build OS: AIX 1 > Build Date: Wed Nov 28 05:23:34 CST 2012 > GLS Version: glslib-5.00.FC8 > > CCR > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >