Linux-Development-Sys Digest #551, Volume #6     Tue, 30 Mar 99 15:14:32 EST

Contents:
  Briding in 2.2.x - br_tx_frame() not called (Brian McCauley)
  Re: Problem with c++ and glib-2.1.1 (Thorsten Kukuk)
  Re: Programming tools for Linux/Unix: Editor, IDE, Frontend to GCC. (David T. Blake)
  Re: gnome won't start (David T. Blake)
  Seeking on large block devices (Brad Dietrich)
  Re: linux on PC/104-modules ("Eric Cooper")
  Mandatory locking.... Where are you??? (Peter Kovacs)
  Re: Debugging question. (Modemch)
  Re: Devloping Linux apps on NT? (Adam P. Jenkins)
  Re: Devloping Linux apps on NT? (Adam P. Jenkins)
  Re: how to load ram disk from LILO? (Brian McCauley)
  Re: clone() or PThreads ??? (satish reddy natla)

----------------------------------------------------------------------------

From: Brian McCauley <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.networking
Subject: Briding in 2.2.x - br_tx_frame() not called
Date: 30 Mar 1999 12:59:50 +0100

It would appear that br_tx_frame() is never called in 2.2.x.#

This has the effect that packets transmitted from higher protocol
levels are transmitted without consideration being given to bridging.

In 2.0.x br_tx_frame() was called in do_dev_xmit_queue() but in 2.2.x
do_dev_xmit_queue() does not exist.

The obvious thing to do is to simply insert the chunk of code that was
in do_dev_xmit_queue() into dev_xmit_queue().

Can anyone who understands this stuff better than I please comment on
this?

--- linux-2.2.5/net/core/dev.c.orig     Tue Mar 30 12:49:38 1999
+++ linux-2.2.5/net/core/dev.c  Tue Mar 30 12:50:17 1999
@@ -578,6 +578,19 @@
        struct device *dev = skb->dev;
        struct Qdisc  *q;
 
+       /*
+        *      If we are bridging and this is directly generated output
+        *      pass the frame via the bridge.
+        */
+
+#ifdef CONFIG_BRIDGE
+       if(skb->pkt_bridged!=IS_BRIDGED && br_stats.flags & BR_UP)
+       {
+               if(br_tx_frame(skb))
+                       return 0;
+       }
+#endif
+
 #ifdef CONFIG_NET_PROFILE
        start_bh_atomic();
        NET_PROFILE_ENTER(dev_queue_xmit);


