Hi,
I am trying to compile devfsd on my system running RedHat linux 7.0
(kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
sure where this symbol is defined. Is there anything that I am missing
on my system.
Also, I applied the devfs patch to the kernel, installed the new
kernel, modified lilo.conf, ran lilo and rebooted the system
with the option "devfs=nomount". The system is able to mount
the root file system in readonly mode. But after that when
it tries to do fsck to the root file system before mounting
it in "rw" mode, it fails. Looks like devfs seems to be
having a problem with my /etc/fstab. My /etc/fstab has device names
specified in the "LABEL=.." format. Does devfs understand LABEL=..
format ?
Any help is appreciated.
-hiren
> I am trying to compile devfsd on my system running RedHat linux 7.0
> (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
> sure where this symbol is defined. Is there anything that I am missing
> on my system.
Sounds like a missing include in the devfsd code. That comes from
dlfcn.h.
Alan
>>>>> "hm" == hiren mehta <[email protected]> writes:
hm> Hi, I am trying to compile devfsd on my system running RedHat
hm> linux 7.0 (kernel 2.2.16-22). I get the error "RTLD_NEXT"
hm> undefined. I am not sure where this symbol is defined. Is there
hm> anything that I am missing on my system.
make CEXTRAS=-D_GNU_SOURCE
is one way to get around this.
>>>>> "hm" == hiren mehta <[email protected]> writes:
hm> Hi, I am trying to compile devfsd on my system running RedHat
hm> linux 7.0 (kernel 2.2.16-22). I get the error "RTLD_NEXT"
hm> undefined. I am not sure where this symbol is defined. Is there
hm> anything that I am missing on my system.
Oh yeah, here's the two other things I forgot.
The install target of the devfsd GNUmakefile attempts to copy the
devfsd.8 man page into /usr/man/man8 which doesn't exist. RH7 has
its man pages in /usr/share/man though you might prefer
/usr/local/man, whatever. I just changed the GNUmakefile.
Also, RH7's /etc/rc.sysinit can already start devfsd automatically
with the following line:
[ -e /dev/.devfsd -a -x /sbin/devfsd ] && /sbin/devfsd /dev
So, all you have to do is create an empty file /dev/.devfsd
Georg Nikodym wrote:
> Also, RH7's /etc/rc.sysinit can already start devfsd
> automatically with the following line:
> [ -e /dev/.devfsd -a -x /sbin/devfsd ] && /sbin/devfsd /dev
If devfs is mounted and devfsd exists, start devfsd.
> So, all you have to do is create an empty file /dev/.devfsd
Not true. I'm pretty sure /dev/.devfsd is only created when you
mount devfs at boot time or via mount -t devfs devfs /dev in
your system initialization script. Creating /dev/.devfsd with
touch defeats the purpose of /etc/rc.sysinit example.
crw------- 1 root root 144, 0 Dec 31 1969 .devfsd
--
Fr?d?ric L. W. Meunier - http://www.pervalidus.net/
0@pervalidus.{net, {dyndns.}org} Tel: 55-21-717-2399 (Niter?i-RJ BR)
On Thu, 1 Feb 2001, Alan Cox wrote:
> > I am trying to compile devfsd on my system running RedHat linux 7.0
> > (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
> > sure where this symbol is defined. Is there anything that I am missing
> > on my system.
>
> Sounds like a missing include in the devfsd code. That comes from
> dlfcn.h.
>
If you add -D_GNU_SOURCE to the make line in CC_OPTS (or CCOPTS, I forget
which) it works fine. Had the same exact problem here.
- Mike
===========================================================================
Michael B. Trausch [email protected]
Avid Linux User since April, '96! AIM: ML100Smkr
Contactable via IRC (DALNet) or AIM as ML100Smkr
===========================================================================
On Thu, 1 Feb 2001 [email protected] wrote:
>
> Hi,
>
> I am trying to compile devfsd on my system running RedHat linux 7.0
> (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
> sure where this symbol is defined. Is there anything that I am missing
> on my system.
>
It's a problem with the makefile -- You need to have -D_GNU_SOURCE (or
#define _GNU_SOURCE as one of the first lines in all the source files of
the package)
- Mike
===========================================================================
Michael B. Trausch [email protected]
Avid Linux User since April, '96! AIM: ML100Smkr
Contactable via IRC (DALNet) or AIM as ML100Smkr
===========================================================================
Georg Nikodym ([email protected]) wrote:
> Also, RH7's /etc/rc.sysinit can already start devfsd automatically
> with the following line:
>
> [ -e /dev/.devfsd -a -x /sbin/devfsd ] && /sbin/devfsd /dev
>
> So, all you have to do is create an empty file /dev/.devfsd
That file is created by devfs itself, and is used for communication
with devfsd. What the check for that file accomplishes is to only
start devfsd if devfs is mounted.
--
<[email protected]> >>>>>>> >>>>>> >>>>> >>>> >>> >> >
< << <<< This used to be real-estate,
now it's only fields and trees. >>>> >>> >> >
>>>>> "M" == Meunier <iso-8859-1> writes:
M> Not true. I'm pretty sure /dev/.devfsd is only created when you
M> mount devfs at boot time or via mount -t devfs devfs /dev in your
M> system initialization script. Creating /dev/.devfsd with touch
M> defeats the purpose of /etc/rc.sysinit example.
Right you are. I looked at all this stuff _before_ I had devfs
mounted. It never occured to me that "-e /dev/.devfsd" had a
connotation.
>> I am trying to compile devfsd on my system running RedHat linux 7.0
>> (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
>> sure where this symbol is defined. Is there anything that I am missing
>> on my system.
>
>
>Sounds like a missing include in the devfsd code. That comes from
>dlfcn.h.
Following small patch fixes this and workarounds devfs related problem
which appeared in 2.4.0-test12-pre8:
when I'm logging out, devfsd tries to state /dev/vcc/[1-6] but sometimes
fails perhaps due to some race in kernel. As result devfsd quits with
error message. Retrying to state node suceeds on next attempt.
I don't know why it happens, but I guess it's related to
change in drivers/char/tty_io.c between test12-pre7 and pre8
(change to use flush_scheduled_tasks())
Hint: it seems to be easier to reproduce on slower machine (it happens seldom
on PIII-700, but very often on P200MMX)
Andris
--- devfsd/devfsd.c~1 Mon Jul 3 22:43:07 2000
+++ devfsd/devfsd.c Fri Jan 12 13:19:33 2001
@@ -189,6 +189,7 @@
#include <signal.h>
#include <regex.h>
#include <errno.h>
+#define __USE_GNU
#include <dlfcn.h>
#include <rpcsvc/ypclnt.h>
#include <rpcsvc/yp_prot.h>
@@ -918,15 +919,29 @@
[RETURNS] Nothing.
*/
{
+ int tries=0;
mode_t new_mode;
struct stat statbuf;
+Retry:
if (lstat (info->devname, &statbuf) != 0)
{
- SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
- info->devname, ERRSTRING);
- SYSLOG (LOG_ERR, "exiting\n");
- exit (1);
+ if (tries<10)
+ {
+ tries++;
+ SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
+ info->devname, ERRSTRING);
+ SYSLOG (LOG_ERR, "retrying (attempt %d) ...\n",tries);
+ usleep (1000); /* Let's sleep a bit */
+ goto Retry;
+ }
+ else
+ {
+ SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
+ info->devname, ERRSTRING);
+ SYSLOG (LOG_ERR, "exiting\n");
+ exit (1);
+ }
}
new_mode = (statbuf.st_mode & S_IFMT) |
(entry->u.permissions.mode & ~S_IFMT);