Subject: Undefined reference to 'isalpha_array'
From: Divine Providence <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 23 Sep 2003 19:45:02 -0700 (PDT)

Hi,

I was trying to cross-compile Windows binaries on bsd.

The newlib libraries compiled alright. Most part of
winsup compilation went through without any errors.
When it comes to linking I get the following errors:

 The functions asprintf_r(), vasprintf(),
_vasprintf_r(), _asprintf_r() are part of stdio.o
which  has been archived into libc.a. I verified that
the member exists in libc.a

 strsignal.o is added to the list of modules as can be
seen below.

cygheap_user::set_name (const char *new_name)
{
  bool allocated = !!pname;

  if (allocated)
    {
      if (strcasematch (new_name, pname))
        return;
      cfree (pname);
    }

in string.h strcasematch() is inlined and it uses
_isalpha_array[] which is defined in miscfuncs.cc.
miscfuncs.o is also added to be linked to create the
cygwin0.dll.

I am unable to comprehend why the linker fails.
Appreciate if anyone can enligten me on what is
missing.

Thanks,
Seeker.

/disk2/mywindev/WINDDDEV/bin/i686-pc-cygwin32-c++
-gstabs+ -O2 -I./include
-I../../../../newlib-1.11.0/newlib/libc/include -MMD 
-nostdlib -Wl,-Tcygwin.sc -Wl,--out-implib,cygdll.a
-shared -o cygwin0.dll \
-e _dll_entry@12 cygwin.def assert.o autoload.o
bsdlib.o cxx.o cygheap.o cygthread.o dcrt0.o debug.o
delqueue.o dir.o dlfcn.o dll_init.o dtable.o environ.o
errno.o exceptions.o exec.o external.o fcntl.o
fhandler.o fhandler_clipboard.o fhandler_console.o
fhandler_disk_file.o fhandler_dsp.o fhandler_floppy.o
fhandler_mem.o fhandler_proc.o fhandler_process.o
fhandler_random.o fhandler_raw.o fhandler_registry.o
fhandler_serial.o fhandler_socket.o fhandler_tape.o
fhandler_termios.o fhandler_tty.o fhandler_virtual.o
fhandler_windows.o fhandler_zero.o fnmatch.o fork.o
getopt.o glob.o grp.o heap.o init.o ioctl.o ipc.o
iruserok.o localtime.o malloc_wrapper.o miscfuncs.o
mmap.o msg.o net.o netdb.o ntea.o passwd.o path.o
pinfo.o pipe.o poll.o pthread.o regcomp.o regerror.o
regexec.o regfree.o registry.o resource.o scandir.o
sched.o sec_acl.o sec_helper.o security.o select.o
sem.o shared.o shm.o signal.o sigproc.o smallprint.o
spawn.o strace.o strsep.o sync.o syscalls.o sysconf.o
syslog.o termios.o thread.o times.o tty.o uinfo.o
uname.o v8_regexp.o v8_regerror.o v8_regsub.o wait.o
wincap.o window.o longjmp.o setjmp.o
/disk2/mywindev/NL/bn/i686-pc-cygwin32/libiberty/random.o
/disk2/mywindev/NL/bn/i686-pc-cygwin32/libiberty/strsignal.o
malloc.o  version.o winver.o \
 
/disk2/mywindev/NL/bn/i686-pc-cygwin32/newlib/libm/libm.a
/disk2/mywindev/NL/bn/i686-pc-cygwin32/newlib/libc/libc.a
\
-lgcc
/disk2/mywindev/NL/bn/i686-pc-cygwin32/winsup/w32api/lib/libkernel32.a
Cannot export _asprintf_r: symbol not defined
Cannot export vasprintf: symbol not defined
Cannot export _vasprintf_r: symbol not defined
Cannot export _asprintf_r: symbol not defined
Cannot export strsignal: symbol not defined
Cannot export vasprintf: symbol not defined
Cannot export _vasprintf_r: symbol not defined
Cannot export wcscoll: symbol not defined
Cannot export wcswidth: symbol not defined
Cannot export wcwidth: symbol not defined
Creating library file: cygdll.a
cygheap.o: In function
`_ZN12cygheap_user8set_nameEPKc':
/disk2/mywindev/NL/bn/i686-pc-cygwin32/winsup/cygwin/string.h:72:
undefined reference to `_isalpha_array'
dcrt0.o: In function `_Z10dll_crt0_1v':
/disk2/mywindev/NL/bn/i686-pc-cygwin32/winsup/cygwin/string.h:72:
undefined reference to `_isalpha_array'
dcrt0.o: In function `_Z11initial_envv':
/disk2/mywindev/NL/bn/i686-pc-cygwin32/winsup/cygwin/string.h:72:
undefined reference to `_isalpha_array'
dir.o: In function `rmdir':
/disk2/mywindev/NL/bn/i686-pc-cygwin32/winsup/cygwin/string.h:72:
undefined reference to `_isalpha_array'
/disk2/mywindev/NL/bn/i686-pc-cygwin32/winsup/cygwin/string.h:72:
undefined reference to `_isalpha_array'
dll_init.o:/disk2/mywindev/NL/bn/i686-pc-cygwin32/winsup/cygwin/string.h:72:
more undefined references to `_isalpha_array' follow
collect2: ld returned 1 exit status
gmake[1]: *** [cygwin0.dll] Error 1
gmake[1]: Leaving directory
`/disk2/mywindev/NL/bn/i686-pc-cygwin32/winsup/cygwin'
gmake: *** [cygwin] Error 1

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/