Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 21 May 2015 17:36:46 -0400
From: John Mudd <johnbmudd@...il.com>
To: musl <musl@...ts.openwall.com>, John Mudd <johnbmudd@...il.com>
Subject: Re: Re: musl xclock?

On Wed, May 20, 2015 at 5:48 PM, Szabolcs Nagy <nsz@...t70.net> wrote:

> * Szabolcs Nagy <nsz@...t70.net> [2015-05-20 23:08:02 +0200]:
> > * John Mudd <johnbmudd@...il.com> [2015-05-20 16:47:45 -0400]:
> > >
> > > It listed this:
> > >
> > > libz.so.1 needed by /home/mudd/musl/libXft-2.3.2.install/lib/libXft.so
> > > found libz.so.1 at //lib/i386-linux-gnu/libz.so.1
> > > libc.so.6 needed by //lib/i386-linux-gnu/libz.so.1
> > >
> >
> > ok so you probably forgot to add libz to the -L path
> > and then ld went ahead and found the wrong one
> >
>
> i think -L probably wont help: libz is an indirect dependency
> not listed as -lz on the ld commandline
>
> in that case ld searches different set of paths
> you may want to set LD_LIBRARY_PATH or use -Wl,-rpath-link
>
>
I see, so the -L options work for libs specified by -l options but not
indirect libs like libz. Strange. So I added -lz to my collect2 command and
that much works now. I got an xclock executable but... it goes into an
infinite loop when I try to run it.

At least I got past the linker error. Thanks!

Here's what strace shows and then it pauses (while still using 100% CPU)
for about 20 secs.

...
open("/usr/share/fonts/X11/Type1",
O_RDONLY|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 5
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
getdents64(5, /* 23 entries */, 2048)   = 728
getdents64(5, /* 0 entries */, 2048)    = 0
stat64("/usr/share/fonts/X11/Type1/Symbol.afm", {st_mode=S_IFREG|0644,
st_size=9532, ...}) = 0
brk(0x9680000)                          = 0x9680000
open("/usr/share/fonts/X11/Type1/Symbol.afm", O_RDONLY|O_LARGEFILE) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=9532, ...}) = 0
mmap2(NULL, 9532, PROT_READ, MAP_PRIVATE, 6, 0) = 0xb714a000
close(6)                                = 0
mmap2(NULL, 143360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0xb7127000
munmap(0xb7127000, 143360)              = 0
open("/usr/share/fonts/X11/Type1/._Symbol.afm", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
open("/usr/share/fonts/X11/Type1/%Symbol.afm", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
open("/usr/share/fonts/X11/Type1/.AppleDouble/Symbol.afm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/fonts/X11/Type1/Symbol.afm/..namedfork/rsrc",
O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
open("/usr/share/fonts/X11/Type1/Symbol.afm/rsrc", O_RDONLY|O_LARGEFILE) =
-1 ENOTDIR (Not a directory)
open("/usr/share/fonts/X11/Type1/resource.frk/Symbol.afm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/fonts/X11/Type1/.resource/Symbol.afm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
munmap(0xb714a000, 9532)                = 0
stat64("/usr/share/fonts/X11/Type1/Symbol.pfb", {st_mode=S_IFREG|0644,
st_size=37744, ...}) = 0
open("/usr/share/fonts/X11/Type1/Symbol.pfb", O_RDONLY|O_LARGEFILE) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=37744, ...}) = 0
mmap2(NULL, 37744, PROT_READ, MAP_PRIVATE, 6, 0) = 0xb7143000
close(6)                                = 0
brk(0x9688000)                          = 0x9688000
brk(0x968a000)                          = 0x968a000
brk(0x968e000)                          = 0x968e000
brk(0x9693000)                          = 0x9693000


then this much more after 20 secs pause:

munmap(0xb7143000, 37744)               = 0
stat64("/usr/share/fonts/X11/Type1/c0419bt_.afm", {st_mode=S_IFREG|0644,
st_size=15395, ...}) = 0
open("/usr/share/fonts/X11/Type1/c0419bt_.afm", O_RDONLY|O_LARGEFILE) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=15395, ...}) = 0
mmap2(NULL, 15395, PROT_READ, MAP_PRIVATE, 6, 0) = 0xb7149000
close(6)                                = 0
mmap2(NULL, 143360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0xb7126000
munmap(0xb7126000, 143360)              = 0
open("/usr/share/fonts/X11/Type1/._c0419bt_.afm", O_RDONLY|O_LARGEFILE) =
-1 ENOENT (No such file or directory)
open("/usr/share/fonts/X11/Type1/%c0419bt_.afm", O_RDONLY|O_LARGEFILE) = -1
ENOENT (No such file or directory)
open("/usr/share/fonts/X11/Type1/.AppleDouble/c0419bt_.afm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/fonts/X11/Type1/c0419bt_.afm/..namedfork/rsrc",
O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)
open("/usr/share/fonts/X11/Type1/c0419bt_.afm/rsrc", O_RDONLY|O_LARGEFILE)
= -1 ENOTDIR (Not a directory)
open("/usr/share/fonts/X11/Type1/resource.frk/c0419bt_.afm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/fonts/X11/Type1/.resource/c0419bt_.afm",
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
munmap(0xb7149000, 15395)               = 0
stat64("/usr/share/fonts/X11/Type1/c0419bt_.pfb", {st_mode=S_IFREG|0644,
st_size=40766, ...}) = 0
open("/usr/share/fonts/X11/Type1/c0419bt_.pfb", O_RDONLY|O_LARGEFILE) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=40766, ...}) = 0
mmap2(NULL, 40766, PROT_READ, MAP_PRIVATE, 6, 0) = 0xb7143000
close(6)                                = 0
brk(0x9698000)                          = 0x9698000


repeating indefinitely...

Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.