Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Several issues by a buildroot newbie...
@ 2007-10-03 22:32 Karl Auerbach
  2007-10-03 23:55 ` [Buildroot] GDB for threads Leonid
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Karl Auerbach @ 2007-10-03 22:32 UTC (permalink / raw)
  To: buildroot

I'm fairly new to buildroot so please excuse me if I inadvertently touch 
something that has been raised previously:

1. Undefined reference in uClibc:
    In function `__libc_pthread_init':
    libc_pthread_init.c:(.text+0xf): undefined reference to
    `__libc_multiple_threads'

    I dug through the code and it appears that the missing variable is 
used as a return value for __libc_pthread_init() but that that return 
value appears to be squirreled away and perhaps never used.

   In any event, this is, I suspect the cause of the next item, below.

2. Python segfaults when being loaded.  For various reasons I'm very 
suspicions that the uClibc dynamic library loader is segfaulting.  I've 
tried to build a static image of Python but I can't because of the 
unresolved in the prior item.

I had a similar problem with sudo and all the openssh tools with the 
stable version of uClibc.  The segfaulting of those, but not of Python, 
went away with the snapshot version of uClibc.

   Python did compile and run quite nicely on my year old snapshot of 
buildroot, but it's effectively dead now.

3. The sudo sources aren't available via the URL given in the 
package/sudo/sudo.mk.  The site, http://www.courtesan.com/sudo/dist, has 
upgraded to a newer version and the older one to be downloaded appears 
no longer on that site.

4. The lockfile-progs.c (in package lockfile-progs) uses rindex() but 
does not include the correct header file that defines it.  This can be 
repaired by a patch that either changes rindex() to strrchr() or 
including the correct header.  (I did the former.)

		--karl--

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

* [Buildroot] GDB for threads.
  2007-10-03 22:32 [Buildroot] Several issues by a buildroot newbie Karl Auerbach
@ 2007-10-03 23:55 ` Leonid
  2007-10-09 17:51   ` Rex Ashbaugh
  2007-10-04  4:14 ` [Buildroot] Several issues by a buildroot newbie Ulf Samuelsson
  2007-10-07 16:35 ` Bernhard Fischer
  2 siblings, 1 reply; 8+ messages in thread
From: Leonid @ 2007-10-03 23:55 UTC (permalink / raw)
  To: buildroot

Hi:

GDB on my target says it cannot debug threads:

dlopen failed on 'libthread_db.so.1' - File not found
GDB will not be able to debug pthreads.

GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "arm-linux".
(gdb)

I have chosen thread library debugging option and have re-built
toolchain:

Toolchain Options -->
  [x] Thread library debugging
 
The build went through but as a result I see broken link in the lib
directory of my toolchain and no real library:

rwxr-xr-x  1 leonid leonid   26330 2007-10-03 14:27 libssp.so.0.0.0
lrwxrwxrwx  1 leonid leonid      17 2007-10-03 14:24 libthread_db.so ->
libthread_db.so.1
-rw-r--r--  1 leonid leonid  309856 2007-10-03 14:24 libuClibc-0.9.29.so
-rw-r--r--  1 leonid leonid    4656 2007-10-03 14:24 libutil-0.9.29.so
-

Thanks,

Leonid.

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

* [Buildroot] Several issues by a buildroot newbie...
  2007-10-03 22:32 [Buildroot] Several issues by a buildroot newbie Karl Auerbach
  2007-10-03 23:55 ` [Buildroot] GDB for threads Leonid
