This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).
Shape the future of IBM!
We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:
Search existing ideas
Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,
Post your ideas
Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,
Post an idea
Upvote ideas that matter most to you
Get feedback from the IBM team to refine your idea
Specific links you will want to bookmark for future use
Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.
IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.
ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.
IBM Employees should enter Ideas at https://ideas.ibm.com
OK, I've found a workaround. Add '--static' to the STATICFLAGS variable at the top of the esql script in $INFORMIXDIR/bin and it will compile with gcc versions after v7. Note that you will get a warning about the executable still requiring certain system shared libraries of the same (or compatible?) GCC release, but it will create a working fully static executable! Still, this needs work.
Dectoint.ec is just too simple to pull in the problematic libs. Yes, I can link that one also, but try something more complex and BOOM! Witness:
informix@Elbereth:/opt/informix/infmx/demo/esqlc$ esql -static dectoint.ec -o dect
dectoint.ec:28:1:warning: return type defaults to ‘int’ [-Wimplicit-int]
28 | main()
| ^~~~
informix@Elbereth:/opt/informix/infmx/demo/esqlc$
informix@Elbereth:/opt/informix/infmx/demo/esqlc$ dir ./dectoint
ls: cannot access './dectoint': No such file or directory
informix@Elbereth:/opt/informix/infmx/demo/esqlc$ dir ./dect
-rwxrwxr-x 1 informix informix 696160 Mar 4 11:20 ./dect*
informix@Elbereth:/opt/informix/infmx/demo/esqlc$ ldd dect
linux-vdso.so.1 (0x00007fff4e50b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f46b9aa0000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f46b9951000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f46b994b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f46b9759000)
/lib64/ld-linux-x86-64.so.2 (0x00007f46b9b88000)
informix@Elbereth:/opt/informix/infmx/demo/esqlc$ exit
art@Elbereth:/opt/informix/infmx/demo/esqlc$ pop
/opt/informix/infmx ~/GoogleDrive/Latest ~
art@Elbereth:/opt/informix/infmx$ pop
~/GoogleDrive/Latest ~
art@Elbereth:~/GoogleDrive/Latest$ esql -static -o dbstruct dbstruct.ec getopt.c
dbstruct.ec: In function ‘typename_f’:
dbstruct.ec:1321:29:warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size between 0 and 9 [-Wformat-overflow=]
1321 | sprintf( part2, "%s(%d)", dtparts[pt2], fr2 );
| ^~~~~~~~
dbstruct.ec:1321:13:note: ‘sprintf’ output between 4 and 23 bytes into a destination of size 10
1321 | sprintf( part2, "%s(%d)", dtparts[pt2], fr2 );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfapi.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfutil.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(driver.o): relocation R_X86_64_32 against symbol `_ixctype' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(pipe.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(shm_fe.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(shmseg.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(soctcp.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(tcp.o): relocation R_X86_64_32 against symbol `_ixctype' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(unxdmn.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(unxsoc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(util_fe.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(al.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfinit.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfutil2.o): relocation R_X86_64_32 against symbol `_ixctype' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(cm.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfns.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfpfsqi.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfpfutl.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfslsqi.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(tl.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(asfcss.o): relocation R_X86_64_32S against symbol `asf_css_send' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(neterrf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(sockets.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(socssl.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(tprotsw.o): relocation R_X86_64_32S against `.data' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(css.o): relocation R_X86_64_32 against symbol `css_cascade_input' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(isi_api.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(isi_common.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(csmdescr.o): relocation R_X86_64_32S against symbol `_ix2lowmap' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(csserr.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(cssio.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: /opt/informix/infmx/lib/libifasf.a(cssldlib.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
Now with a earlier GCC release:
art@Elbereth:~/GoogleDrive/Latest$ gcc-5 -v
Using built-in specs.
COLLECT_GCC=gcc-5
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-14ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c
++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sys
root=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-p
lugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr
/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --en
able-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu -
-host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)
art@Elbereth:~/GoogleDrive/Latest$ INFORMIXC=gcc-5 esql -static -O -DHAVE_GNU_GETOPT=1 -DHAVE_GETOPT_H=1 -o dbstruct dbstruct.ec -L/usr/lib
art@Elbereth:~/GoogleDrive/Latest$
art@Elbereth:~/GoogleDrive/Latest$ ./dbstruct
Usage:
dbstruct [-F|G|D|e|f|l] [-h host] -d database [-t table] [filename]
dbstruct -M [-F|G|D|e|f|l] [-h host] -d database [-t table] [extension]
dbstruct -V
-V - Display revision and copyright and exit.
-F - generate FORTRAN STRUCTURES rather than "C".
-G - generate 4GL RECORDs rather than "C".
-e - generate ESQL-C style include file.
-f - generate 'fixchar' type for strings in ESQL headers rather than
'string' type. Implies -e.
-D - generate simple SQL DDL for the tables.
...
Issue is not reproducible .
Tried with CSDK 4.50.FC5 and latest version CSDK 4.50.FC7 with gcc 8.2.1 version
# esql -version
Program Name: esqlc
Build Version: 4.50.FC5
Build Number: N216
Build OS: Linux 3.10.0-693.el7.x86_64
Build Date: Mon Nov 30 15:37:42 CST 2020
GLS Version: glslib-7.00.FC4
# gcc --version
gcc (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3)
Copyright (C) 2018 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.
# esql -static dectoint.ec -o dect
# ls -lrt dect
-rwxr-xr-x. 1 root root 666440 Sep 1 06:02 dect
# esql dectoint.ec -o dect1
# ls -lrt dect1
-rwxr-xr-x. 1 root root 15608 Sep 1 06:03 dect1
This was executed with CSDK version:
$ esql -V
IBM Informix CSDK Version 4.50, IBM Informix-ESQL Version 4.50.FC5