mailing list of musl libc
 help / color / mirror / code / Atom feed
* __strftime_l: symbol not found
@ 2019-05-08 16:26 John Mudd
  2019-05-08 18:31 ` Szabolcs Nagy
  2019-05-08 19:54 ` John Mudd
  0 siblings, 2 replies; 5+ messages in thread
From: John Mudd @ 2019-05-08 16:26 UTC (permalink / raw)
  To: musl; +Cc: John Mudd

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

Hi, I'm upgrading my musl from 1.19 to 1.22 but it looks like I lost
the __strftime_l function. It's present in the 1.19 libc.so but not in 1.22.

$ nm -D /home/mudd/musl-1.1.19.install/lib/libc.so | grep __strftime_l
0007b6a0 T __strftime_l
$ nm -D /home/mudd/musl-1.1.22.install/lib/libc.so | grep __strftime_l
$


Here's the diff on the source code. I can't explain how this diff would
cause the function to disappear. Any suggestions?

$ diff musl-1.1.19/src/time/strftime.c  /musl-1.1.22/src/time/strftime.c
9d8
< #include "libc.h"
12,13d10
< const char *__nl_langinfo_l(nl_item, locale_t);
<
48,50d44
< const char *__tm_to_tzname(const struct tm *);
< size_t __strftime_l(char *restrict, size_t, const char *restrict, const
struct tm *restrict, locale_t);
<
184,186c178,179
<               *l = snprintf(*s, sizeof *s, "%+.2d%.2d",
<                       (tm->__tm_gmtoff)/3600,
<                       abs(tm->__tm_gmtoff%3600)/60);
---
>               *l = snprintf(*s, sizeof *s, "%+.4ld",
>                       tm->__tm_gmtoff/3600*100 + tm->__tm_gmtoff%3600/60);
$