@ 2007-10-04  4:14 ` Ulf Samuelsson
  2007-10-07 16:30   ` Bernhard Fischer
  2007-10-07 16:35 ` Bernhard Fischer
  2 siblings, 1 reply; 8+ messages in thread
From: Ulf Samuelsson @ 2007-10-04  4:14 UTC (permalink / raw)
  To: buildroot

----- Original Message ----- 
From: "Karl Auerbach" <karl@cavebear.com>
To: <buildroot@uclibc.org>
Sent: Thursday, October 04, 2007 12:32 AM
Subject: [Buildroot] Several issues by a buildroot newbie...


> I'm fairly new to buildroot so please excuse me if I inadvertently touch 
> something that has been raised previously:
> 
> 1. Undefined reference in uClibc:
>    In function `__libc_pthread_init':
>    libc_pthread_init.c:(.text+0xf): undefined reference to
>    `__libc_multiple_threads'
> 
>    I dug through the code and it appears that the missing variable is 
> used as a return value for __libc_pthread_init() but that that return 
> value appears to be squirreled away and perhaps never used.
> 
>   In any event, this is, I suspect the cause of the next item, below.
> 
> 2. Python segfaults when being loaded.  For various reasons I'm very 
> suspicions that the uClibc dynamic library loader is segfaulting.  I've 
> tried to build a static image of Python but I can't because of the 
> unresolved in the prior item.
> 
> I had a similar problem with sudo and all the openssh tools with the 
> stable version of uClibc.  The segfaulting of those, but not of Python, 
> went away with the snapshot version of uClibc.
> 
>   Python did compile and run quite nicely on my year old snapshot of 
> buildroot, but it's effectively dead now.
> 
> 3. The sudo sources aren't available via the URL given in the 
> package/sudo/sudo.mk.  The site, http://www.courtesan.com/sudo/dist, has 
> upgraded to a newer version and the older one to be downloaded appears 
> no longer on that site.
> 
> 4. The lockfile-progs.c (in package lockfile-progs) uses rindex() but 
> does not include the correct header file that defines it.  This can be 
> repaired by a patch that either changes rindex() to strrchr() or 
> including the correct header.  (I did the former.)
> 

uClibc supports rindex if either of 
* UCLIBC_SUSV3_LEGACY or 
* UCLIBC_SYSV3_LEGACY MACROS 
is defined. 
Previously UCLIBC_SUSV3_LEGACY_MACROS was defined,
but Bernhard wants to get rid of all legacy stuff, and his idea to achieve
this it is by intentionally breaking the build if you enable a package 
containing SUSV3_LEGACY stuff.

> --karl--
> 
> 
BR
Ulf Samuelsson

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

* [Buildroot] Several issues by a buildroot newbie...
  2007-10-04  4:14 ` [Buildroot] Several issues by a buildroot newbie Ulf Samuelsson
@ 2007-10-07 16:30   ` Bernhard Fischer
  2007-10-07 18:04     ` Ulf Samuelsson
  0 siblings, 1 reply; 8+ messages in thread
From: Bernhard Fischer @ 2007-10-07 16:30 UTC (permalink / raw)
  To: buildroot

On Thu, Oct 04, 2007 at 06:14:47AM +0200, Ulf Samuelsson wrote:

>uClibc supports rindex if either of 
>* UCLIBC_SUSV3_LEGACY or 
>* UCLIBC_SYSV3_LEGACY MACROS 
>is defined. 
>Previously UCLIBC_SUSV3_LEGACY_MACROS was defined,
>but Bernhard wants to get rid of all legacy stuff, and his idea to achieve

Ulf, go read docs/README and read the helptext of BR2_UCLIBC_CONFIG

Heck, do
$ make help
and read the helptext there (and document your make-targets while you're
at it. Undocumented targets will be removed).

>this it is by intentionally breaking the build if you enable a package 
>containing SUSV3_LEGACY stuff.

"Mum, XYZ is intentionally broken because it's not on per default".
Yeah, right. Whatever.

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

* [Buildroot] Several issues by a buildroot newbie...
  2007-10-03 22:32 [Buildroot] Several issues by a buildroot newbie Karl Auerbach
  2007-10-03 23:55 ` [Buildroot] GDB for threads Leonid
  2007-10-04  4:14 ` [Buildroot] Several issues by a buildroot newbie Ulf Samuelsson
@ 2007-10-07 16:35 ` Bernhard Fischer
  2007-10-07 19:19   ` Karl Auerbach
  2 siblings, 1 reply; 8+ messages in thread