-- 
     \\   ( )  No male bovine  | Email: [EMAIL PROTECTED]
  .  _\\__[oo   faeces from    | Phones: +44 121 471 3789 (home)
 .__/  \\ /\@  /~)  /~[   /\/[ |   +44 121 627 2173 (voice) 2175 (fax)
 .  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
  # ll  l\\  ~~~~ ~   ~ ~    ~ | http://www.wcl.bham.ac.uk/~bam/
 ###LL  LL\\ (Brian McCauley)  |

------------------------------

From: Thorsten Kukuk <[EMAIL PROTECTED]>
Subject: Re: Problem with c++ and glib-2.1.1
Date: 30 Mar 1999 11:34:19 GMT

Andreas Jusek <[EMAIL PROTECTED]> wrote:
> Hallo all,

> I just tried to upgrade to glibc-2.1.1 (from glibc-2.0.7) on my RedHat-5.2-box. 
> I am currently using egcs-1.1.2. Since the upgrade even the HalloWords.cpp 
> crashes with a segmentation fault. What can I do against this?

Recompile egcs and libstdc++ against glibc 2.1.1.

  Thorsten
-- 
Thorsten Kukuk      http://www.suse.de/~kukuk/        [EMAIL PROTECTED]
SuSE GmbH           Schanzaeckerstr. 10             90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.

------------------------------

From: [EMAIL PROTECTED] (David T. Blake)
Crossposted-To: 
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.help,comp.unix.programmer
Subject: Re: Programming tools for Linux/Unix: Editor, IDE, Frontend to GCC.
Date: 30 Mar 1999 07:48:43 -0800

[EMAIL PROTECTED] (Houben S.H.M.J.) writes:

>[EMAIL PROTECTED] (Sam Holden) writes:
>> Klaus Schilling <[EMAIL PROTECTED]> wrote:

>> >Ouch! *duck* and what editor was he implicitly talking about all
>> the time?
 
>> Can't remember sorry, some editor that comes with redhat but is
>> statically linked against motif (or a clone). 

>He was talking about Nedit.

>Which isn't really such a bad editor. Actually, it is far superior to
>many editors I have seen under Windoze.

>B.t.w., Nedit doesn't *have* to be statically linked against Motif,
>the only problem is that you need to pay for Motif if you want a
>dynamically linked version. I have tried a Lesstif-linked version,
>but that was still a bit buggy.

>After that, I discovered XEmacs, and now I don't need it(=Nedit)
>anymore;-)

I had other problems with nedit than it being staticly linked 
against motif. That in and of itself is a pain if you use
multiple windows. Emacs uses frames instead, so wouldn't
suffer from the same problem (reloading the static library).

Nedit uses standard windows key bindings for things like
save and quit and copy (Ctrl-S, Ctrl-Q, Ctrl-C). These things
have entirely different meanings in an xterm, which I find a 
royal pain. The syntax highlighting can drive you nuts too - try
opening a laTeX file for a 20 page paper and making a single
double quote or curly brace. The editor practically locks up as
it highlights the rest of the file before it lets you finish the quote
or curly brace, and then it locks the editor again undoing the 
syntax highlighting it just did. Why it feels the need to highlight
syntax outside the visible window is beyond me.

Emacs uses keybindings that are consistent with bash (actually
the logic goes the other direction). It has frames. You can
compile and debug interactively. The syntax highlighting is more
sane. It is dynamicly linked on linux. It has a lisp interpreter
and can make coffee.

That being said - I generally point UNIX newbies at nedit.

-- 
Dave Blake
[EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (David T. Blake)
Subject: Re: gnome won't start
Date: 30 Mar 1999 07:51:45 -0800

Mark Leung <[EMAIL PROTECTED]> writes:

>Hi,
>Recently I removed my old version of GTK+ and installed a new version, 
>GTK+ 1.2.0. Now Gnome will not start. Here is the error message:
>gnome-session: error in loading shared libraries
>libgtk-1.1.so.2: cannot open shared object file: no such file or directory
>
>I assume that it can't find my new GTK+. What can I do?

Try
su
/sbin/ldconfig
exit

Then crank up gnome.

If that doesn't work, check /etc/ld.so.conf (see man ld.so)
If that doesn't work, make an explicit link between the
gtk shared object library and the latest dynamic object
file for gtk (and the same for gdk).

Then put your hands over your ears and hope for the best.

-- 
Dave Blake
[EMAIL PROTECTED]

------------------------------

From: Brad Dietrich <[EMAIL PROTECTED]>
Subject: Seeking on large block devices
Date: Tue, 30 Mar 1999 12:31:00 -0500

Thanks to all of the help on structure padding.  It was greatly
beneficial.  Unfortunatly, now I am running into another problem.  I
have a large block device (SCSI hard drive ~ 34 GB) that I need to read
data from and can't mount. (It is a Macintosh HFS Plus Filesystem, and I
couldn't find any extensions to the HFS filesystem tools that I did find
on the internet).  I got the extraction program working successfully,
but I am running into seeking problems on the block device.  I had
started by using fseek after fopening the block device file, but
realized that I am going to run into the 2 GB offset limit on the signed
offset parameter to fseek.  Can someone offer another alternative to
seeking to points on the block device?  I will always want to be reading
multiples of SCSI 512kb blocks, so I just need to seek to a SCSI block
number really.

Thanks for any help,

-Brad



------------------------------

From: "Eric Cooper" <[EMAIL PROTECTED]>
Subject: Re: linux on PC/104-modules
Date: Tue, 30 Mar 1999 12:05:48 -0500

Check out
http://www.esrf.fr/computing/cs/sysadmin/rtk/pc104project/howto/linux/

Holger Blinzinger wrote in message
<[EMAIL PROTECTED]>...
>Anyone here who tried installing linux on a PC/104-module?
>I'm planning on booting from a flash disk. What do I have to pay
>attention to?
>What about Kernel-modifications?




------------------------------

From: Peter Kovacs <[EMAIL PROTECTED]>
Subject: Mandatory locking.... Where are you???
Date: Tue, 30 Mar 1999 19:26:44 +0200

I seem to remember that the code for testing the availibilty of mandatory locking in 
Richard Stevens' Advanced Programming in a Unix Environment used to show that linux 
had this capability. Now, it
seems to have gone. The essential part of the code is below. So is mandatary locking 
available?? (Was it available ever? or my memory betrays me?)

Peter

    TELL_CHILD(pid);

    if (waitpid(pid, NULL, 0) < 0)
      err_sys("waitpid error");

    sleep (10) ;

  } else {
    WAIT_PARENT();

    set_fl(fd, O_NONBLOCK);

    /* first let's see what error we get if region is locked */

    if (read_lock(fd, 0, SEEK_SET, 0) != -1)        /* no wait */
      err_sys("child: read_lock succeeded");
    printf("read_lock of already-locked region returns %d\n", errno);

    /* now try to read the mandatory locked file */
    if (lseek(fd, 0, SEEK_SET) == 1)
      err_sys("lseek error");
    if (read(fd, buff, 2) < 0)
      err_ret("read failed (mandatory locking works)");
    else
      printf("read OK (no mandatory locking), buff = %2.2s\n", buff);
  }
  exit(0);
}



