Compiling dbschema
Posted in 2006
A user building Art Kagel's utils2_ak toolkit on Red Hat Enterprise Linux 3 (gcc 3.2.3) got all utilities compiled except myschema, which failed at link time with "undefined reference to `__alloca'" from getopt.o. Kagel first suggested extra -D__GNUC__/-D__GNU_LIBRARY__ CFLAGS, which didn't help another user on SUSE/CentOS. Clive Eisen found the __alloca #ifdef logic in getopt.c was broken and fixed it by adding "#define __alloca alloca" (around line 86); this worked for others on CentOS 4.4 and Fedora 6, and Kagel said he'd fold it into the source.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Triggers, Constraints & Referential Integrity, Platform-Specific Issues
People,
I have downloaded the latest utils2_ak and tried compile it. All the other
utilities compiled but I am having difficulties in compiling myschema. Am I
doing something wrong ?
$ esql -VIBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.UC3
Software Serial Number AAA#B000000
$ c4gl -VIBM INFORMIX-4GL Version 7.32.UC2
Software Serial Number RDS#N000000
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linuxThread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
$
$ ls -latotal 1500
drwxrwxr-x 2 informix informix 4096 Oct 11 17:23 .
drwxr-xr-x 39 informix informix 4096 Oct 11 17:23 ..
-rw-rw-r-- 1 informix informix 5150 Oct 11 17:23 BUILDING
-rw-rw-r-- 1 informix informix 47248 Oct 11 17:23 dbcopy.ec
-rw-rw-r-- 1 informix informix 30054 Oct 11 17:23 dbdelete.ec
-rw-rw-r-- 1 informix informix 129350 Oct 11 17:23 dostats.ec
-rw-rw-r-- 1 informix informix 7810 Oct 11 17:23 drive_dostats
-rw-rw-r-- 1 informix informix 1582 Oct 11 17:23 listdb5.ec
-rw-rw-r-- 1 informix informix 21653 Oct 11 17:23 listdb7.ec
-rw-rw-r-- 1 informix informix 2819 Oct 11 17:23 Makefile
-rw-rw-r-- 1 informix informix 4557 Oct 11 17:23 myschema.README
-rw-rw-r-- 1 informix informix 377752 Oct 11 17:23 myschema.source.ar
-rw-rw-r-- 1 informix informix 17383 Oct 11 17:23 printfreeB.ec
-rw-rw-r-- 1 informix informix 37670 Oct 11 17:23 README.1st
-rw-rw-r-- 1 informix informix 53751 Oct 11 17:23 ul.ec
-rw-r--r-- 1 informix informix 737893 Oct 9 15:22 utils2_ak
$ make
INFORMIXC=gcc esql -O -o ul ul.ec -L/usr/lib -lgen
INFORMIXC=gcc esql -O -o printfreeB printfreeB.ec
INFORMIXC=gcc esql -O -o listdb5 listdb5.ec
INFORMIXC=gcc esql -O -o listdb7 listdb7.ec
INFORMIXC=gcc esql -O -o dostats dostats.ec# 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
INFORMIXC=gcc esql -O -o dbdelete dbdelete.ec
INFORMIXC=gcc esql -O -o dbcopy dbcopy.ecif [ ! -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; \\\\
make -f myschema.mk.norcs; \\\\
cp -p myschema ..
make[1]: Entering directory `/home/informix/utils2/myschema.d'
INFORMIXC=gcc esql -O3 -c myschema.ec
INFORMIXC=gcc esql -O3 -c blobfuncs.ec
INFORMIXC=gcc gcc -O3 -c cleancat.c
INFORMIXC=gcc esql -O3 -c format_triggers.ec
INFORMIXC=gcc esql -O3 -c getsysdata.ec
INFORMIXC=gcc esql -O3 -c obtainidxsize.ec
INFORMIXC=gcc esql -O3 -c print_auths.ec
INFORMIXC=gcc esql -O3 -c print_checks.ec
INFORMIXC=gcc esql -O3 -c print_constraints.ec
INFORMIXC=gcc esql -O3 -c print_defaults.ec
INFORMIXC=gcc esql -O3 -c print_indexes.ec
INFORMIXC=gcc esql -O3 -c print_procedures.ec
INFORMIXC=gcc esql -O3 -c print_triggers.ec
INFORMIXC=gcc esql -O3 -c print_violations.ec
INFORMIXC=gcc esql -O3 -c print_synonyms.ec
INFORMIXC=gcc esql -O3 -c print_views.ec
INFORMIXC=gcc gcc -O3 -c usage.c
INFORMIXC=gcc esql -O3 -c print_seconstraints.ec
INFORMIXC=gcc esql -O3 -c print_seindexes.ec
INFORMIXC=gcc esql -O3 -c print_distributions.ec
INFORMIXC=gcc esql -O3 -c print_userauths.ec
INFORMIXC=gcc gcc -O3 -c tokens.c
INFORMIXC=gcc esql -O3 -c return_extended.ec
INFORMIXC=gcc esql -O3 -c print_casts.ec
INFORMIXC=gcc esql -O3 -c print_types.ec
INFORMIXC=gcc esql -O3 -c print_coltype.ec
INFORMIXC=gcc esql -O3 -c print_aggregates.ec
INFORMIXC=gcc esql -O3 -c print_alters.ec
INFORMIXC=gcc esql -O3 -c print_puts.ec
INFORMIXC=gcc esql -O3 -c print_sequences.ec
INFORMIXC=gcc gcc -O3 -c getopt.c
INFORMIXC=gcc esql -o myschema myschema.o blobfuncs.o cleancat.oformat_triggers.o getsysdata.o obtainidxsize.o print_auths.o print_checks.o
print_constraints.o print_defaults.o print_indexes.o print_procedures.o
print_triggers.o print_violations.o print_synonyms.o print_views.o usage.o
print_seconstraints.o print_seindexes.o print_distributions.o
print_userauths.o tokens.o return_extended.o print_casts.o print_types.o
print_coltype.o print_aggregates.o print_alters.o print_puts.o
print_sequences.o getopt.o
getopt.o(.text+0xfe): In function `_getopt_internal':
: undefined reference to `__alloca'
getopt.o(.text+0x79b): In function `_getopt_internal':
: undefined reference to `__alloca'
collect2: ld returned 1 exit status
make[1]: *** [myschema] Error 1
make[1]: Leaving directory `/home/informix/utils2/myschema.d'
cp: cannot stat `myschema': No such file or directory
make: *** [myschema] Error 1
$
Thanks
Kenneth
Do you have the native AIX C compiler xlc? I have no trouble using that to
compile myschema on AIX rather than GCC. If you use xlc do not use
optimizations higher than -O2 (-O3 through -O5 are unreliable) and add the
-qmaxmem=16384 to CDFLAGS as suggested for IBM in the makefile.
Let me know if that works, doesn't work, if you do not have xlc.
Art S. Kagel
----- Original Message -----
From: Kenneth Penza <ids@iiug.org>
At: 10/14 4:16:13
People,
I have downloaded the latest utils2_ak and tried compile it. All the other
utilities compiled but I am having difficulties in compiling myschema. Am I
doing something wrong ?
$ esql -VIBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.UC3
Software Serial Number AAA#B000000
$ c4gl -VIBM INFORMIX-4GL Version 7.32.UC2
Software Serial Number RDS#N000000
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linuxThread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
$
$ ls -latotal 1500
drwxrwxr-x 2 informix informix 4096 Oct 11 17:23 .
drwxr-xr-x 39 informix informix 4096 Oct 11 17:23 ..
-rw-rw-r-- 1 informix informix 5150 Oct 11 17:23 BUILDING
-rw-rw-r-- 1 informix informix 47248 Oct 11 17:23 dbcopy.ec
-rw-rw-r-- 1 informix informix 30054 Oct 11 17:23 dbdelete.ec
-rw-rw-r-- 1 informix informix 129350 Oct 11 17:23 dostats.ec
-rw-rw-r-- 1 informix informix 7810 Oct 11 17:23 drive_dostats
-rw-rw-r-- 1 informix informix 1582 Oct 11 17:23 listdb5.ec
-rw-rw-r-- 1 informix informix 21653 Oct 11 17:23 listdb7.ec
-rw-rw-r-- 1 informix informix 2819 Oct 11 17:23 Makefile
-rw-rw-r-- 1 informix informix 4557 Oct 11 17:23 myschema.README
-rw-rw-r-- 1 informix informix 377752 Oct 11 17:23 myschema.source.ar
-rw-rw-r-- 1 informix informix 17383 Oct 11 17:23 printfreeB.ec
-rw-rw-r-- 1 informix informix 37670 Oct 11 17:23 README.1st
-rw-rw-r-- 1 informix informix 53751 Oct 11 17:23 ul.ec
-rw-r--r-- 1 informix informix 737893 Oct 9 15:22 utils2_ak
$ make
INFORMIXC=gcc esql -O -o ul ul.ec -L/usr/lib -lgen
INFORMIXC=gcc esql -O -o printfreeB printfreeB.ec
INFORMIXC=gcc esql -O -o listdb5 listdb5.ec
INFORMIXC=gcc esql -O -o listdb7 listdb7.ec
INFORMIXC=gcc esql -O -o dostats dostats.ec# 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
INFORMIXC=gcc esql -O -o dbdelete dbdelete.ec
INFORMIXC=gcc esql -O -o dbcopy dbcopy.ecif [ ! -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; \\\\
make -f myschema.mk.norcs; \\\\
cp -p myschema ..
make[1]: Entering directory `/home/informix/utils2/myschema.d'
INFORMIXC=gcc esql -O3 -c myschema.ec
INFORMIXC=gcc esql -O3 -c blobfuncs.ec
INFORMIXC=gcc gcc -O3 -c cleancat.c
INFORMIXC=gcc esql -O3 -c format_triggers.ec
INFORMIXC=gcc esql -O3 -c getsysdata.ec
INFORMIXC=gcc esql -O3 -c obtainidxsize.ec
INFORMIXC=gcc esql -O3 -c print_auths.ec
INFORMIXC=gcc esql -O3 -c print_checks.ec
INFORMIXC=gcc esql -O3 -c print_constraints.ec
INFORMIXC=gcc esql -O3 -c print_defaults.ec
INFORMIXC=gcc esql -O3 -c print_indexes.ec
INFORMIXC=gcc esql -O3 -c print_procedures.ec
INFORMIXC=gcc esql -O3 -c print_triggers.ec
INFORMIXC=gcc esql -O3 -c print_violations.ec
INFORMIXC=gcc esql -O3 -c print_synonyms.ec
INFORMIXC=gcc esql -O3 -c print_views.ec
INFORMIXC=gcc gcc -O3 -c usage.c
INFORMIXC=gcc esql -O3 -c print_seconstraints.ec
INFORMIXC=gcc esql -O3 -c print_seindexes.ec
INFORMIXC=gcc esql -O3 -c print_distributions.ec
INFORMIXC=gcc esql -O3 -c print_userauths.ec
INFORMIXC=gcc gcc -O3 -c tokens.c
INFORMIXC=gcc esql -O3 -c return_extended.ec
INFORMIXC=gcc esql -O3 -c print_casts.ec
INFORMIXC=gcc esql -O3 -c print_types.ec
INFORMIXC=gcc esql -O3 -c print_coltype.ec
INFORMIXC=gcc esql -O3 -c print_aggregates.ec
INFORMIXC=gcc esql -O3 -c print_alters.ec
INFORMIXC=gcc esql -O3 -c print_puts.ec
INFORMIXC=gcc esql -O3 -c print_sequences.ec
INFORMIXC=gcc gcc -O3 -c getopt.c
INFORMIXC=gcc esql -o myschema myschema.o blobfuncs.o cleancat.oformat_triggers.o getsysdata.o obtainidxsize.o print_auths.o print_checks.o
print_constraints.o print_defaults.o print_indexes.o print_procedures.o
print_triggers.o print_violations.o print_synonyms.o print_views.o usage.o
print_seconstraints.o print_seindexes.o print_distributions.o
print_userauths.o tokens.o return_extended.o print_casts.o print_types.o
print_coltype.o print_aggregates.o print_alters.o print_puts.o
print_sequences.o getopt.o
getopt.o(.text+0xfe): In function `_getopt_internal':
: undefined reference to `__alloca'
getopt.o(.text+0x79b): In function `_getopt_internal':
: undefined reference to `__alloca'
collect2: ld returned 1 exit status
make[1]: *** [myschema] Error 1
make[1]: Leaving directory `/home/informix/utils2/myschema.d'
cp: cannot stat `myschema': No such file or directory
make: *** [myschema] Error 1
$
Thanks
Kenneth
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
I am using Redhat Enterprise Linux 3 on i386.
$ uname -a
Linux inf10-tp 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686i686 i386 GNU/Linux
$ cat /etc/issueRed Hat Enterprise Linux AS release 3 (Taroon)
Kernel \\\\r on an \\\\m
$
Regards
Kenneth Penza
Technical Services Officer
Systems and Database Services
Service Management Department
Malta Information Technology & Training Services Ltd
Please read our Legal Notice: http://emailpolicy.mitts.gov.mt
P
Please consider your environmental responsibility before printing this
e-mail.
END OF TEXT
-----Original Message-----
From: ART KAGEL, BLOOMBERG/ 731 LEXIN [mailto:kagel@bloomberg.net]
Sent: 16 October 2006 16:25
To: Penza Kenneth at MITTS
Subject: Re: Compiling dbschema [7628]
Do you have the native AIX C compiler xlc? I have no trouble using that
to
compile myschema on AIX rather than GCC. If you use xlc do not use
optimizations higher than -O2 (-O3 through -O5 are unreliable) and add
the
-qmaxmem=16384 to CDFLAGS as suggested for IBM in the makefile.
Let me know if that works, doesn't work, if you do not have xlc.
Art S. Kagel
----- Original Message -----
From: Kenneth Penza <ids@iiug.org>
At: 10/14 4:16:13
People,
I have downloaded the latest utils2_ak and tried compile it. All the
other
utilities compiled but I am having difficulties in compiling myschema.
Am I
doing something wrong ?
$ esql -VIBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.UC3
Software Serial Number AAA#B000000
$ c4gl -VIBM INFORMIX-4GL Version 7.32.UC2
Software Serial Number RDS#N000000
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linuxThread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
$
$ ls -latotal 1500
drwxrwxr-x 2 informix informix 4096 Oct 11 17:23 .
drwxr-xr-x 39 informix informix 4096 Oct 11 17:23 ..
-rw-rw-r-- 1 informix informix 5150 Oct 11 17:23 BUILDING
-rw-rw-r-- 1 informix informix 47248 Oct 11 17:23 dbcopy.ec
-rw-rw-r-- 1 informix informix 30054 Oct 11 17:23 dbdelete.ec
-rw-rw-r-- 1 informix informix 129350 Oct 11 17:23 dostats.ec
-rw-rw-r-- 1 informix informix 7810 Oct 11 17:23 drive_dostats
-rw-rw-r-- 1 informix informix 1582 Oct 11 17:23 listdb5.ec
-rw-rw-r-- 1 informix informix 21653 Oct 11 17:23 listdb7.ec
-rw-rw-r-- 1 informix informix 2819 Oct 11 17:23 Makefile
-rw-rw-r-- 1 informix informix 4557 Oct 11 17:23 myschema.README
-rw-rw-r-- 1 informix informix 377752 Oct 11 17:23 myschema.source.ar
-rw-rw-r-- 1 informix informix 17383 Oct 11 17:23 printfreeB.ec
-rw-rw-r-- 1 informix informix 37670 Oct 11 17:23 README.1st
-rw-rw-r-- 1 informix informix 53751 Oct 11 17:23 ul.ec
-rw-r--r-- 1 informix informix 737893 Oct 9 15:22 utils2_ak
$ make
INFORMIXC=gcc esql -O -o ul ul.ec -L/usr/lib -lgen
INFORMIXC=gcc esql -O -o printfreeB printfreeB.ec
INFORMIXC=gcc esql -O -o listdb5 listdb5.ec
INFORMIXC=gcc esql -O -o listdb7 listdb7.ec
INFORMIXC=gcc esql -O -o dostats dostats.ec# 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
INFORMIXC=gcc esql -O -o dbdelete dbdelete.ec
INFORMIXC=gcc esql -O -o dbcopy dbcopy.ecif [ ! -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; \\\\
make -f myschema.mk.norcs; \\\\
cp -p myschema ..
make[1]: Entering directory `/home/informix/utils2/myschema.d'
INFORMIXC=gcc esql -O3 -c myschema.ec
INFORMIXC=gcc esql -O3 -c blobfuncs.ec
INFORMIXC=gcc gcc -O3 -c cleancat.c
INFORMIXC=gcc esql -O3 -c format_triggers.ec
INFORMIXC=gcc esql -O3 -c getsysdata.ec
INFORMIXC=gcc esql -O3 -c obtainidxsize.ec
INFORMIXC=gcc esql -O3 -c print_auths.ec
INFORMIXC=gcc esql -O3 -c print_checks.ec
INFORMIXC=gcc esql -O3 -c print_constraints.ec
INFORMIXC=gcc esql -O3 -c print_defaults.ec
INFORMIXC=gcc esql -O3 -c print_indexes.ec
INFORMIXC=gcc esql -O3 -c print_procedures.ec
INFORMIXC=gcc esql -O3 -c print_triggers.ec
INFORMIXC=gcc esql -O3 -c print_violations.ec
INFORMIXC=gcc esql -O3 -c print_synonyms.ec
INFORMIXC=gcc esql -O3 -c print_views.ec
INFORMIXC=gcc gcc -O3 -c usage.c
INFORMIXC=gcc esql -O3 -c print_seconstraints.ec
INFORMIXC=gcc esql -O3 -c print_seindexes.ec
INFORMIXC=gcc esql -O3 -c print_distributions.ec
INFORMIXC=gcc esql -O3 -c print_userauths.ec
INFORMIXC=gcc gcc -O3 -c tokens.c
INFORMIXC=gcc esql -O3 -c return_extended.ec
INFORMIXC=gcc esql -O3 -c print_casts.ec
INFORMIXC=gcc esql -O3 -c print_types.ec
INFORMIXC=gcc esql -O3 -c print_coltype.ec
INFORMIXC=gcc esql -O3 -c print_aggregates.ec
INFORMIXC=gcc esql -O3 -c print_alters.ec
INFORMIXC=gcc esql -O3 -c print_puts.ec
INFORMIXC=gcc esql -O3 -c print_sequences.ec
INFORMIXC=gcc gcc -O3 -c getopt.c
INFORMIXC=gcc esql -o myschema myschema.o blobfuncs.o cleancat.oformat_triggers.o getsysdata.o obtainidxsize.o print_auths.o
print_checks.o
print_constraints.o print_defaults.o print_indexes.o print_procedures.o
print_triggers.o print_violations.o print_synonyms.o print_views.o
usage.o
print_seconstraints.o print_seindexes.o print_distributions.o
print_userauths.o tokens.o return_extended.o print_casts.o print_types.o
print_coltype.o print_aggregates.o print_alters.o print_puts.o
print_sequences.o getopt.o
getopt.o(.text+0xfe): In function `_getopt_internal':
: undefined reference to `__alloca'
getopt.o(.text+0x79b): In function `_getopt_internal':
: undefined reference to `__alloca'
collect2: ld returned 1 exit status
make[1]: *** [myschema] Error 1
make[1]: Leaving directory `/home/informix/utils2/myschema.d'
cp: cannot stat `myschema': No such file or directory
make: *** [myschema] Error 1
$
Thanks
Kenneth
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
I'm sorry Kenneth, I misread your post and somehow got it into my head that you
were on an AIX machine. Hmmmm, haven't tried to compile this on Linux in a few
years and that would have been gcc 2.9 or so. OK, try this - add the following
to the CFLAGS variable in the makefile:
-D__GNUC__=3.2 -D__GNU_LIBRARY__=3.2
Let me know if that works and I'll include it in the std makefile and notes.
Art S. Kagel
----- Original Message -----
From: Penza Kenneth At Mitts <ids@iiug.org>
At: 10/16 10:37:27
I am using Redhat Enterprise Linux 3 on i386.
$ uname -a
Linux inf10-tp 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686i686 i386 GNU/Linux
$ cat /etc/issueRed Hat Enterprise Linux AS release 3 (Taroon)
Kernel \\\\r on an \\\\m
$
Regards
Kenneth Penza
Technical Services Officer
Systems and Database Services
Service Management Department
Malta Information Technology & Training Services Ltd
Please read our Legal Notice: http://emailpolicy.mitts.gov.mt
P
Please consider your environmental responsibility before printing this
e-mail.
END OF TEXT
-----Original Message-----
From: ART KAGEL, BLOOMBERG/ 731 LEXIN [mailto:kagel@bloomberg.net]
Sent: 16 October 2006 16:25
To: Penza Kenneth at MITTS
Subject: Re: Compiling dbschema [7628]
Do you have the native AIX C compiler xlc? I have no trouble using that
to
compile myschema on AIX rather than GCC. If you use xlc do not use
optimizations higher than -O2 (-O3 through -O5 are unreliable) and add
the
-qmaxmem=16384 to CDFLAGS as suggested for IBM in the makefile.
Let me know if that works, doesn't work, if you do not have xlc.
Art S. Kagel
----- Original Message -----
From: Kenneth Penza <ids@iiug.org>
At: 10/14 4:16:13
People,
I have downloaded the latest utils2_ak and tried compile it. All the
other
utilities compiled but I am having difficulties in compiling myschema.
Am I
doing something wrong ?
$ esql -VIBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.UC3
Software Serial Number AAA#B000000
$ c4gl -VIBM INFORMIX-4GL Version 7.32.UC2
Software Serial Number RDS#N000000
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linuxThread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
$
$ ls -latotal 1500
drwxrwxr-x 2 informix informix 4096 Oct 11 17:23 .
drwxr-xr-x 39 informix informix 4096 Oct 11 17:23 ..
-rw-rw-r-- 1 informix informix 5150 Oct 11 17:23 BUILDING
-rw-rw-r-- 1 informix informix 47248 Oct 11 17:23 dbcopy.ec
-rw-rw-r-- 1 informix informix 30054 Oct 11 17:23 dbdelete.ec
-rw-rw-r-- 1 informix informix 129350 Oct 11 17:23 dostats.ec
-rw-rw-r-- 1 informix informix 7810 Oct 11 17:23 drive_dostats
-rw-rw-r-- 1 informix informix 1582 Oct 11 17:23 listdb5.ec
-rw-rw-r-- 1 informix informix 21653 Oct 11 17:23 listdb7.ec
-rw-rw-r-- 1 informix informix 2819 Oct 11 17:23 Makefile
-rw-rw-r-- 1 informix informix 4557 Oct 11 17:23 myschema.README
-rw-rw-r-- 1 informix informix 377752 Oct 11 17:23 myschema.source.ar
-rw-rw-r-- 1 informix informix 17383 Oct 11 17:23 printfreeB.ec
-rw-rw-r-- 1 informix informix 37670 Oct 11 17:23 README.1st
-rw-rw-r-- 1 informix informix 53751 Oct 11 17:23 ul.ec
-rw-r--r-- 1 informix informix 737893 Oct 9 15:22 utils2_ak
$ make
INFORMIXC=gcc esql -O -o ul ul.ec -L/usr/lib -lgen
INFORMIXC=gcc esql -O -o printfreeB printfreeB.ec
INFORMIXC=gcc esql -O -o listdb5 listdb5.ec
INFORMIXC=gcc esql -O -o listdb7 listdb7.ec
INFORMIXC=gcc esql -O -o dostats dostats.ec# 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
INFORMIXC=gcc esql -O -o dbdelete dbdelete.ec
INFORMIXC=gcc esql -O -o dbcopy dbcopy.ecif [ ! -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; \\\\
make -f myschema.mk.norcs; \\\\
cp -p myschema ..
make[1]: Entering directory `/home/informix/utils2/myschema.d'
INFORMIXC=gcc esql -O3 -c myschema.ec
INFORMIXC=gcc esql -O3 -c blobfuncs.ec
INFORMIXC=gcc gcc -O3 -c cleancat.c
INFORMIXC=gcc esql -O3 -c format_triggers.ec
INFORMIXC=gcc esql -O3 -c getsysdata.ec
INFORMIXC=gcc esql -O3 -c obtainidxsize.ec
INFORMIXC=gcc esql -O3 -c print_auths.ec
INFORMIXC=gcc esql -O3 -c print_checks.ec
INFORMIXC=gcc esql -O3 -c print_constraints.ec
INFORMIXC=gcc esql -O3 -c print_defaults.ec
INFORMIXC=gcc esql -O3 -c print_indexes.ec
INFORMIXC=gcc esql -O3 -c print_procedures.ec
INFORMIXC=gcc esql -O3 -c print_triggers.ec
INFORMIXC=gcc esql -O3 -c print_violations.ec
INFORMIXC=gcc esql -O3 -c print_synonyms.ec
INFORMIXC=gcc esql -O3 -c print_views.ec
INFORMIXC=gcc gcc -O3 -c usage.c
INFORMIXC=gcc esql -O3 -c print_seconstraints.ec
INFORMIXC=gcc esql -O3 -c print_seindexes.ec
INFORMIXC=gcc esql -O3 -c print_distributions.ec
INFORMIXC=gcc esql -O3 -c print_userauths.ec
INFORMIXC=gcc gcc -O3 -c tokens.c
INFORMIXC=gcc esql -O3 -c return_extended.ec
INFORMIXC=gcc esql -O3 -c print_casts.ec
INFORMIXC=gcc esql -O3 -c print_types.ec
INFORMIXC=gcc esql -O3 -c print_coltype.ec
INFORMIXC=gcc esql -O3 -c print_aggregates.ec
INFORMIXC=gcc esql -O3 -c print_alters.ec
INFORMIXC=gcc esql -O3 -c print_puts.ec
INFORMIXC=gcc esql -O3 -c print_sequences.ec
INFORMIXC=gcc gcc -O3 -c getopt.c
INFORMIXC=gcc esql -o myschema myschema.o blobfuncs.o cleancat.oformat_triggers.o getsysdata.o obtainidxsize.o print_auths.o
print_checks.o
print_constraints.o print_defaults.o print_indexes.o print_procedures.o
print_triggers.o print_violations.o print_synonyms.o print_views.o
usage.o
print_seconstraints.o print_seindexes.o print_distributions.o
print_userauths.o tokens.o return_extended.o print_casts.o print_types.o
print_coltype.o print_aggregates.o print_alters.o print_puts.o
print_sequences.o getopt.o
getopt.o(.text+0xfe): In function `_getopt_internal':
: undefined reference to `__alloca'
getopt.o(.text+0x79b): In function `_getopt_internal':
: undefined reference to `__alloca'
collect2: ld returned 1 exit status
make[1]: *** [myschema] Error 1
make[1]: Leaving directory `/home/informix/utils2/myschema.d'
cp: cannot stat `myschema': No such file or directory
make: *** [myschema] Error 1
$
Thanks
Kenneth
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
*******************************************************************************
Forum Note: Use "Reply" to post a response in t
That solution didn't work for me on either SUSE or CentOS. I have the additional challenge of forcing the compilation in 32 bit mode under 64 bit OS, but that has worked for me on previous versions of myschema by simply adding "-m32" to CFLAGS and adding "-m32 -s -m elf_i386" to LDFLAGS. Is Informix on Linux just not very popular???
For whatever reason the ifdefs relating to __alloca are broken (for me on SUSE 9.3) in getopt.c Just add in #define __alloca alloca I've put it on line 86 It now compiles fine -- Clive
Thanks Clive. I'll update the code. That file gave trouble on HP & AIX recently promoting changes that probably caused the problem on Linux. Art ----- Original Message ----- From: Clive Eisen <ids@iiug.org> At: 11/12 7:34:54 For whatever reason the ifdefs relating to __alloca are broken (for me on SUSE 9.3) in getopt.c Just add in #define __alloca alloca I've put it on line 86 It now compiles fine -- Clive ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Jeff Does Clives suggestion work for you? Art S. Kagel ----- Original Message ----- From: Clive Eisen <ids@iiug.org> At: 11/12 7:34:54 For whatever reason the ifdefs relating to __alloca are broken (for me on SUSE 9.3) in getopt.c Just add in #define __alloca alloca I've put it on line 86 It now compiles fine -- Clive ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Art, I had the same problem compiling utils2_ak on a CentOS 4.4 and Fedora 6 system. After adding the #define all compiles well so I would suggest to add this into the next release. Roland Wintgen (Systemadministrator) EVG Elektro-Vertriebs-Gesellschaft Martens GmbH & Co KG Trompeterallee 244-246, D-41189 Moenchengladbach Tel. +49 21 66 / 55 08 23, Fax +49 21 66 / 55 08 90 www.evg.de rw@evg.de
Related threads
- [GERMAN] 4GL-Trainingsanbieter gesucht
- RE: Performance Monitoring/Tuning
- IF and SELECT statement newbie question