Linux-Development-Sys Digest #188, Volume #8      Tue, 3 Oct 00 14:13:18 EDT

Contents:
  Compilation of glibc 2.1.3 stops with undefined reference ([EMAIL PROTECTED])
  Re: How to load shared libs at runtime? (Mikko Rauhala)
  Re: extend ethernet header to 18 bytes? (ratz)
  Looking for PF_PACKET implementations, Howtos ("Patrik Ernberg")
  Text-based user interface development (Davide Dozza)
  Maxi  Home Studio Pro 64 driver ("David Brillard")
  Re: "su" inside program ("James T. Dennis")
  Re: NFS question ("James T. Dennis")
  Re: Text-based user interface development (Lew Pitcher)
  Re: Text-based user interface development (Grant Edwards)
  Re: extend ethernet header to 18 bytes? (NortonNg)
  Re: Help: Kernel hang/coredump analysis (Frank Hofmann)
  Re: /proc file system help (Philip Armstrong)
  Re: Text-based user interface development (Thomas Dickey)
  Re: mmap problem in pci driver (Gunnar Proppe)
  Re: Text-based user interface development (Thomas Dickey)
  Re: PCI Documentation (Gunnar Proppe)
  Rerouting serial input to keyboard ? ("Gordon Durnell")
  open() and SCSI emulation (Christoph Lechner)

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

From: [EMAIL PROTECTED]
Subject: Compilation of glibc 2.1.3 stops with undefined reference
Reply-To: [EMAIL PROTECTED]
Date: Tue, 3 Oct 2000 11:50:16 +0000

Hello !

I get the following error when compiling glibc 2.1.3:

...
make[1]: Entering directory /usr/users/sh/in/glibc-2.1.3/db2'
gcc -nostdlib -nostartfiles -o makedb
-Wl,-dynamic-linker=/lib/ld-linux.so.2   ../csu/crt1.o ../csu/crti.o cc
--print-file-name=crtbegin.o makedb.o libdb.so.3
-Wl,-rpath-link=..:../math:../elf:../nss:../nis:.:../rt:../resolv:../linuxthreads
../libc.so.6 ../libc_nonshared.a -lgcc cc --print-file-name=crtend.o
../csu/crtn.o
../libc.so.6: undefined reference to _divdi3'
../libc.so.6: undefined reference to _umoddi3'
../libc.so.6: undefined reference to _udivdi3'
../libc.so.6: undefined reference to _moddi3'
collect2: ld returned 1 exit status
...

How do I fix this ?

regards,
        Stefan

-- 
Stefan Huebner
Munich, Germany
[EMAIL PROTECTED]


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

From: [EMAIL PROTECTED] (Mikko Rauhala)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How to load shared libs at runtime?
Date: 3 Oct 2000 13:09:56 GMT
Reply-To: [EMAIL PROTECTED]

On Mon, 2 Oct 2000 18:48:03 +0200, Peter Koch <[EMAIL PROTECTED]> wrote:
>Thanks, but there are no "man" pages available for these functions (I'm
>using SuSE 7.0). I found the necessary declarators in /usr/include/dlfcn.h
>meanwhile however and think I can work with this. Seems the tricky part of
>linux development is getting used to poor documentation.

Don't blame Linux if SuSE has a lacking (or confusingly packaged) selection
of man pages :)

On Debian, for instance, the mentioned functions are nicely documented
in man pages found in the manpages-dev ("Linux-development man pages")
package.

-- 
Mikko Rauhala - [EMAIL PROTECTED] - http://www.iki.fi/mjr/

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

From: ratz <[EMAIL PROTECTED]>
Subject: Re: extend ethernet header to 18 bytes?
Date: Tue, 03 Oct 2000 15:27:30 +0200