------------------------------

From: Modemch <[EMAIL PROTECTED]>
Subject: Re: Debugging question.
Date: 30 Mar 1999 13:51:54 +0100

[EMAIL PROTECTED] (Adam P. Jenkins) writes:

> I've tried using the watch/awatch/rwatch commands in gdb before and
> they didn't seem to work as described.  Maybe I just don't understand
> what they're supposed to do.  Has anyone on here used them?
> 
> For example: the help for awatch says, 
> 
> (gdb) help awatch
> Set a watchpoint for an expression.
> A watchpoint stops execution of your program whenever the value of
> an expression is either read or written.
> 
> So, I tried setting a awatch on i in the program below, expecting the
> debugger to stop when ever i was read or written.  Below is the
> program, and the gdb transcript.
> 
> int main() {
>    int i = 0;
>    i++;       /* line 3 */
>    return i;  /* line 4 */
> }
> 
> (gdb) break main
> Breakpoint 1 at 0x8048542: file tmp.c, line 2.
> (gdb) run
> Starting program: /home/ajenkins/tmp/a.out 
> 
> Breakpoint 1, main () at tmp.c:2
> 2          int i = 0;
> (gdb) awatch i
> Hardware access(read/write) watchpoint 2: i
> (gdb) continue
> Continuing.
> Hardware watchpoint 2 deleted because the program has left the block in
> which its expression is valid.
> 
> Program exited with code 01.
> (gdb) 
> 
> I would have thought that the awatch would cause the debugger to stop
> at line 3 when i got modified, and at line 4, when i was read.  Isn't
> that what's meant by "whenever the value of an expression is read or
> written"?  Instead the debugger just ran right through main.
> 
> Can anyone comment on this?  Is this a bug, or a misunderstanding
> about what awatch is supposed to do?

Well, I've figured this out - watch/awatch/etc work if you set it to an
_address_ instead of a variable name.  Like, for example, if you were to do 
a "print &i" in gdb, and then set "watch *(int *) 0xblahblah" - I believe
it would work.  It worked with watch, I've tested it.  The thing is that it 
becomes really slow, so I'm wondering whether it's using any hardware
assistance at all.  Or maybe I just can't understand the manual.. :)

--
Regards, 
Modemch

------------------------------

Subject: Re: Devloping Linux apps on NT?
From: [EMAIL PROTECTED] (Adam P. Jenkins)
Date: 25 Mar 1999 22:44:09 -0500