From: Bernhard Fischer @ 2007-10-07 16:35 UTC (permalink / raw)
  To: buildroot

On Wed, Oct 03, 2007 at 03:32:13PM -0700, Karl Auerbach wrote:
>I'm fairly new to buildroot so please excuse me if I inadvertently touch 
>something that has been raised previously:
>
>1. Undefined reference in uClibc:
>    In function `__libc_pthread_init':
>    libc_pthread_init.c:(.text+0xf): undefined reference to
>    `__libc_multiple_threads'

Which version of pthreads do you use?
>
>    I dug through the code and it appears that the missing variable is 
>used as a return value for __libc_pthread_init() but that that return 
>value appears to be squirreled away and perhaps never used.
>
>   In any event, this is, I suspect the cause of the next item, below.
[snip python]

>3. The sudo sources aren't available via the URL given in the 
>package/sudo/sudo.mk.  The site, http://www.courtesan.com/sudo/dist, has 
>upgraded to a newer version and the older one to be downloaded appears 
>no longer on that site.

It should be updated, yes. Please submit a tested patch. TIA.
>
>4. The lockfile-progs.c (in package lockfile-progs) uses rindex() but 
>does not include the correct header file that defines it.  This can be 
>repaired by a patch that either changes rindex() to strrchr() or 
>including the correct header.  (I did the former.)

Please submit a patch to use strrchr.

thanks,

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

* [Buildroot] Several issues by a buildroot newbie...
  2007-10-07 16:30   ` Bernhard Fischer
@ 2007-10-07 18:04     ` Ulf Samuelsson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Samuelsson @ 2007-10-07 18:04 UTC (permalink / raw)
  To: buildroot

s?n 2007-10-07 klockan 18:30 +0200 skrev Bernhard Fischer:
> On Thu, Oct 04, 2007 at 06:14:47AM +0200, Ulf Samuelsson wrote:
> 
> >uClibc supports rindex if either of 
> >* UCLIBC_SUSV3_LEGACY or 
> >* UCLIBC_SYSV3_LEGACY MACROS 
> >is defined. 
> >Previously UCLIBC_SUSV3_LEGACY_MACROS was defined,
> >but Bernhard wants to get rid of all legacy stuff, and his idea to achieve
> 
> Ulf, go read docs/README and read the helptext of BR2_UCLIBC_CONFIG
> 
> Heck, do
> $ make help
> and read the helptext there (and document your make-targets while you're
> at it. Undocumented targets will be removed).
> 
> >this it is by intentionally breaking the build if you enable a package 
> >containing SUSV3_LEGACY stuff.
> 
> "Mum, XYZ is intentionally broken because it's not on per default".
> Yeah, right. Whatever.

I am well aware that you can create your own configuration.

It was on before, allowing packages to build.
You changed that to off.
You did that change to make sure something happen.
I cannot think of any other think, than you *INTENTIONALLY*
wanted the *default* operation of buildroot was to break all 
the build of all packages which contained LEGACY stuff.

The fact that it is possible to configure buildroot
to fix this, does not change the default operation.

If that was not your intention, then what ?

BR
Ulf

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

* [Buildroot] Several issues by a buildroot newbie...
  2007-10-07 16:35 ` Bernhard Fischer
@ 2007-10-07 19:19   ` Karl Auerbach
  0 siblings, 0 replies; 8+ messages in thread
From: Karl Auerbach @ 2007-10-07 19:19 UTC (permalink / raw)
  To: buildroot

Bernhard Fischer wrote:
> On Wed, Oct 03, 2007 at 03:32:13PM -0700, Karl Auerbach wrote:
>> I'm fairly new to buildroot so please excuse me if I inadvertently touch 
>> something that has been raised previously:
>>
>> 1. Undefined reference in uClibc:
>>    In function `__libc_pthread_init':
>>    libc_pthread_init.c:(.text+0xf): undefined reference to
>>    `__libc_multiple_threads'
> 
> Which version of pthreads do you use?