>     I have to describe more detail about my application, the architecture is
> depict below:
> 
>       Internet
>          |
>        router
>          |
>          |
>        --+------------+--------+----------+     ethernet subnet
>          |            |        |          |
>         dispatcher    real     real      real
>                      server A  server B  server C
> 
> 
>     The dispatcher need to forward some packets to real server A,B,C ,
> and it needs to tell those real server the packets order, otherwise the real
> server don't know how to process it(out of order). It is a my load balancing
> scheme for  IP packets, not for TCP,UDP. Therefore i think it should add
> sequence number along with the forwarded packets.
>         The modified ethernet header should be used only for dispatcher to
> forward packets to real server. The ethernet header of packet forward by
> dispatcher to router should be the normal ethernet header.
> Therefore i need to check the destination of MAC address before sending the
> modified ethernet frame, is it efficient to do it?
>         My another idea is to add the extra 4 bytes( use as sequence number)
> after the ethernet header but before the IP header, because i think it is
> more easy to check the destination IP address to determine whether i need to
> add the 4 bytes sequence number. Furthermore, i need to define another
> ethernet type for receiver to recognize the modified frame type.
> any wrong to my idea?  how can i pass the sequence number of each packet
> to upper network layer?
> 
> jkng

Have a look into our project: http://www.linux-vs.org

Unless I misunderstood you want to loadbalancer on Layer 2 by
modifying the ethernet header to achieve the fastest possible
loadbalancing method. That's what is already done with a nice
kernel patch by Wensong Zhang and others. It's is not your 
approach but yields to be your solution ;)
Just wanted to prevent you from reinventing the wheel. Tell me
if I'm wrong.

Regards,
Roberto Nibali, ratz

-- 
mailto: `echo [EMAIL PROTECTED] | sed 's/[NOSPAM]//g'`

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

From: "Patrik Ernberg" <[EMAIL PROTECTED]>
Subject: Looking for PF_PACKET implementations, Howtos
Date: Tue, 3 Oct 2000 16:10:24 +0200

Hi,
I wonder if there is anyboduy out there who has any experience on using the
socket interface on device level, PF_PACKET.

Any pointers to examples, manuals, howtos would be much appreciated.

Best regards,

Patrik Ernberg




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

From: Davide Dozza <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,it.comp.os.linux.development
Subject: Text-based user interface development
Date: Tue, 03 Oct 2000 16:27:31 +0200


I am developing applications written in C/C++ and Perl that require
professional-looking text-based user interface. 
Does anyone know any developing kit that easily address the problem
without passing from ncurses primitives?

Regards

Davide

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

From: "David Brillard" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Maxi  Home Studio Pro 64 driver
Date: Tue, 3 Oct 2000 16:33:16 +0200

Hy everybody,

I just finish my first installation of suse 6.4. But i don't have the
drivers for my soundcard !!!
It's a Maxi Home Studio Pro64 (from Guillemot) -

Where can I find this driver??
        You can directly reply to my e-mail address below.
_________________________________________________________
Just what you think you're doing Dave?
[EMAIL PROTECTED]
_________________________________________________________



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

From: "James T. Dennis" <[EMAIL PROTECTED]>
Subject: Re: "su" inside program
Date: 3 Oct 2000 14:44:15 GMT

Jasiu <[EMAIL PROTECTED]> wrote:

> I want to write little program witch logs into the system as root,
> and execute script. How can I do "su" command inside programm ?


> --
> Marcin


 You are asking the wrong question.  The question is: how do I 
 automatically run a program as root?   The answer is:  use a 
 cron job from root's crontab (or from the /etc/crontab file).

 Running 'su' from within another program is usually NOT what
 you want to do.  Your process should start out as root and 
 should then drop unnecessary privileges as soon as it can.





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

From: "James T. Dennis" <[EMAIL PROTECTED]>
Subject: Re: NFS question
Date: 3 Oct 2000 14:47:36 GMT

Jerome Corre <[EMAIL PROTECTED]> wrote:

> Hi I was just wondering a few sing about NFS:

> I have been playing with nfs for a few weeks, but i am still wondering
> what happen if the client does not unmount the nfs when rebooting? can
> the filesystem on the server be damaged or does the nfs deamond has a
> protection agains that?

