I have hit a "hitch" in an autoconfisticate process which is showing "_chkstk" as
I am using Msys Autoconf utilities.
"msysdvlpr" has not been invoked, so I am actually building this particular app
using Msys hosted Mingw.
GCC being used: 3.2.3
Msys 1.09-2003-06.05-1 (Distro/Snapshot).
config.log output (note: I have added "\" for the sake of clarity -- actual
is one big long line):
ld.exe -Bdynamic -o conftest.exe \
-lz d:\TEMP/cckhaaaa.o \
-lmysqlclient -lwsock32 -lntdll -lmingw32 -lgcc -lmoldname -lmingwex \
-lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname \
-lmingwex -lmsvcrt \
variable '_iob' can't be auto-imported. Please read the documentation for ld's --
enable-auto-import for details.
undefined reference to `_chkstk'
--- end of config.log excerpt
My analysis so far:
The "...'-iob' can't be auto-imported..." bit, according to the documentation for
mysql, is something that can be "safely ignored".
Yes, according to the "ld" docs, "..this (type of) message occurs when some
(sub)expression accesses an address ultimately given by the sum of two constants
(Win32 import tables only allow one)."
The library which is generating this "undefined reference to '_chkstk'..." is an MS
static lib (as noted above), which, aside from the few "...'_iob'.." messages, is
being auto-imported by "ld" just fine (mysqlclient.lib).
A quick check of where "_chkstk" is being defined shows that "_chkstk" is defined
in one place as "_chkstk" (ntdll.dll), and in another (libgcc.a) as "___chkstk".
Initially, "___chkstk" (defined in libgcc.a) appears but is not being linked to
"_chkstk" (defined in libntdll.a).
Bottom line, since both ntdll (libntdll.a) and gcc (libgcc.a) are members of (read
"are being referenced by") the "ld" command line (...-lntdll ... -lgcc), it doesn't
make a lot of sense as to "why" "_chkstk" remains undefined.
At this point, I am thinking that maybe I need to define --enable-stdcall-fixup
as an "ld" option.
Comments? Ideas? Feedback?