Linux-Development-Sys Digest #16, Volume #7 Mon, 2 Aug 99 20:14:09 EDT
Contents:
Re: struct byte alignment ??? (James Cownie)
SCSI disks
Re: Video editing on linux? (Tristan Wibberley)
is there any way to specify the serial console to display the dmesg on ("Francois
D. Menard")
Re: g++ (Billy Donahue)
Question about shared libraries (Anand Paka)
Re: g++ (Juergen Heinzl)
Video mode switching with asm (Jylam)
assembler message, Unknown pseudo-op : .section ("Lim, Sung-taek")
Re: Question about shared libraries (Mark Hamstra)
Re: Question about shared libraries (Mark Hamstra)
Re: c++ grammer (Bruce Stephens)
Wierdness in RedHat 6.0 and C++ (mlw)
Re: GCC Cross Compiling ("Paul Lutus")
Re: g++ (Johan Kullstam)
GCC Cross Compiling ("Matt Zinkevicius")
gcc and default include and lib dirs (Steve Simons)
handling modem input ("Dan Miller")
Re: Web Based Linux Management (Gary Lawrence Murphy)
address? (Ann Chen)
Tripwire build problems ("Marc Marais")
Re: NCR 53C710 Fast SCSI-2 Controller ([EMAIL PROTECTED])
----------------------------------------------------------------------------
Date: Mon, 02 Aug 1999 17:03:17 +0100
From: James Cownie <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: struct byte alignment ???
Bayee wrote:
>
> From what I understand, this is due to some alignment issuse. Is
> there any compilation option that we can turn off the "auto-align"
> feature ? (Means that the first printf will return 3 instead of 4).
Not in standard C.
Various compilers have different ways of enabling this via #pragma and so on.
Since you're likely using gcc then you should go look at the gcc manual (M-x info if
you're using emacs as you should be !), and check out the C language extensions,
alignment and packed options...
-- Jim
James Cownie <[EMAIL PROTECTED]>
Etnus, Inc. +44 117 9071438
http://www.etnus.com
------------------------------
From: <[EMAIL PROTECTED]>
Subject: SCSI disks
Date: 2 Aug 1999 19:18:17 GMT
I've got a strange problem with attempting to load a number of scsi
disks. I've got two PCI scsi controllers (Adaptec 2940 and NCR53c825),
and when loading a number of disks from the second (NCR), the number of
scsi disks registered in /proc/paritions only goes through sdg1, rather
than through sdi1, as the scsi module loading would indicate. Here's a
clipping of the log:
Vendor: QUANTUM Model: EMPIRE_1080S Rev: 1242
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sdd at scsi1, channel 0, id 1, lun 0
Vendor: QUANTUM Model: EMPIRE_1080S Rev: 1242
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sde at scsi1, channel 0, id 2, lun 0
Vendor: MICROP Model: 2210-09MQ1001901 Rev: HQ30
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sdf at scsi1, channel 0, id 3, lun 0
Vendor: CONNER Model: CFP1060S 1.05GB Rev: 2035
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sdg at scsi1, channel 0, id 4, lun 0
Vendor: SEAGATE Model: ST11200N Rev: 9682
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sdh at scsi1, channel 0, id 5, lun 0
ncr53c825-0-<6,*>: FAST-10 SCSI 10.0 MB/s (100 ns, offset 8)
Vendor: IBM Model: 0662S12 !O Rev: 2 23
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sdi at scsi1, channel 0, id 6, lun 0
... and here's the end of /proc/partitions
8 81 1032176 sdf1
8 96 1037440 sdg
8 97 1037296 sdg1
There are enough devices under /dev/sd*, so that's not it. Is there an inherent limit
in the kernel that I
could change? I've looked through the headers and couldn't really see anything
obvious..... any ideas?
-Cory
------------------------------
From: Tristan Wibberley <[EMAIL PROTECTED]>
Subject: Re: Video editing on linux?
Date: Sun, 01 Aug 1999 18:31:28 +0100
Reply-To: [EMAIL PROTECTED]
John Guillory wrote:
>
> Is there a video editing aplication like Premier or Avid for Linux? I can't
> find any information about it -- if it exists. Thanks, John
I'm afraid this is the wrong newsgroup. You won't get much help.
I would suggest looking at www.linux.com, and finding their links page,
there are a couple of application lists around, and probably a few
company lists.
--
Tristan Wibberley
------------------------------
From: "Francois D. Menard" <[EMAIL PROTECTED]>
Subject: is there any way to specify the serial console to display the dmesg on
Date: Mon, 02 Aug 1999 18:46:25 GMT
is there any way to specify the serial console to display the dmesg on
the lilo append command line ?
--
Francois D. Menard, Consultant
------------------------------
From: Billy Donahue <[EMAIL PROTECTED]>
Subject: Re: g++
Date: Mon, 02 Aug 1999 14:56:29 -0400
Eric Hegstrom wrote:
>
> try
> ./a.out
>
> (you need to have the current directory set up in your path to type just
> a.out -- there are some security issues with having "." in your path if
> you are root. Remember "." is your current directory.
It's not just bad if you're root...
You should NEVER put . in your path.
I could put a script called 'ls' in my directory that
looks and feels just like the real 'ls', but
won't reveal itself, and maybe makes a program
somewhere setuid to you (since my 'ls' runs as you).
Then I can do whatever I want to any of your files
in your directory.
If you happen to visit my directory and type 'ls',
then you're screwed.. I could also put my 'ls' in
/tmp, and if you 'cd /tmp' and 'ls', you're doomed.
------------------------------
From: Anand Paka <[EMAIL PROTECTED]>
Subject: Question about shared libraries
Date: Mon, 2 Aug 1999 16:48:48 -0400
Hi,
I was wondering if there is an initializing function that is called
within a shared library whenever a new process loads it and another which
is called when a process unloads it. What are the prototypes for these
functions if they exist and how do I specify them for my .so library?
-Anand
------------------------------
From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: g++
Date: Mon, 02 Aug 1999 19:45:08 GMT
In article <[EMAIL PROTECTED]>, Billy Donahue wrote:
>Eric Hegstrom wrote:
>>
>> try
>> ./a.out
>>
>> (you need to have the current directory set up in your path to type just
>> a.out -- there are some security issues with having "." in your path if
>> you are root. Remember "." is your current directory.
>
>It's not just bad if you're root...
>You should NEVER put . in your path.
>I could put a script called 'ls' in my directory that
>looks and feels just like the real 'ls', but
>won't reveal itself, and maybe makes a program
>somewhere setuid to you (since my 'ls' runs as you).
>Then I can do whatever I want to any of your files
>in your directory.
>If you happen to visit my directory and type 'ls',
>then you're screwed.. I could also put my 'ls' in
>/tmp, and if you 'cd /tmp' and 'ls', you're doomed.
PATH=$PATH:. ... . ought to be the last entry, then
you can type ls until the cows come home 8)
Minor note, only root can create a programme so it
is setuid JoeSixpack, say you're screwed already, you
just do not know yet and this is much worse than
any number of .'s in the path. As root one usually does
not need $PATH:. though.
Ta',
Juergen
--
\ Real name : J�rgen Heinzl \ no flames /
\ EMail Private : [EMAIL PROTECTED] \ send money instead /
------------------------------
From: Jylam <[EMAIL PROTECTED]>
Subject: Video mode switching with asm
Date: Mon, 02 Aug 1999 22:16:48 +0200
Hello
I would like to know how switch to 320x200x256c for example without any
library, in assembly.
I can't use any lib because it's for any 4kb demo competition ...
Thanks a lot
Jylam
(Please reply to me)
------------------------------
From: "Lim, Sung-taek" <[EMAIL PROTECTED]>
Subject: assembler message, Unknown pseudo-op : .section
Date: Wed, 28 Jul 1999 16:31:17 +0900
Hi, I installed binutils-2.9.1.0.19a as 'arm-aout' targetted.
When I assemble a simple example with arm-aout-asm, it
complains that
Error : Unknown pseudo-op '.section'
Error : Unknown pseudo-op '.previous'
When I look into the GAS manual, there exists the directive
'.section'. I can't figure out why this happens. Can anyone
explain this or advise?
Thank you for any kind or help or advice.
--
Lim, Sung-taek
[EMAIL PROTECTED]
http://poppy.snu.ac.kr/~totohero/
------------------------------
From: Mark Hamstra <[EMAIL PROTECTED]>
Subject: Re: Question about shared libraries
Date: 02 Aug 1999 17:16:44 -0400
Anand Paka <[EMAIL PROTECTED]> writes:
> Hi,
>
> I was wondering if there is an initializing function that is called
> within a shared library whenever a new process loads it and another which
> is called when a process unloads it. What are the prototypes for these
> functions if they exist and how do I specify them for my .so library?
You can insert functions into the .init and .fini sections of your .so
using __attribute__((__constructor__)) and __attribute__((__constructor__)).
E.g.,
static void initializer() __attribute__((__constructor__));
static void finisher() __attribute__((__destructor__));
static void initializer() {
printf("\n\n\tIn initializer()\n\n");
return;
}
static void finisher() {
printf("\n\n\tIn finisher()\n\n");
return;
}
--
Mark Hamstra
Bentley Systems, Inc.
------------------------------
From: Mark Hamstra <[EMAIL PROTECTED]>
Subject: Re: Question about shared libraries
Date: 02 Aug 1999 17:20:46 -0400
Mark Hamstra <[EMAIL PROTECTED]> writes:
> You can insert functions into the .init and .fini sections of your .so
> using __attribute__((__constructor__)) and __attribute__((__constructor__)).
Forgot to modify after the cut 'n' paste; that's
You can insert functions into the .init and .fini sections of your .so
using __attribute__((__constructor__)) and __attribute__((__destructor__)).
^^
of course.
--
Mark Hamstra
Bentley Systems, Inc.
------------------------------
From: Bruce Stephens <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: c++ grammer
Date: 02 Aug 1999 23:45:25 +0100
De Messemaeker Johan <[EMAIL PROTECTED]> writes:
> jievis wrote:
> > Where can I find the grammer for C++ writen in lex( or flex) and yacc
> >
> > (or bison),
> >
> > Thanks in advance
>
> Hmm, i'm also interested in this. And the ANSI SQL-grammar too :-)
gcc contains a C++ grammar. It's not necessarily an easily usable
one, depending on what you want to do. There's also one based on
PCCTS (i.e., not lex or yacc), which includes a preprocessor (there
are two grammars---one for the preprocessor, one for preprocessed
code). And TenDRA <URL:http://alph.dra.hmg.gb/TenDRA/> contains a C++
parser, encoded in its own parser-generator language; it also includes
C.
PostgreSQL, <URL:http://www.postgresql.org/>, contains an SQL grammar.
It may not be quite complete, but it's probably pretty close.
------------------------------
From: mlw <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Wierdness in RedHat 6.0 and C++
Date: Mon, 02 Aug 1999 22:16:59 +0000
Ever since I upgraded my development system to RedHat 6.0, I have been
getting real strange things happening with the C library.
I have a class library from which I build all my applications. It
compiles and works great under RedHat 5.2 and Windows NT.
When I compile it under RH 6.0 (and Mandrake) real strange things start
to happen. I have one class that is declared but not used. When its code
is present in the binary I can not read or write to the serial port
(opened as a file). When I '#ifdef' out the code, the app works
perfectly. The code is never used, never called. Just its presence
breaks the app. I have moved the code to several different modules
thinking that its positioning just exposed another bug, no matter where
I put it, in its own module, before or after other libs on the link
line, same thing. Ifdef out the code, it works. Leave it in and never
call it, it breaks.
I had a similar problem a month or so ago on a different project.
Anyone else have these problems? I am seriously thinking about switching
back to 5.2 for development.
--
Mohawk Software
Windows 95, Windows NT, UNIX, Linux. Applications, drivers, support.
Visit http://www.mohawksoft.com
------------------------------
Reply-To: "Paul Lutus" <[EMAIL PROTECTED]>
From: "Paul Lutus" <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c++,comp.os.linux.development.apps,hp.os.linux
Subject: Re: GCC Cross Compiling
Date: Mon, 2 Aug 1999 15:51:28 -0700
This would be very difficult. The languages are constructed differently,
possess different architectures and assumptions, and do not share the same
paradigms (sorry for the buzzword).
--
Paul Lutus
www.arachnoid.com
Matt Zinkevicius <[EMAIL PROTECTED]> wrote in message
news:7o56c0$6hv$[EMAIL PROTECTED]...
> Hi,
> Our team would like to build a verison of GCC that cross-compiles
> to x86 linux hosted on x86 Windows NT. Has anyone tried this? Anything
> I should be aware of? Is it even possible?
>
> Thanks for any help you can lend!
> --Matt Zinkevicius
>
>
------------------------------
Subject: Re: g++
From: Johan Kullstam <[EMAIL PROTECTED]>
Date: 02 Aug 1999 19:09:31 -0400
Billy Donahue <[EMAIL PROTECTED]> writes:
> Eric Hegstrom wrote:
> >
> > try
> > ./a.out
> >
> > (you need to have the current directory set up in your path to type just
> > a.out -- there are some security issues with having "." in your path if
> > you are root. Remember "." is your current directory.
>
> It's not just bad if you're root...
> You should NEVER put . in your path.
> I could put a script called 'ls' in my directory that
> looks and feels just like the real 'ls', but
> won't reveal itself, and maybe makes a program
> somewhere setuid to you (since my 'ls' runs as you).
> Then I can do whatever I want to any of your files
> in your directory.
> If you happen to visit my directory and type 'ls',
> then you're screwed.. I could also put my 'ls' in
> /tmp, and if you 'cd /tmp' and 'ls', you're doomed.
i am not likely to visit your directory. you see, i am the only user
on this machine.
--
J o h a n K u l l s t a m
[[EMAIL PROTECTED]]
Don't Fear the Penguin!
------------------------------
From: "Matt Zinkevicius" <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c++,comp.os.linux.development.apps,hp.os.linux
Subject: GCC Cross Compiling
Date: Mon, 2 Aug 1999 16:34:05 -0600
Hi,
Our team would like to build a verison of GCC that cross-compiles
to x86 linux hosted on x86 Windows NT. Has anyone tried this? Anything
I should be aware of? Is it even possible?
Thanks for any help you can lend!
--Matt Zinkevicius
------------------------------
From: Steve Simons <[EMAIL PROTECTED]>
Subject: gcc and default include and lib dirs
Date: Mon, 02 Aug 1999 23:06:40 GMT
Relatively new to using gcc, and I have a bunch of apps that required
the g++-compat-devel-2.7.2.3 libraries to compile. Installed it and the
apps compile correctly, but I couldn't find in the gcc docs how to set
it so I don't have to include a ' -I/usr/include/g++-2723 ' everytime I
compile code. Isn't there an environment variable or file containing the
includes and library dir paths that I can just add additional search
paths without having to stating it everytime?
--
Steve Simons "Yeah, I can do that"
[EMAIL PROTECTED]
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
From: "Dan Miller" <[EMAIL PROTECTED]>
Subject: handling modem input
Date: Mon, 2 Aug 1999 16:40:53 -0700
I want to write a small utility that will recognize when an incoming
connection
is received, and deal with it. I suppose, ultimately, I just want to spawn
a
login session and hand them off to it. I have a couple of questions for
the group:
1. Do I need to do anything besides open /dev/ttyS1 and sleep on read() ??
2. Are there any fairly simple utilities out there that already deal with
this??
I've been looking at the minicom source code, and will continue to do so,
but there's SO MUCH there that isn't relevant to my task, that I'm having
trouble filtering out just the needed parts.
I would be grateful for any assistance that anyone could provide with
this...
Dan Miller
------------------------------
From: Gary Lawrence Murphy <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux.caldera,comp.os.linux.networking,comp.os.linux.security
Subject: Re: Web Based Linux Management
Date: 02 Aug 1999 19:46:08 -0400
Reply-To: [EMAIL PROTECTED]
there are also several X servers for Win/NT. A search should suss
them out.
--
Gary Lawrence Murphy <[EMAIL PROTECTED]> TeleDynamics Communications Inc
Business Telecom Services : Internet Consulting : http://www.teledyn.com
Linux/GNU Education Group: http://www.egroups.com/group/linux-education/
"Computers are useless. They can only give you answers."(Pablo Picasso)
------------------------------
From: Ann Chen <[EMAIL PROTECTED]>
Subject: address?
Date: Mon, 2 Aug 1999 17:48:51 -0500
We are trying to find out where does the Linux operating system reside??
Does it live on the lower half of the memory, or the upper half? And how
big is the Linux kernel (how much memory does it occupy?)
We appreciate any help that we can get.
thanks,
Ann
------------------------------
From: "Marc Marais" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.security
Subject: Tripwire build problems
Date: Mon, 2 Aug 1999 16:38:10 -0700
Hello,
I'm having trouble running V1.2 of tripwire on Linux.
I compiled the tripwire executables from the V1.2 source distribution under
the following environment:
(Based on debian installation, but updated e.g.kernel, libc5->libc6)
Linux 2.2.6
Gcc 2.7.2.3
Flex 2.5.4
Bison 1.25
libc6
glibc 2.0.7.19981211-6
I keep getting segmentation faults in malloc() calls which are called from
system calls like ctime and fdopen / fdup. This is very strange. I haven't
had problems building other distributions before and I've build quite a few
on my system like apache, mod_ssl, sshd, mysql, mod_php etc. etc. no
problems.
I would appreciate any help you can give me.
Thanks
Marc
========
Problem #1: make test fails:
=== test.update.sh: testing CHANGED files ===
=== test.update.sh: test FAILED! (expecting 8, got 0) ===
=== (/tmp/TWLOG contains output from test script and Tripwire) ===
make[1]: *** [OKEXER] Error 1
Problem #2: Segmentation faults.
I get segmentation faults at various points in the tripwire executable
during a db init (tripwire -init). The faults always occur at a malloc
(determined by running app in gdb).
Instance 1:
(gdb) run
Starting program: /usr/src/tripwire-1.2/src/tripwire -init
### Phase 1: Reading configuration file
### Phase 2: Generating file list
### Phase 3: Creating file information database
Program received signal SIGSEGV, Segmentation fault.
0x4004d1e0 in malloc ()
(gdb) bt
#0 0x4004d1e0 in malloc ()
#1 0x4004d0f5 in malloc ()
#2 0x40047fac in fopen ()
#3 0x4006728e in __tzfile_read ()
#4 0x400661b3 in __tzstring ()
#5 0x40066f8c in __tz_convert ()
#6 0x40063882 in localtime ()
#7 0x40063759 in ctime ()
#8 0x804ca3f in database_build (pp_list=0x806845c, mode=0,
pp_entry_list=0xbfffebf4)
at dbase.build.c:247
#9 0x804af14 in main (argc=2, argv=0xbffffd74) at main.c:535
Instance 2:
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/src/tripwire-1.2/src/tripwire -init
### Phase 1: Reading configuration file
### Phase 2: Generating file list
### Phase 3: Creating file information database
Program received signal SIGSEGV, Segmentation fault.
0x4004d1e0 in malloc ()
(gdb) bt
#0 0x4004d1e0 in malloc ()
#1 0x4004d0f5 in malloc ()
#2 0x40047d38 in fdopen ()
#3 0x8055f62 in sig_md5_get (fd_in=9, ps_signature=0xbfffc30c "",
siglen=200) at md5wrapper.c:67
#4 0x804d24c in database_record_write (fpw=0x80746c8, filename=0xbfffd438
"/etc/init.d/atd",
flags=0, ignorevec=0xbfffd238 "001.10", statbuf=0xbfffdc38, entrynum=0)
at dbase.build.c:513
#5 0x804cd0c in database_build (pp_list=0x806843c, mode=0,
pp_entry_list=0xbfffebf4)
at dbase.build.c:329
#6 0x804af14 in main (argc=2, argv=0xbffffd74) at main.c:535
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware
Subject: Re: NCR 53C710 Fast SCSI-2 Controller
Date: Mon, 02 Aug 1999 23:12:39 GMT
In article <[EMAIL PROTECTED]>,
"Robert M. Stockmann" <[EMAIL PROTECTED]> wrote:
> Mike Coakley wrote:
> >
> > I am having trouble installing a RedHat 6.0 installation onto a
Compaq
> > Proliant 4000 with the NCR53C710 controller. The installation simply
cannot
> > find the controller and cannot continue without it. (I know I
shouldn't be
> > saying this...) I can install MS WinNT without any problems and the
> > controller is recognized and the system boots off of this
controller/HD.
> > Does anyone out there have any ideas?
> >
>
> Have a look here :
>
> http://www.sleepie.demon.co.uk/ncr53c710/index.html
>
> This is an experimental driver, but works OK on my EISA ncr710.
> The machine is a Compaq Prosignia (old EISA iron ;)
>
> Ask the maintainer for some redhat 6 bootfloppies :)
>
> I can make them too if you want, but will need to install redhat 6
> first.
> redhat 5.2 is still my favorite. (on the other hand i have a spare
> partition available)
>
> Regards
>
> Robert
> --
> ++---------------------++---------------------------------++
> || R.M. Stockmann || InfoMagic Nederland VOF ||
> || [EMAIL PROTECTED] || Unix administration & support ||
> ++---------------------++---------------------------------++
> Linux: A copylefted Unix-like operating system for several platforms :
> http://www.ctv.es/USERS/xose/linux/linux_ports.html
>
Howdy,
I have a proliant 4000 with an eisa ncr53c710 scsi built in, as well as
the smart2 scsi array. I see that Richard (from the above site) has
posted a boot disk for redhat users to install from directly. This is
fantastic! But I'm still having troubles.
When I boot from the floppy I give it the command line arguments for the
memory address and irq of the ncr card, and the memory address of the
array card. Upon booting I see that it finds the scsi array and also
finds the cdrom. Then, just before it gives me the lilo prompt, it
tells me that the command line options are incorrect and spits them back
onto the console. That's odd because if I leave those command line
options off, it doesn't find the card. If I put them in, it finds the
card successfully, but tells me that the options were ignored. (??)
Anyway, I attempt to install from the CDROM. I see the light flicker on
the CDROM drive, then redhat tells me "The device you specified doesn't
seem to contain a redhat cdrom" and exits.
Does anybody have suggestions for me? This is a four-proc box and I'm
anxious to tinker with linux's SMP capabilities :-)
Thank you,
Aaron
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
** 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
******************************