public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-developers@cygwin.com
Subject: Re: undefined reference to `strlwr' on 64bit Cygwin
Date: Sun, 17 Mar 2013 09:52:00 -0000	[thread overview]
Message-ID: <20130317095141.GB17003@calimero.vinschen.de> (raw)
In-Reply-To: <514525AB.9000708@cornell.edu>

On Mar 16 22:08, Ken Brown wrote:
> $ uname -a
> CYGWIN_NT-6.1 fiona 1.7.18(0.263/5/3) 2013-03-15 16:35 x86_64 Cygwin
> 
> $ gcc --version
> gcc (GCC) 4.8.0 20130307 (experimental)
> 
> $ cat strlwr_test.c
> #include <string.h>
> #include <stdio.h>
> 
> int
> main ()
> {
>   char str[] = "FRED";
>   printf ("%s\n", strlwr (str));
> }
> 
> $ gcc strlwr_test.c
> /tmp/ccW2SOn8.o:strlwr_test.c:(.text+0x20): undefined reference to `strlwr'
> /tmp/ccW2SOn8.o:strlwr_test.c:(.text+0x20): relocation truncated to
> fit: R_X86_64_PC32 against undefined symbol `strlwr'
> /usr/lib/gcc/x86_64-pc-cygwin/4.8.0/../../../../x86_64-pc-cygwin/bin/ld:
> /tmp/ccW2SOn8.o: bad reloc address 0x0 in section `.pdata'
> /usr/lib/gcc/x86_64-pc-cygwin/4.8.0/../../../../x86_64-pc-cygwin/bin/ld:
> final link failed: Invalid operation
> collect2: error: ld returned 1 exit status

Thanks for the hint, I added it back to cygwin64.din.

However, do you really use this function?  It's broken by design.  In
theory it's one of those functions which should never have been exported
since it only works on single-byte charsets and glibc rightfully doesn't
provide it at all.  If you use it with UTF-8 non-ASCII chars, the result
is random nonsense.

> Ken
> 
> P.S. Is this still the appropriate list for 64bit bug reports, or is
> it time to move to the main cygwin list?

No, that's fine.  Let's stick to the developers list (or cygwin-apps for
stuff which rather affects setup and packaging) until we do our first
official release.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

  reply	other threads:[~2013-03-17  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17  2:09 Ken Brown
2013-03-17  9:52 ` Corinna Vinschen [this message]
2013-03-17 12:54   ` Ken Brown
2013-03-18 13:07     ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130317095141.GB17003@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-developers@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).