I've used uClibc-0.9.29.tar.bz2 and also the uClibc snapshot (from Oct 
2.)  Is that what you are asking for?

Both versions gave the same problem with Python, but the snapshot 
version fixed similar problems with sudo and the ssh family of executables.

>> 3. The sudo sources aren't available via the URL given in the 
>> package/sudo/sudo.mk.  The site, http://www.courtesan.com/sudo/dist, has 
>> upgraded to a newer version and the older one to be downloaded appears 
>> no longer on that site.
> 
> It should be updated, yes. Please submit a tested patch. TIA.

Hmmm, I just scrounged around and manually downloaded the old version 
from somewhere.

I'm not at all sure that I'm ready, much less sufficiently experienced 
in the buildroot world, to advance the patches and stuff for sudo to the 
current version from the www.courtesan.com site.

>> 4. The lockfile-progs.c (in package lockfile-progs) uses rindex() but 
>> does not include the correct header file that defines it.  This can be 
>> repaired by a patch that either changes rindex() to strrchr() or 
>> including the correct header.  (I did the former.)
> 
> Please submit a patch to use strrchr.

Here's what I've been using, assuming that email doesn't word wrap it 
into oblivion:

karl at klack(24): cat lockfile-progs-iwl-alix.patch
--- lockfile-progs-0.1.10/lockfile-progs.c      2001-07-17 
10:40:06.000000000 -0700
+++ lfp/lockfile-progs.c     2007-09-25 14:41:22.000000000 -0700
@@ -70,7 +70,7 @@
      { NULL, 0, NULL, 0 }
    };

-  char *cmd_name = rindex(argv[0], '/');
+  char *cmd_name = strrchr(argv[0], '/');
    int mail_cmd_p = 0;

    if(cmd_name != NULL) {

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

* [Buildroot] GDB for threads.
  2007-10-03 23:55 ` [Buildroot] GDB for threads Leonid
@ 2007-10-09 17:51   ` Rex Ashbaugh
  0 siblings, 0 replies; 8+ messages in thread
From: Rex Ashbaugh @ 2007-10-09 17:51 UTC (permalink / raw)
  To: buildroot

You need to enable in your buildroot config the feature for building the
thread library.
-Rex

On 10/3/07, Leonid <Leonid@a-k-a.net> wrote:
>
> Hi:
>
> GDB on my target says it cannot debug threads:
>
> dlopen failed on 'libthread_db.so.1' - File not found
> GDB will not be able to debug pthreads.
>
> GNU gdb 6.3
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "arm-linux".
> (gdb)
>
> I have chosen thread library debugging option and have re-built
> toolchain:
>
> Toolchain Options -->
>   [x] Thread library debugging
>
> The build went through but as a result I see broken link in the lib
> directory of my toolchain and no real library:
>
> rwxr-xr-x  1 leonid leonid   26330 2007-10-03 14:27 libssp.so.0.0.0
> lrwxrwxrwx  1 leonid leonid      17 2007-10-03 14:24 libthread_db.so ->
> libthread_db.so.1
> -rw-r--r--  1 leonid leonid  309856 2007-10-03 14:24 libuClibc-0.9.29.so
> -rw-r--r--  1 leonid leonid    4656 2007-10-03 14:24 libutil-0.9.29.so
> -
>
> Thanks,
>
> Leonid.
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20071009/7220f71b/attachment.htm 

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

end of thread, other threads:[~2007-10-09 17:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03 22:32 [Buildroot] Several issues by a buildroot newbie Karl Auerbach
2007-10-03 23:55 ` [Buildroot] GDB for threads Leonid
2007-10-09 17:51   ` Rex Ashbaugh
2007-10-04  4:14 ` [Buildroot] Several issues by a buildroot newbie Ulf Samuelsson
2007-10-07 16:30   ` Bernhard Fischer
2007-10-07 18:04     ` Ulf Samuelsson
2007-10-07 16:35 ` Bernhard Fischer
2007-10-07 19:19   ` Karl Auerbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox