Linux-Development-Sys Digest #209, Volume #7     Sun, 19 Sep 99 05:14:04 EDT

Contents:
  Re: How to get mylib.so from mylib.a ? (Peter Samuelson)
  Re: Heads up: Mandrake Linux, bad compiler. (David Wragg)
  Re: UDMA vs IDE: performance comparison wanted (Peter Samuelson)
  Re: What dist do kernel hackers use? (Peter Samuelson)
  Re: Copy and past (Peter Samuelson)
  Re: Adding swap space to drive with data... easy? (Peter Samuelson)
  Re: Statically linked binaries - why so big? (Todd Knarr)
  Re: porting unnamed structures (Peter Samuelson)
  SPARC linux console screen ("Patrick Wetmore")
  Re: write / writev guaranteed autonomous? (David Schwartz)
  Re: Heads up: Mandrake Linux, bad compiler. (Klea Dzonsons)
  Re: SPARC linux console screen (Pete Zaitcev)
  Re: Looking for a project (Lew Pitcher)
  Re: time measurement in milliseconds (M. David Allen)
  setsockopt() error? ("Grith")
  Re: Heads up: Mandrake Linux, bad compiler. ([EMAIL PROTECTED])
  Re: IDE register programming: bizzare twists (Peter Samuelson)

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: How to get mylib.so from mylib.a ?
Date: 18 Sep 1999 19:24:05 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[T.E.Dickey <[EMAIL PROTECTED]>]
> You can still make a static library from objects compiled with -fpic; 
> it's just less efficient.

And vice versa: you can make a shared library from objects compiled
without -fpic, but again it's less efficient.  (Considerably less.)

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: David Wragg <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
Subject: Re: Heads up: Mandrake Linux, bad compiler.
Date: 18 Sep 1999 13:25:51 +0000

mlw <[EMAIL PROTECTED]> writes:
> Just as a heads up for anyone that is interested.
> 
> The C/C++ compiler that comes with Mandrake 6.0 does not build XFree
> correctly. And it fails in the oddest way.
> 
> If you build XFree86 3.3.5 (and both 3.3.4 and 3.3.3) and install it.
> The standard X apps seem to work OK. The instant you run a kde app, the
> X session gets nuked to a black screen and hangs. You can switch to a
> different vconsole and most of the time you can kill it with a -9.
> 
> To make a long story short, I removed Mandrake's pgcc and installed
> RedHat's build of egcs, rebuilt the code, and had no problems.

The XFree86 code has always been good at teasing out compiler
bugs. egcs-1.x with -march=pentiumpro would always break XFree86 (I
haven't tried the 2.95 releases of egcs on it), and it sounds like
pgcc has a similar problem. So unless you like your X server crashing
at odd moments, you should compile it with conservative compiler
options, as you would for the kernel.


David Wragg

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: UDMA vs IDE: performance comparison wanted
Date: 18 Sep 1999 19:53:32 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[Jens Klaas <[EMAIL PROTECTED]>]
> I didn't use hdparm because I read in a german newsgroup about some
> very bad experience with hdparm, like total unsuable disks
> afterwards.

Yeah you do have to read the docs and know what your hardware can do.

> Also I didn't try to optimise anything in the DMA mode. From this
> point of view, I think it is a fair comparison.

I don't.  At least I don't consider it useful.  If I were thinking
about whether to buy a UDMA66 card or just plug my new drive into the
ol' PIIX3, I would much rather see the optimized settings for both.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: What dist do kernel hackers use?
Date: 18 Sep 1999 19:44:20 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[<[EMAIL PROTECTED]>]
> Hehe, i love the smell of flame war in the morning.

Lousy troll.  You're not supposed to give it away.  Anyway, if this
were a serious question, I would answer that Linus uses Red Hat and
SuSE, the guys employed by Red Hat probably use Red Hat, the guys
employed by SuSE probably use SuSE, and the rest use whatever they
want.  I won't mention that I use Debian because you didn't ask about
us non- (or in my case extremely-peripheral-) kernel-hackers.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: Copy and past
Date: 18 Sep 1999 20:24:59 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[tony lee <[EMAIL PROTECTED]>]
> I am wondering if there is any way that you can copy and past between
> 2 applications in Linux.

As long as one isn't xemacs 20.x linked with libgpm, yes.  Or if unlike
me you are using X, yes.  Button 1 select, button 2 paste.  If your
mouse is missing the third button you sometimes have to apply the
appropriate fakery.

> And is there mecanic like Windows i.g ActiveX?

GNOME uses Bonobo over CORBA.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Crossposted-To: comp.os.linux.misc,alt.os.linux,comp.os.linux.setup
Subject: Re: Adding swap space to drive with data... easy?
Date: 18 Sep 1999 20:21:30 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

Please, Content-Type: multipart/alternative and Content-Type: text/html 
are both evil.  Disable!

[Mark D'Ascenzo <[EMAIL PROTECTED]>]
> I have a plan to reformat my partition table to add swap space.  I've
> listed my scheme below.  Will it work?  Please email or post
> comments.  Your thoughts could save me tons of time.

> Device Boot    Start      End   Blocks   Id  System
> /dev/hda1             1      131  1052226    b  Win95 FAT32
> /dev/hda2           132     1232  8843782+   5  Extended
> /dev/hda5           132      144   104391   83  Linux native
> /dev/hda6           145      863  5775336   83  Linux native
> /dev/hda7           864     1080  1743021   83  Linux native
> /dev/hda8          1081     1170   722893+  83  Linux native
> /dev/hda9          1171     1190   160618+  83  Linux native
> /dev/hda10         1191     1206   128488+  82  Linux swap
> /dev/hda11         1207     1219   104391   83  Linux native
> /dev/hda12         1220     1232   104391   83  Linux native

> Device Boot    Start      End   Blocks   Id  System
> /dev/hda1             1     1232  8843782+   5  Extended     <-- note change
> /dev/hda2             1       15   128488   82  Linux swap   <-- note change
> /dev/hda13           16       31   128488   82  Linux swap   <-- note change
> /dev/hda14           32      131   722893   83  Linux native <-- note change
> /dev/hda5           132      144   104391   83  Linux native
> /dev/hda6           145      863  5775336   83  Linux native
> /dev/hda7           864     1080  1743021   83  Linux native
> /dev/hda8          1081     1170   722893+  83  Linux native
> /dev/hda9          1171     1190   160618+  83  Linux native
> /dev/hda10         1191     1206   128488+  82  Linux swap
> /dev/hda11         1207     1219   104391   83  Linux native
> /dev/hda12         1220     1232   104391   83  Linux native

If I were you I would just go in with `cfdisk', delete the fat32
partition and add two "linux swap" partitions at the beginning.  This
would achieve the same effect except that it will renumber your
partitions.  Edit /etc/fstab and /etc/lilo.conf accordingly.

I suggest this because this way the responsibility for calculating new
block numbers for the extended partition, etc, is given to cfdisk which
is much smarter than I am about these things.  Even so, you probably
want to back up the first 512 bytes of each of /dev/hda and /dev/hda2
into files on a rescue floppy, just in case.

> Is it just as easy as changing the table?  Will I aslo need to do
> anything about the FAT32 system or will that happen automatically
> when the partition table is written?

What will not happen is writing swap signatures into the swap
partitions.  That you must do with `mkswap'.  And while we're on the
subject, make sure you specify different priorities in /etc/fstab for
your three swap partitions, since they are on the same drive.

Finally, as someone else already noted, if you're using a recent kernel
(newer than 2.1.80 or so) and an equally recent util-linux (for mkswap)
you no longer have the 128MB limit on swap file size.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: Todd Knarr <[EMAIL PROTECTED]>
Subject: Re: Statically linked binaries - why so big?
Date: 19 Sep 1999 01:58:21 GMT

In comp.os.linux.development.system <7s18fq$k5h$[EMAIL PROTECTED]> Peter Samuelson 
<[EMAIL PROTECTED]> wrote:
> exit() and so forth) the alternative would be to dynamically link your
> essential tools against a duplicate copy of libc and ld-linux.so etc.
> The duplicate libs would sit in /stand/lib or something and would be
> just as impervious to screw-ups as the original statics would have
> been.

The problem is getting it used. The dynamic loader normally uses
it's own paths as determined by ldconfig to find libc.so, so unless
you've got enough static binaries to redo the ldconfig cache you'll
use the stock libc.so anyway. You can override this with some environment
variables, but there's still places where even those are ineffective.
I prefer just losing the disk space to static binaries over playing
games, since I only need perhaps a dozen-and-a-half programs to put
the system back together enough to get the regular programs working.

sash is, of course, mandatory, at least IMHO. Of course, I also think
a complete maintenance boot partition with it's own libraries is
mandatory, so...

-- 
If I employed software developers and they gave me something like this,
I'd shoot them.
                                -- Abby Franquemont

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: porting unnamed structures
Date: 18 Sep 1999 19:38:28 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[Michael Minnick <[EMAIL PROTECTED]>]
> Yeah, I had to assign names too. But since I have hundreds of
> references to the fields in these unnamed structs I put in a gross
> hack:

> #define foo x.foo

Ewwww, did you have to say that while I was eating something? (:

So ... why this is better than just collapsing the header file from
    struct {
      struct {
        int foo:1;
      }
    } bar;
to
    struct {
      int foo:1;
    } bar;
?

Is the grouping somehow necessary to get the bitfields to behave?

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: "Patrick Wetmore" <[EMAIL PROTECTED]>
Subject: SPARC linux console screen
Date: Sat, 18 Sep 1999 22:25:01 -0400

Hi all,

So I just installed Red Hat 6.0 on my sparc IPX, and the consoles are all
black background, white characters, in a very tiny font, taking up the
entire screen.  I was fond of the classic Sun look, with their nifty font,
and only taking up the center of the screen;  is there any way to get the
Linux virtual consoles to use that look?

Thanks,

- pat




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

From: David Schwartz <[EMAIL PROTECTED]>
Subject: Re: write / writev guaranteed autonomous?
Date: Sat, 18 Sep 1999 21:36:39 -0700

Glen Parker wrote:
> 
> man 2 write says this (under the errors section):
> 
>    EINTR  The call was interrupted by  a  signal  before  any
>                  data was written.
> 
> That's pretty specific, but I wonder how portable code that relies on that
> would be...

        Totally, if there's a partial write, you will not get EINTR back. A
write is defined as successful if _any_ data was written. So a partial
write is not an error condition. (Otherwise, you wouldn't be able to
tell how many bytes were actually written, which would be bad.)

        DS

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

From: Klea Dzonsons <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
Subject: Re: Heads up: Mandrake Linux, bad compiler.
Date: Mon, 20 Sep 1999 02:23:49 +0930



mlw wrote:

> Klea Dzonsons wrote:
> >
> > mlw wrote:
> >
> > > Just as a heads up for anyone that is interested.
> > >
> > > The C/C++ compiler that comes with Mandrake 6.0 does not build XFree
> > > correctly. And it fails in the oddest way.
> > >
> > > If you build XFree86 3.3.5 (and both 3.3.4 and 3.3.3) and install it.
> > > The standard X apps seem to work OK. The instant you run a kde app, the
> > > X session gets nuked to a black screen and hangs. You can switch to a
> > > different vconsole and most of the time you can kill it with a -9.
> > >
> > > To make a long story short, I removed Mandrake's pgcc and installed
> > > RedHat's build of egcs, rebuilt the code, and had no problems.
> > >
> > > Has anyone else seen this problem. I sure hope I am not the only one.
> >
> > I have something of a similar prob with the compiler too.When trying to run
> > configure when installing Licq I get "error C++ compiler cannot create
> > executables"
> > Im still, working on it now.
> > K.Dzonsons
>
> Are you using Mandrake?

Yep, Mandrake 6.0

> I think you have a different error.
> --
> Mohawk Software
> Windows 95, Windows NT, UNIX, Linux. Applications, drivers, support.
> Visit http://www.mohawksoft.com


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

Subject: Re: SPARC linux console screen
From: [EMAIL PROTECTED] (Pete Zaitcev)
Date: Sun, 19 Sep 1999 05:37:16 GMT

>So I just installed Red Hat 6.0 on my sparc IPX, and the consoles are all
>black background, white characters, in a very tiny font, taking up the
>entire screen.  I was fond of the classic Sun look, with their nifty font,
>and only taking up the center of the screen;  is there any way to get the
>Linux virtual consoles to use that look?

Yes except for that particular font, Galant-19. It's not free.
Also remember that Linux applications may assume default color
scheme. Try to run lynx on a dtterm and you will see what I mean.

--Pete

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

From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: Looking for a project
Date: Sat, 18 Sep 1999 14:54:31 GMT

One that would benefit many new Linux users would be to
build a Linux driver module for a 'winmodem'. Choose a
widely marketed "Software UART" winmodem, though, in order
to make the project usable by the Linux community without
running over your target completion date.

On Sat, 18 Sep 1999 01:27:54 +0530, "Rishabh Tandon"
<[EMAIL PROTECTED]> wrote:

>guys I'm looking for an undergrad project in linux. If u have anything in
>mind please let me know.
>
>


Lew Pitcher
Master Codewright and JOAT-in-training

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

From: [EMAIL PROTECTED] (M. David Allen)
Crossposted-To: 
alt.os.linux,alt.uu.comp.os.linus.questions,aus.computers.linux,comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.help,comp.realtime
Subject: Re: time measurement in milliseconds
Date: 19 Sep 1999 07:22:38 GMT
Reply-To: [EMAIL PROTECTED]

In article <7rssj5$r1c$[EMAIL PROTECTED]>,
        "u2161474" <[EMAIL PROTECTED]> writes:
> hi,
> 
> I am trying to measure the period of time taken to execute a program as
> accurate as milliseconds.
> 
> I have looked up /usr/include/time.h & /usr/include/timebits.h header files,
> but I don't know how to use it !
> 
> I don't know how to use "time_t tv_usec" in /usr/include/timebits.h ...
> please help...
> 
> Thankx
> 
> 
> regards,
> Gywer

use the select() system call with all NULL arguments except the timeout
argument.

man select
 
-- 
David Allen
http://opop.nols.com/
========================================
The heart has its reasons which reason knows nothing of.
        -- Blaise Pascal                                       

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

From: "Grith" <[EMAIL PROTECTED]>
Subject: setsockopt() error?
Date: Sun, 19 Sep 1999 03:59:13 -0400
Reply-To: "Grith" <[EMAIL PROTECTED]>

    A'ight, I'm pretty new to this whole  programming thing, but I'm trying
to get a MUD up and running on Slackware 4.0. Kernel version 2.2.12, GCC
2.8.1 and er, some other junk that I don't think is relevant (ie, can't
remember right now, if more info is needed let me know;)). Anyway, the MUD
compiles with nothing but a couple of warnings in irrelevant areas, I know
what they refer to, and they have nothing to do with the socket handling.
    The problem is that I'm a rookie when it comes to coding period, and
I've never even come anywhere near socket/stream handling code, so when I
see something like this... I mean, I know what it means... basicly, but I
have no idea how to resolve it. The error in question is:

            setsockopt: SNDTIMEO: Protocol not available.

    Now, I understand of course that every piece of code does its error
handling differently and all that, but it seems to me that ya'll have to
have at least /some/ idea maybe?:)



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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
Subject: Re: Heads up: Mandrake Linux, bad compiler.
Date: Sun, 19 Sep 1999 07:38:48 GMT

I had a problem with doing 'make menuconfig' in order to build a kernel.
I installed gcc-2.95. I figured if it pgcc couldn't compile the menus, I
wasn't even going to attemt the kernel itself with it.

Perry

In article <[EMAIL PROTECTED]>,
  mlw <[EMAIL PROTECTED]> wrote:
> Just as a heads up for anyone that is interested.
>
> The C/C++ compiler that comes with Mandrake 6.0 does not build XFree
> correctly. And it fails in the oddest way.
>
> If you build XFree86 3.3.5 (and both 3.3.4 and 3.3.3) and install it.
> The standard X apps seem to work OK. The instant you run a kde app,
the
> X session gets nuked to a black screen and hangs. You can switch to a
> different vconsole and most of the time you can kill it with a -9.
>
> To make a long story short, I removed Mandrake's pgcc and installed
> RedHat's build of egcs, rebuilt the code, and had no problems.
>
> Has anyone else seen this problem. I sure hope I am not the only one.
>
> --
> Mohawk Software
> Windows 95, Windows NT, UNIX, Linux. Applications, drivers, support.
> Visit http://www.mohawksoft.com
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: IDE register programming: bizzare twists
Date: 19 Sep 1999 03:14:23 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>

[Philip Brown <[EMAIL PROTECTED]>]
> The word of the day is mispergitude

Been meaning to ask you for awhile now.  My trusty Merriam-Webster's
10th Collegiate doesn't define your word of the day, or any obvious
roots.  Is it a real word?  If so, what does it mean?

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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


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