Re: SNDCTL_TMR_TIMEBASE or TCGETS

2008-06-19 Thread Gudjon I. Gudjonsson
Hi again
   Thanks for the advice. The problem is a tcl problem. I could get the
program running by setting up a sarge i386 chroot. Then I compiled
tcl-8.2 for that system and then the program runs happily. The solution
is more amd64 specific than the problem :)
   The function TclX_EvalRCFile seems to have disappeared from tcl8.4
without any explanation, but that is another discussion.

Cheers
Gudjon



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: SNDCTL_TMR_TIMEBASE or TCGETS

2008-06-18 Thread Gabor Gombas
On Tue, Jun 17, 2008 at 09:30:49PM +0200, Gudjon I. Gudjonsson wrote:

>The program compiles and runs in 64 bit mode but without any sensible
> output but when I run it in the chroot, I get the following output to
> strace several times and then a segmentation fault.
> 
> ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, 0xffdb6f38) = -1 ENOTTY
> (Inappropriate ioctl for device)

Depending on what exactly is the application trying to do this can be
harmless or not. What is descriptor 5? If it really is a TTY, then it
may be that the application tries to set options that the Linux terminal
emulator does not support.

As for the segfault, try running the application under valgrind. strace
is hardly the right tool for hunting down segfaults, unless you know the
internals of the application rather well.

Gabor

-- 
 -
 MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
 -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: SNDCTL_TMR_TIMEBASE or TCGETS

2008-06-18 Thread Lennart Sorensen
On Wed, Jun 18, 2008 at 09:49:16AM -0500, Stephen Olander-Waters wrote:
> On Wed, 2008-06-18 at 10:37 -0400, Lennart Sorensen wrote:
> > On Tue, Jun 17, 2008 at 09:30:49PM +0200, Gudjon I. Gudjonsson wrote:
> > > Hi
> > >I am fighting to get some code written 13 years ago in several
> > > languages to run decently on my amd64. Making it run in 64 bit mode is
> > > a far future dream but I'm hoping to fix a chroot. Currently I get most
> > > success with an etch chroot.
> > >The program compiles and runs in 64 bit mode but without any sensible
> > > output but when I run it in the chroot, I get the following output to
> > > strace several times and then a segmentation fault.
> > > 
> > > ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, 0xffdb6f38) = -1 ENOTTY
> > > (Inappropriate ioctl for device)
> > > 
> > > Since it runs in 64 bit mode I guess it has something to do with the 
> > > chroot.
> > > Has anyone seen anything similar?
> > 
> > Make sure /dev is bind mounted in your chroot, as well as proc and such.
> 
> Is this some sort of OSS vs ALSA problem? I guess make sure the ALSA OSS
> compatibility module is loaded and make sure the /dev stuff is correct,
> per Lennart.

The error is from an ioctl, which requires access to device nodes.  You
chroot doesn't have any unless you bind mounted /dev to the chroot's
/dev.

The other posibility is that you are trying to use an ioctl that isn't
legal on a 64bit kernel (some ioctl's are not compatible between 32 and
64bit unfortunately although most are).

Of course segfault means bug in the code.  All segfaults mean you failed
to handle a possibly valid situation (like malloc failure or similar),
so it's a bug worth fixing.  Spitting out an error and exiting is much
nicer than simply crashing with no useful information after all.

-- 
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: SNDCTL_TMR_TIMEBASE or TCGETS

2008-06-18 Thread Stephen Olander-Waters
On Wed, 2008-06-18 at 10:37 -0400, Lennart Sorensen wrote:
> On Tue, Jun 17, 2008 at 09:30:49PM +0200, Gudjon I. Gudjonsson wrote:
> > Hi
> >I am fighting to get some code written 13 years ago in several
> > languages to run decently on my amd64. Making it run in 64 bit mode is
> > a far future dream but I'm hoping to fix a chroot. Currently I get most
> > success with an etch chroot.
> >The program compiles and runs in 64 bit mode but without any sensible
> > output but when I run it in the chroot, I get the following output to
> > strace several times and then a segmentation fault.
> > 
> > ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, 0xffdb6f38) = -1 ENOTTY
> > (Inappropriate ioctl for device)
> > 
> > Since it runs in 64 bit mode I guess it has something to do with the chroot.
> > Has anyone seen anything similar?
> 
> Make sure /dev is bind mounted in your chroot, as well as proc and such.

Is this some sort of OSS vs ALSA problem? I guess make sure the ALSA OSS
compatibility module is loaded and make sure the /dev stuff is correct,
per Lennart.

Wild guess,
-s



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: SNDCTL_TMR_TIMEBASE or TCGETS

2008-06-18 Thread Lennart Sorensen
On Tue, Jun 17, 2008 at 09:30:49PM +0200, Gudjon I. Gudjonsson wrote:
> Hi
>I am fighting to get some code written 13 years ago in several
> languages to run decently on my amd64. Making it run in 64 bit mode is
> a far future dream but I'm hoping to fix a chroot. Currently I get most
> success with an etch chroot.
>The program compiles and runs in 64 bit mode but without any sensible
> output but when I run it in the chroot, I get the following output to
> strace several times and then a segmentation fault.
> 
> ioctl(5, SNDCTL_TMR_TIMEBASE or TCGETS, 0xffdb6f38) = -1 ENOTTY
> (Inappropriate ioctl for device)
> 
> Since it runs in 64 bit mode I guess it has something to do with the chroot.
> Has anyone seen anything similar?

Make sure /dev is bind mounted in your chroot, as well as proc and such.

-- 
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]