> thanks in advance for any help

> Jerome Corre


 NFS is a (mostly) stateless protocol.  It doesn't 
 care if the clients (or the servers) are rebooted without
 notice.

 Note that file locking is a different issue.  However, it is 
 widely believed that NO ONE (not even Sun) has ever quite 
 implemented NFS file locking quite right.



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

From: [EMAIL PROTECTED] (Lew Pitcher)
Crossposted-To: comp.os.linux.development.apps,it.comp.os.linux.development
Subject: Re: Text-based user interface development
Reply-To: [EMAIL PROTECTED]
Date: Tue, 03 Oct 2000 15:04:12 GMT

On Tue, 03 Oct 2000 16:27:31 +0200, Davide Dozza
<[EMAIL PROTECTED]> wrote:

>
>I am developing applications written in C/C++

There is no such language as C/C++. There are two seperate,
independant, and sometimes incompatable languages, one called C, and
the other called C++. 

>and Perl that require
>professional-looking text-based user interface. 
>Does anyone know any developing kit that easily address the problem
>without passing from ncurses primitives?

curses (ncurses) is the accepted standard for character-based 'gui'
(cui?). However, there are a number of text windowing systems
available ("A-flat" (IIRC) comes to mind) that can be used instead.
Check freshmeat (http://freshmeat.net/) for such tools.

Additionally, there are VGA (non-X, but graphical) gui tools also
available (svgalib comes to mind). Again, check freshmeat.

>Regards
>
>Davide


Lew Pitcher
Information Technology Consultant
Toronto Dominion Bank Financial Group

([EMAIL PROTECTED])


(Opinions expressed are my own, not my employer's.)

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

From: [EMAIL PROTECTED] (Grant Edwards)
Crossposted-To: comp.os.linux.development.apps,it.comp.os.linux.development
Subject: Re: Text-based user interface development
Date: Tue, 03 Oct 2000 15:42:05 GMT

In article <[EMAIL PROTECTED]>, Davide Dozza wrote:

>I am developing applications written in C/C++ and Perl that require
>professional-looking text-based user interface. 
>Does anyone know any developing kit that easily address the problem
>without passing from ncurses primitives?

There are three that I know of:

 1) A package called "CDK" that provides a widget-set on top of
    ncurses.  Last time I worked on it, some of the widgets
    were buggy, and there wasn't any screen-traversal code.  I
    fixed some bugs and added a screen traversal engine, but it
    wasn't very complete.  Unless somebody has put some effort
    into it, I wouldn't recommend it for use "out-of-the-box".

 2) A package that used to be from Borland that provides a
    whole text-mode application framework (menus, windows,
    data-entry, various widgets, etc.).  IIRC, this is the
    library that Borland used for their text-mode UI in their
    IDE. Can't remember the name. Pretty complete and
    industrial-strength, as I recall, but fairly heavy-weight.
    I'd look into this one if you're developing something
    pretty full blown (e.g. database GUI with drop down menus,
    pop-up help, switching back-and-forth between two windows,
    etc.)

 3) The "newt" library from RedHat that provides a good widget
    set and layout/screen traversal routines.  Runs on top of
    slang. Fast and small, but some features may be limiting:
    you can only write to the "top" window, and you have to
    destroy the top window before you can do anything with the
    next one down.  For many types of apps, this is OK.
    
-- 
Grant Edwards                   grante             Yow!  Yow! I'm out of
                                  at               work...I could go into
                               visi.com            shock absorbers...or SCUBA
                                                   GEAR!!

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

From: NortonNg <[EMAIL PROTECTED]>
Subject: Re: extend ethernet header to 18 bytes?
Date: Tue, 3 Oct 2000 16:11:04 +0000 (UTC)

ratz <[EMAIL PROTECTED]> wrote:
> >     I have to describe more detail about my application, the architecture is
> > depict below:
> >       Internet
> >          |
> >        router
> >          |
> >          |
> >        --+------------+--------+----------+     ethernet subnet
> >          |            |        |          |
> >         dispatcher    real     real      real
> >                      server A  server B  server C
> >     The dispatcher need to forward some packets to real server A,B,C ,
> > and it needs to tell those real server the packets order, otherwise the real
> > server don't know how to process it(out of order). It is a my load balancing
> > scheme for  IP packets, not for TCP,UDP. Therefore i think it should add
> > sequence number along with the forwarded packets.
> >         The modified ethernet header should be used only for dispatcher to
> > forward packets to real server. The ethernet header of packet forward by
> > dispatcher to router should be the normal ethernet header.
> > Therefore i need to check the destination of MAC address before sending the
> > modified ethernet frame, is it efficient to do it?
> >         My another idea is to add the extra 4 bytes( use as sequence number)
> > after the ethernet header but before the IP header, because i think it is
> > more easy to check the destination IP address to determine whether i need to
> > add the 4 bytes sequence number. Furthermore, i need to define another
> > ethernet type for receiver to recognize the modified frame type.
> > any wrong to my idea?  how can i pass the sequence number of each packet
> > to upper network layer?
> > jkng
> Have a look into our project: http://www.linux-vs.org
> Unless I misunderstood you want to loadbalancer on Layer 2 by
> modifying the ethernet header to achieve the fastest possible
> loadbalancing method. That's what is already done with a nice
> kernel patch by Wensong Zhang and others. It's is not your 
> approach but yields to be your solution ;)
> Just wanted to prevent you from reinventing the wheel. Tell me
> if I'm wrong.
> Regards,
> Roberto Nibali, ratz

        ya, i am using the ipvs now, but i need the dispatcher pass a
sequence number along with each packet to real server for processing,
the  www.linux-vs.org VS/DR method can't do that, therefore i think i should
do it myself, any others do that?? or any others faster approach?

jkng

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

From: Frank Hofmann <[EMAIL PROTECTED]>
Subject: Re: Help: Kernel hang/coredump analysis
Crossposted-To: comp.os.linux.misc,comp.os.linux.development.apps
Date: 3 Oct 2000 18:55:20 +0100

In comp.os.linux.development.apps Michel Talon <[EMAIL PROTECTED]> wrote:
: In comp.os.linux.development.system Andy Jeffries <[EMAIL PROTECTED]> wrote:
:>>>I have midified and recompiled the Linux kernel for my project. I can
:>>>reboot from my new kernel image successfully, and it works happily.
:>>>However, the system will hang from time to time. How can I debug, as I
:>>>could not repeat the bug at my will?? Is it any tool that I can use to
:>>>analyse coredump? Any book or article I can read more about coredump
:>>>analysis?
:>>>
:>> 
:>> $ gdb -c ./core
:>> 

:> Just for people's interest the "file" utility will also tell you which binary
:> generated a core dump.  Very cool little utility that file command.

: Yes fine, but how do you capture a coredump of the kernel? I did not know such
: a possibility existed in Linux. Is it new? For reference this functionnality
: exists in *BSD. On panic a coredump is written to the swap area, and can be 
: examined by gdb after reboot with a working kernel.

The standard Linux kernel does not include an in-kernel debugger nor does it
include a crashdump facility. See the ever-again upcoming discussion on the
kernel mailing lists on the pros & cons of this.
That aside, you can get crashdump facilities for the linux kernel from several
sources:

        http://oss.sgi.com/projects/lkcd/
        http://www.missioncriticallinux.com/

for example offer patches against the 2.2 linux kernel sources which enable
crashdumps to be taken.

But in contrast to above method: No - those dumps cannot be looked at with
gdb. Both cited projects deliver their own tools (lcrash resp. crash) for
looking at kernel crashdumps (that's why I say "crashdump" and not coredump).

Speaking of gdb: You can use that to look at your kernel as well. If you
use a serial line and configure the 'SysRQ Key' functionality, you can even
use it from remote and check in a 'hang situation' what's really going on.
You don't need a crashdump if you can look at the live system. Anyway, it
may still do something, may it not ?

Bye,
Frank

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

From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: /proc file system help
Date: 2 Oct 2000 22:25:53 +0100

In article <8rasmt$mku$[EMAIL PROTECTED]>,
Keith <[EMAIL PROTECTED]> wrote:
>I have a structure that is being implemented in KLIPS (add on to the kernel
>which supports IPSec stuff) and I want to be able to access this information
>using the /proc file system. How would I go about doing this? How does /proc
>work so that it can access it.

Try reading http://www.linuxdoc.org/LDP/lkmpg/mpg.html which has some
useful /proc example code.

>I would really appreciate the help guys

Pleasure :)

Phil


-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt


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

From: Thomas Dickey <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,it.comp.os.linux.development
Subject: Re: Text-based user interface development
Date: 3 Oct 2000 17:23:11 GMT

In comp.os.linux.development.apps Grant Edwards <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>, Davide Dozza wrote:

>>I am developing applications written in C/C++ and Perl that require
>>professional-looking text-based user interface. 
>>Does anyone know any developing kit that easily address the problem
>>without passing from ncurses primitives?

> There are three that I know of:

>  1) A package called "CDK" that provides a widget-set on top of
>     ncurses.  Last time I worked on it, some of the widgets
>     were buggy, and there wasn't any screen-traversal code.  I
>     fixed some bugs and added a screen traversal engine, but it
>     wasn't very complete.  Unless somebody has put some effort
>     into it, I wouldn't recommend it for use "out-of-the-box".

this is at least the 4th time you've mentioned that, but I have seen no patch.
(I don't recall the specific bugs reported, but that was about a year ago)

        http://dickey.his.com/cdk/
        ftp://dickey.his.com/cdk/

>  2) A package that used to be from Borland that provides a
>     whole text-mode application framework (menus, windows,
>     data-entry, various widgets, etc.).  IIRC, this is the
>     library that Borland used for their text-mode UI in their
>     IDE. Can't remember the name. Pretty complete and
>     industrial-strength, as I recall, but fairly heavy-weight.
>     I'd look into this one if you're developing something
>     pretty full blown (e.g. database GUI with drop down menus,
>     pop-up help, switching back-and-forth between two windows,
>     etc.)

but it's specific to the console (uses too many special characters to port well)

>  3) The "newt" library from RedHat that provides a good widget
>     set and layout/screen traversal routines.  Runs on top of
>     slang. Fast and small, but some features may be limiting:
>     you can only write to the "top" window, and you have to
>     destroy the top window before you can do anything with the
>     next one down.  For many types of apps, this is OK.

would be OK if it were documented (hate to say what I do with stuff like that ;-)

-- 
Thomas E. Dickey <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com

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

From: Gunnar Proppe <[EMAIL PROTECTED]>
Subject: Re: mmap problem in pci driver
Date: Tue, 03 Oct 2000 10:23:35 -0700

Thanks for the suggestion.  You're right - MAP_SHARED seems more
appropriate (the MAP_PRIVATE setting came from some sample code).
Unfortunately, it didn't seem to solve the problem.

I tried printing the entire 4k block that comes back (even though I only
need 256 bytes, remap_page_range obviously only can deal out chunks in
multiples of page size).  I seem to remember reading somewhere that the
actual data might not be right at the beginning of the range, since it
needs to realign to the start of a page.  Anyway, after a whole bunch of
ffffffff's, there was a range of 0's.  The second time (and everytime
thereafter) I run my test program, these turn into a bunch of 4's and
0's.  These reset to 0's after I rmmod and insmod my module.  This still
doesn't make any sense though.

But at this point, getting different results feels like progress.

Gunnar


Arne Driescher wrote:

> >
> > /*test.c*/
> > /*a sample user space program to test the phantom driver*/
> >
> > #include <stdio.h>
> > #include <fcntl.h>
> > #include <sys/mman.h>
> >
> > int *int_addr; /* int *int_addr; should be 4 bytes long*/
> >
> > main(int argc, char *argv[])
> > {
> >  int     fd;
> >  int  *encoder_base;
> >  char *encoder_base_char;
> >
> >  fd = open("phantom", O_RDONLY);
> >  encoder_base = (int *) mmap(NULL,256,PROT_READ,MAP_PRIVATE,fd,0);
>
> Hi,
> man mmap
>   MAP_PRIVATE
>                   Create a private copy-on-write mapping.
> Perhaps copy on write is not exactly what you want :-)
> I use this code for mapping.
> image = mmap(NULL,
>              size,
>              PROT_READ,
>              MAP_SHARED,
>              fd,
>              0l);
>
> Perhaps it helps.
>
> -Arne


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

From: Thomas Dickey <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,it.comp.os.linux.development
Subject: Re: Text-based user interface development
Date: 3 Oct 2000 17:25:38 GMT

In comp.os.linux.development.apps Lew Pitcher <[EMAIL PROTECTED]> wrote:

> curses (ncurses) is the accepted standard for character-based 'gui'
> (cui?). However, there are a number of text windowing systems
> available ("A-flat" (IIRC) comes to mind) that can be used instead.
> Check freshmeat (http://freshmeat.net/) for such tools.

I've also seen some references to A-flat, but (in spite of the posting that
indicated it was "very" portable, found only some 4-year-old code (which
had been run on 2-3 platforms).  If there's more to it than that, would be
nice to know.

-- 
Thomas E. Dickey <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com

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

From: Gunnar Proppe <[EMAIL PROTECTED]>
Subject: Re: PCI Documentation
Date: Tue, 03 Oct 2000 10:47:03 -0700

Some sample code for mmap (which I still haven't gotten to work in my
PCI driver):

http://www.kernelnewbies.org/code/mmap/
ftp://ftp.visi.com/users/grante/stuff/demomm.tar.gz

I've found the Rubini book to be well written but it's a bit out of date,
and leaves you hanging somewhat with the specifics of PCI drivers.  I've
heard a new edition is in the works.  I've needed all the documentation
and source code I could get my hands on, and it's still not enough.  The
bttv driver code probably has everything you need, but it's not that easy
to follow since it's so general purpose (swiss army video driver).  This
stuff is not rocket science, but it's not exactly trivial either.

Good luck,
Gunnar


[EMAIL PROTECTED] wrote:

> I am writing a pci driver to interface with a home-grown pci
> peripheral.  I already have  Linux Device Drivers by Alessandro Rubini,
> first edition.  Does anyone know of any other documentation concerning
> pci drivers and pci peripherals.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.


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

From: "Gordon Durnell" <[EMAIL PROTECTED]>
Subject: Rerouting serial input to keyboard ?
Date: Tue, 3 Oct 2000 12:53:51 -0500

Is it possible to reroute the input coming into a serial port to make it
look like it is coming from the keyboard?

I am trying to find an OCR pen that will work as a keyboard wedge under
Linux, but they all seem to use RS232 and a Windows/Mac program to read it.
I'm hoping I won't have to write a daemon that reads the serial port and
pokes data into the keyboard buffer (but may have to in order to filter out
garbage...).

--

Gordon Durnell - Megavolt
Springfield MO
[EMAIL PROTECTED]



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

From: Christoph Lechner <[EMAIL PROTECTED]>
Subject: open() and SCSI emulation
Date: Tue, 03 Oct 2000 20:05:07 +0200

Hi!

I use a SUSE 6.2 w/ 2.2.10 kernel and SCSI emulation. My (IDE)CDROM
drive is accessable via the device file "/dev/sr0". If I open the
CDROM drive by doing open ("/dev/sr0", O_RDWR) the system tells me
about the read-only CDROM drive. What's up ?

Regards
- C. Lechner

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


** 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