r d t@c s.q u e e n s u.c a (Bob Tennent) writes:
> On Thu, 25 Mar 1999 17:21:43 -0600, Bill Zimmerly wrote:
>  >> Without sounding like treason can anyone provide any useful advice on how
>  >i
>  >> can go about developing linux apps on a NT workstation?
>  >
>  >Sure, a few tips...
>  >
>  >[Sarcastic Mode On]
>  >
>  >Put a linux box right next to it on the hub and use NT's "Telnet" program!
>  >
>  >[Sarcastic Mode Off]
>  >
> I hope the telnet program on NT is better than the junk they supply on
> Windows 95.  They can't even get telnet right.  

It's not, it's the same piece of cr*p as on 95.  You can get a much
better telnet program from http://www.frontiernet.net/~qpcsoft/.
QVT/Term is the telnet program.  It's shareware.

-- 
Adam P. Jenkins 
[EMAIL PROTECTED]

------------------------------

Subject: Re: Devloping Linux apps on NT?
From: [EMAIL PROTECTED] (Adam P. Jenkins)
Date: 26 Mar 1999 17:50:42 -0500

"Seyed Razavi" <[EMAIL PROTECTED]> writes:
> > The Cygwin32 tools (allegedly; I've never tried them) recreate a
> > POSIX-like environment for compiling and running things in Win32.  So
> > I'm sure you could accomplish at least *some* development of Unix
> > programs by compiling them for Cygwin32.  But doing that would be in my
> > opinion somewhat pointless, since it would be trying to recreate a
> > Unix-like environment ... just get the real thing.
> >
> 
> I don't have a choice.  Any idea where I can get Cygwin32?

http://www.cyngnus.com/

-- 
Adam P. Jenkins 
[EMAIL PROTECTED]

------------------------------

From: Brian McCauley <[EMAIL PROTECTED]>
Subject: Re: how to load ram disk from LILO?
Date: 29 Mar 1999 20:09:53 +0100

[EMAIL PROTECTED] (Phil Howard) writes:

> On 24 Mar 1999 17:21:00 -0800 david parsons ([EMAIL PROTECTED]) wrote:
> 
> | In article <%FxG2.294$[EMAIL PROTECTED]>,
> | Phil Howard <[EMAIL PROTECTED]> wrote:
> | >This seems to be mentioned in the initrd document, but not actually said
> | >in the lilo document.  How do you specify the ram disk image to be loaded
> | >by LILO at boot time?

You put a line in lilo.conf:

initrd=filename

There filename must (just like the filenames in map=, install= and
image=) resolve to a file on a region of disk that'll be visible
through BIOS calls at boot-time.

> |       For me, I 
> |       1) Build the kernel with ramdisk and initrd support, of course.
> |       2) On the ramdisk image (the floppy), /etc/lilo.conf has
> |
> |       install = /boot/boot.b
> |       vga = normal
> |       initrd = /dev/fd

Bogus.

Use "initrd=/boot/initrd.gz" and do "gzip </dev/fd >/boot/initrd.gz"

Of course there's not need to use a floppy to build your initial
ramdisk image.  A ramdisk or a loopback device is much better.

> |       ramdisk = 1440                        # keep your laser handy

This is not good.  On recent kernels the "ramdisk=" option does
strange things - avoid it.

> |       root = /dev/ram                       # major 1, minor 0
> |       append = " ramdisk_start=0 prompt_ramdisk=0 load_ramdisk=1"

Avoid these too.

> |       image = /boot/BASIC
> |     label = INSTALLER
> |
> |     I DON'T do any of the dicking around with an initrd;  I'm only doing
> |     the initrd tweakery that I need to get my grubbies on the preloaded
> |     ramdisk.
> 
> Apparently there are two ways to load initial ramdisk.  One is that the
> kernel does the loading itself based on the starting sector number, which
> can be on the initial arguments string, or maybe just stuffed into the right
> binary offset like some of the other parameters such as video mode and root
> device are done.  The other is that the boot loader gets the image and
> through some interface I have not yet discovered (because I haven't looked
> at that part of the source code, yet), and simply hands it to the kernel
> somehow.
> 
> The problem with the first method, which I believe is how LILO does it, is
> that while the kernel itself was loaded by LILO using BIOS level I/O calls
> in 16-bit 8086 mode, the kernel then tries to read the initrd image using
> its own device drivers in 32-bit mode. 

