Skip to contentSkip to conversation

Several issues by a buildroot newbie...

Buildroot Karl Auerbach 5 participants 8 messages Oct 3, 2007 – Oct 9, 2007

lore
Share & tools
lore
#0 lore raw

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--
#1 lore raw

[Buildroot] GDB for threads.

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.

#3 lore raw
In reply to Karl Auerbach

----- Original Message -----
From: "Karl Auerbach" <[email protected]>
To: <[email protected]>
Sent: Thursday, October 04, 2007 12:32 AM
Subject: [Buildroot] Several issues by a buildroot newbie...

Quoted 31 lines

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.

Quoted 5 lines

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.

Quoted 3 lines

--karl--

BR
Ulf Samuelsson

#4 lore raw
Quoted 6 lines · Ulf Samuelsson

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).
Quoted 2 lines

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.

#6 lore raw
In reply to Karl Auerbach
Quoted 7 lines · Karl Auerbach

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?

Quoted 6 lines

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]

Quoted 4 lines

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.

Quoted 5 lines

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,

#5 lore raw
In reply to Bernhard Fischer

s?n 2007-10-07 klockan 18:30 +0200 skrev Bernhard Fischer:

Quoted 16 lines · Ulf Samuelsson
Quoted 7 lines

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).
Quoted 5 lines
Quoted 2 lines

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

#7 lore raw
In reply to Bernhard Fischer
Quoted 10 lines · Bernhard Fischer
Quoted 7 lines · Karl Auerbach

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.

Quoted 6 lines
Quoted 4 lines

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.

Quoted 6 lines
Quoted 4 lines

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) {
#2 lore raw

[Buildroot] GDB for threads.

In reply to Leonid

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

Quoted 36 lines · Leonid

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

(quoted diff) +0 -3
-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
-
Quoted 8 lines

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