[-- Attachment #2: Type: text/html, Size: 1732 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: __strftime_l: symbol not found
  2019-05-08 16:26 __strftime_l: symbol not found John Mudd
@ 2019-05-08 18:31 ` Szabolcs Nagy
  2019-05-08 19:54 ` John Mudd
  1 sibling, 0 replies; 5+ messages in thread
From: Szabolcs Nagy @ 2019-05-08 18:31 UTC (permalink / raw)
  To: musl; +Cc: John Mudd

* John Mudd <johnbmudd@gmail.com> [2019-05-08 12:26:15 -0400]:
> Hi, I'm upgrading my musl from 1.19 to 1.22 but it looks like I lost
> the __strftime_l function. It's present in the 1.19 libc.so but not in 1.22.

user binary is not supposed to have reference to this symbol,
it's musl internal (now hidden, previously visible)

it can be argued that the symbol is part of the glibc abi
compat since glibc exports it, but even on glibc i'm not
sure how you would end up with such symbol reference
(glibc headers don't refer to it).


> 
> $ nm -D /home/mudd/musl-1.1.19.install/lib/libc.so | grep __strftime_l
> 0007b6a0 T __strftime_l
> $ nm -D /home/mudd/musl-1.1.22.install/lib/libc.so | grep __strftime_l
> $
> 
> 
> Here's the diff on the source code. I can't explain how this diff would
> cause the function to disappear. Any suggestions?
> 
> $ diff musl-1.1.19/src/time/strftime.c  /musl-1.1.22/src/time/strftime.c
> 9d8
> < #include "libc.h"
> 12,13d10
> < const char *__nl_langinfo_l(nl_item, locale_t);
> <
> 48,50d44
> < const char *__tm_to_tzname(const struct tm *);
> < size_t __strftime_l(char *restrict, size_t, const char *restrict, const
> struct tm *restrict, locale_t);
> <
> 184,186c178,179
> <               *l = snprintf(*s, sizeof *s, "%+.2d%.2d",
> <                       (tm->__tm_gmtoff)/3600,
> <                       abs(tm->__tm_gmtoff%3600)/60);
> ---
> >               *l = snprintf(*s, sizeof *s, "%+.4ld",
> >                       tm->__tm_gmtoff/3600*100 + tm->__tm_gmtoff%3600/60);
> $


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: __strftime_l: symbol not found
  2019-05-08 16:26 __strftime_l: symbol not found John Mudd
  2019-05-08 18:31 ` Szabolcs Nagy
@ 2019-05-08 19:54 ` John Mudd
  2019-05-08 20:03   ` Szabolcs Nagy
  1 sibling, 1 reply; 5+ messages in thread
From: John Mudd @ 2019-05-08 19:54 UTC (permalink / raw)
  To: musl; +Cc: John Mudd

[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]

Here's more details. I'm trying to load a library that includes some C++
code. It requires libstdc++.so.6 which is looking for __strftime_l.

$ nm -D /usr/rx30/musl/lib/libstdc++.so.6 | grep __strftime_l
         U __strftime_l
$

I get the following error when trying to load libstdc++.so.6.
Error relocating /usr/rx30/musl/lib/libstdc++.so.6: __strftime_l: symbol
not found



On Wed, May 8, 2019 at 12:26 PM John Mudd <johnbmudd@gmail.com> wrote:

> Hi, I'm upgrading my musl from 1.19 to 1.22 but it looks like I lost
> the __strftime_l function. It's present in the 1.19 libc.so but not in 1.22.
>
> $ nm -D /home/mudd/musl-1.1.19.install/lib/libc.so | grep __strftime_l
> 0007b6a0 T __strftime_l
> $ nm -D /home/mudd/musl-1.1.22.install/lib/libc.so | grep __strftime_l
> $
>
>
> Here's the diff on the source code. I can't explain how this diff would
> cause the function to disappear. Any suggestions?
>
> $ diff musl-1.1.19/src/time/strftime.c  /musl-1.1.22/src/time/strftime.c
> 9d8
> < #include "libc.h"
> 12,13d10
> < const char *__nl_langinfo_l(nl_item, locale_t);
> <
> 48,50d44
> < const char *__tm_to_tzname(const struct tm *);
> < size_t __strftime_l(char *restrict, size_t, const char *restrict, const
> struct tm *restrict, locale_t);
> <
> 184,186c178,179
> <               *l = snprintf(*s, sizeof *s, "%+.2d%.2d",
> <                       (tm->__tm_gmtoff)/3600,
> <                       abs(tm->__tm_gmtoff%3600)/60);
> ---
> >               *l = snprintf(*s, sizeof *s, "%+.4ld",
> >                       tm->__tm_gmtoff/3600*100 +
> tm->__tm_gmtoff%3600/60);
> $
>

[-- Attachment #2: Type: text/html, Size: 2744 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: __strftime_l: symbol not found
  2019-05-08 19:54 ` John Mudd
@ 2019-05-08 20:03   ` Szabolcs Nagy
  2019-05-08 20:47     ` Rich Felker
  0 siblings, 1 reply; 5+ messages in thread
From: Szabolcs Nagy @ 2019-05-08 20:03 UTC (permalink / raw)
  To: musl; +Cc: John Mudd

* John Mudd <johnbmudd@gmail.com> [2019-05-08 15:54:35 -0400]:
> Here's more details. I'm trying to load a library that includes some C++
> code. It requires libstdc++.so.6 which is looking for __strftime_l.
> 
> $ nm -D /usr/rx30/musl/lib/libstdc++.so.6 | grep __strftime_l
>          U __strftime_l
> $
> 
> I get the following error when trying to load libstdc++.so.6.
> Error relocating /usr/rx30/musl/lib/libstdc++.so.6: __strftime_l: symbol
> not found

ok in that case this symbol should be kept for glibc abi compat
so it is a real regression.

it seems libstdc++ explicitly declares and uses the __ symbols
on glibc >= 2.2 targets.


> 
> 
> 
> On Wed, May 8, 2019 at 12:26 PM John Mudd <johnbmudd@gmail.com> wrote:
> 
> > Hi, I'm upgrading my musl from 1.19 to 1.22 but it looks like I lost
> > the __strftime_l function. It's present in the 1.19 libc.so but not in 1.22.
> >
> > $ nm -D /home/mudd/musl-1.1.19.install/lib/libc.so | grep __strftime_l
> > 0007b6a0 T __strftime_l
> > $ nm -D /home/mudd/musl-1.1.22.install/lib/libc.so | grep __strftime_l
> > $
> >
> >
> > Here's the diff on the source code. I can't explain how this diff would
> > cause the function to disappear. Any suggestions?
> >
> > $ diff musl-1.1.19/src/time/strftime.c  /musl-1.1.22/src/time/strftime.c
> > 9d8
> > < #include "libc.h"
> > 12,13d10
> > < const char *__nl_langinfo_l(nl_item, locale_t);
> > <
> > 48,50d44
> > < const char *__tm_to_tzname(const struct tm *);
> > < size_t __strftime_l(char *restrict, size_t, const char *restrict, const
> > struct tm *restrict, locale_t);
> > <
> > 184,186c178,179
> > <               *l = snprintf(*s, sizeof *s, "%+.2d%.2d",
> > <                       (tm->__tm_gmtoff)/3600,
> > <                       abs(tm->__tm_gmtoff%3600)/60);
> > ---
> > >               *l = snprintf(*s, sizeof *s, "%+.4ld",
> > >                       tm->__tm_gmtoff/3600*100 +
> > tm->__tm_gmtoff%3600/60);
> > $
> >


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: __strftime_l: symbol not found
  2019-05-08 20:03   ` Szabolcs Nagy
@ 2019-05-08 20:47     ` Rich Felker
  0 siblings, 0 replies; 5+ messages in thread
From: Rich Felker @ 2019-05-08 20:47 UTC (permalink / raw)
  To: musl; +Cc: John Mudd

On Wed, May 08, 2019 at 10:03:39PM +0200, Szabolcs Nagy wrote:
> * John Mudd <johnbmudd@gmail.com> [2019-05-08 15:54:35 -0400]:
> > Here's more details. I'm trying to load a library that includes some C++
> > code. It requires libstdc++.so.6 which is looking for __strftime_l.
> > 
> > $ nm -D /usr/rx30/musl/lib/libstdc++.so.6 | grep __strftime_l
> >          U __strftime_l
> > $
> > 
> > I get the following error when trying to load libstdc++.so.6.
> > Error relocating /usr/rx30/musl/lib/libstdc++.so.6: __strftime_l: symbol
> > not found
> 
> ok in that case this symbol should be kept for glibc abi compat
> so it is a real regression.
> 
> it seems libstdc++ explicitly declares and uses the __ symbols
> on glibc >= 2.2 targets.

Yes, this looks like a glibc-ABI-compat regression. I might have
overlooked some other symbols like this when hiding everything that
was not intended to be public API.

Rich


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-08 20:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 16:26 __strftime_l: symbol not found John Mudd
2019-05-08 18:31 ` Szabolcs Nagy
2019-05-08 19:54 ` John Mudd
2019-05-08 20:03   ` Szabolcs Nagy
2019-05-08 20:47     ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).