Actually LILO supports both methods.

> I would think it would be useful for LILO to read the inital ramdisk itself,
> but it always fails on CDROM, so I suspect the above scenario.

I've created bootable CDs using LILO.  For details of what I did
(note, that's "details of what _I_ did" not "a user-ready HOWTO
document") see:

http://www.wcl.bham.ac.uk/pub/bam/bootable_CD/

(and read the README) 

> However, the syslinux boot loader works differently.  It actually loads the
> initial ramdisk first (so you know it's doing the reading of it) and then
> the kernel.  It works just fine when booting from CDROM.

LILO works just fine in this mode.

> The syslinux loader understands
> the MS-DOS FAT-12 filesystem and this the images can be placed onto a floppy
> for syslinux under MS-DOS.

This is an avantage of syslinux over LILO.  Of course with LOADLIN
you can make a DOS bootable floppy that boots to Linux but if you put
an image of this into the CD you'd be making a pirate copy of DOS.

> What's actually difficult is making an MS-DOS FAT-12 filesystem while in
> Linux, without using a real physical floppy.

This is not a problem using LILO as LILO can go on a a minix or ext2fs
floppy image.

> At first I wanted to be able to use the 2880k version of El Torito support,
> but as it turns out, by doing mostly symlinks from the initrd filesystem to
> the CDROM I soon mount as /usr, I really don't have to put that much in the
> initial ramdisk, so it and kernel fits on a 1440k floppy easily, and takes
> less RAM as well in the running system.

Of course using a loopback device it's easy to make a 2880 boot image.

> I'm planning to write a MINI HOWTO on making a bootable and runnable CDROM.

That's an excellent idea.  I stongly recommend you take a look at
ftp://ftp.wcl.bham.ac.uk/pub/bam/bootable_CD/README first as it may
help as a starting point and also so that you don't disseminate
disinformation about LILO.

If you need a proof-reader for your HOWTO then let me know.

-- 
     \\   ( )  No male bovine  | Email: [EMAIL PROTECTED]
  .  _\\__[oo   faeces from    | Phones: +44 121 471 3789 (home)
 .__/  \\ /\@  /~)  /~[   /\/[ |   +44 121 627 2173 (voice) 2175 (fax)
 .  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
  # ll  l\\  ~~~~ ~   ~ ~    ~ | http://www.wcl.bham.ac.uk/~bam/
 ###LL  LL\\ (Brian McCauley)  |

------------------------------

From: satish reddy natla <[EMAIL PROTECTED]>
Subject: Re: clone() or PThreads ???
Date: Tue, 30 Mar 1999 12:57:02 -0600

Udo Giacomozzi wrote:

> Hello all! :-)
>
> I have a little big problem I hope you can help me (I am new to Linux system
> programming)!
>
> I want to make a multithreading application for Linux. The application is a
> realtime DSP (sound) program. I want to have all the DSP stuff in a
> secondary thread/process/COE so it isn't disturbed by the GUI.
> I thought I should use clone() because it offers the possibility that the
> memory is shared. As I need realtime performance I don't know if clone() is
> a good choice or if I should use a threads library like PTHREADS. What
> offers better performance? Or, in other words, is clone() good enough for
> me?
>
> Please note there is an additional problem: I do not program in C but in
> FreePascal (I can use every C library anyway). The problem is that FPC
> hasn't a reentrant RTL. I think (i hope...) this is no problem with clone.
> But what is when I use a threads library?
>
> BTW, I use a 2.0.35 kernel (SuSE 5.3) kernel. Do I need to upgrade to 2.2.x?
> (have *never* done a kernel update......!)
>
> Thanks in advance :-)
> Udo Giacomozzi
>
> --
> * Email: [EMAIL PROTECTED]
> * UIN: 17745247   (@pager.mirabilis.com)

You can use linuxthreads  library which is basically makes use of clone system
call when creating threads. Linuxthreads library is freely available on web.
--
Satish Reddy Natla
[EMAIL PROTECTED]



------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to