supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Re: Cross compiling for VIA C3?
@ 2004-11-24  0:58 yoppo
  2004-11-24  9:15 ` Rafal Bisingier
  2005-04-28  3:44 ` Charlie Brady
  0 siblings, 2 replies; 10+ messages in thread
From: yoppo @ 2004-11-24  0:58 UTC (permalink / raw)


>>>> Is it possible to cross-compile runit for VIA C3 system? If yes then how?
>>>> If I compile it normally on my athlon machine it doesn't work at all in 
>>> my NAT-machine (VIA).
>>> afair via c3 lack of cmov, what produce 'some' problems when 
>>> crosscompiling, what optimizations are you using?
>> The latest try was with -O2 -march=i586 -mcpu=i586 don't know if Iam 
>> missing something, but it seems like it could not be cross compiled just 
>> changing the optimizations.
>> 
>> Now after studying the compile process it seems like it makes some kind 
>> of testing on compile time but I dont have any clues how to "hack" the 
>> compile process so it would work in the VIA C3. And because I have only 
>
> Yes, the runit package's build process (just as the daemontools' one)
> includes some tests to configure system dependencies.  This includes
> three runtime tests where a test program is compiled, linked, and then
> run.  These runtime tests obviously won't work when cross-compiling.
>
> More precisely it's the targets hasshsgr.h:, iopause.h:, and uint64.h:,
> in the Makefile which test setgroups(), poll(), and the size of uint64,
> to select *.h1 or *.h2 respectively.  You can compile and link the test
> programs, and then run them on the target device to check the exit code
> and choose the correct header.
>
>> 64Mb Usb drive as a "hard drive" on that VIA I can't even test compiling 
>> the runit directly there to see if it works when not cross compiling and 
>> what the compile process does when compiling on that platform.
>
> A nfs mount could help.
>
> HTH, Gerrit.

I compiled the package now on i586 machine and the runit works fine on 
VIA. Too bad that I don't allways have this possibility so I still need 
to get the cross compiling to work. I compared the choices which was 
made during compiling and all of them are the same as on my athlon 
machine so they can't be causing the problems.

When I tried the "cross compiled" binaries only the runit-init seems to 
fail with illegal instruction other binaries works. Right now I don't 
have a clue what to try next...



__
Hanki uusi täysin ilmainen netti.fi-sähköposti, jopa 10 Mt tilaa viesteillesi!
http://webmail.saunalahti.fi/



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cross compiling for VIA C3?
  2004-11-24  0:58 Cross compiling for VIA C3? yoppo
@ 2004-11-24  9:15 ` Rafal Bisingier
  2005-04-28  3:44 ` Charlie Brady
  1 sibling, 0 replies; 10+ messages in thread
From: Rafal Bisingier @ 2004-11-24  9:15 UTC (permalink / raw)


On Wed, Nov 24, 2004 at 02:58:46AM +0200, yoppo@jippii.fi wrote:
> 
> I compiled the package now on i586 machine and the runit works fine on 
> VIA. Too bad that I don't allways have this possibility so I still need 
> to get the cross compiling to work. I compared the choices which was 
> made during compiling and all of them are the same as on my athlon 
> machine so they can't be causing the problems.
> 
> When I tried the "cross compiled" binaries only the runit-init seems to 
> fail with illegal instruction other binaries works. Right now I don't 
> have a clue what to try next...

Maybe that's silly, but have you used gcc made for target arch for
cross-compiling?
I don't know how it is on your platform, but on my Linux when I want to
cross-compile for another arch I need to use <arch>-gcc instead of
standard gcc made for my arch (of course this <arch>-gcc must be build
as a cross-compiler, it can't be just a link to gcc).
So maybe you aren't using the right version of gcc for
cross-compilation?

-- 
Greetings
Rafal Bisingier


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cross compiling for VIA C3?
  2004-11-24  0:58 Cross compiling for VIA C3? yoppo
  2004-11-24  9:15 ` Rafal Bisingier
@ 2005-04-28  3:44 ` Charlie Brady
  1 sibling, 0 replies; 10+ messages in thread
From: Charlie Brady @ 2005-04-28  3:44 UTC (permalink / raw)
  Cc: supervision


On Wed, 24 Nov 2004 yoppo@jippii.fi wrote:

> When I tried the "cross compiled" binaries only the runit-init seems to fail 
> with illegal instruction other binaries works. Right now I don't have a clue 
> what to try next...

Do you have a standard kernel?  Vincent Danen reported problems with 
runit-init (I think) when running with a kernel with various security 
pathces applied.

---
Charlie


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cross compiling for VIA C3?
  2004-11-19 23:44 yoppo
  2004-11-22 15:08 ` Gerrit Pape
@ 2005-04-28  3:42 ` Charlie Brady
  1 sibling, 0 replies; 10+ messages in thread
From: Charlie Brady @ 2005-04-28  3:42 UTC (permalink / raw)
  Cc: supervision


On Sat, 20 Nov 2004 yoppo@jippii.fi wrote:

>>> Is it possible to cross-compile runit for VIA C3 system? If yes then 
>>> how?
>>> 
>>> If I compile it normally on my athlon machine it doesn't work at all 
>>> in my NAT-machine (VIA).
>> 
>> afair via c3 lack of cmov, what produce 'some' problems when 
>> crosscompiling, what optimizations are you using?

You're not really cross compiling in the classical sense when compiling on 
an athlon for a via c3 target. They're both 100% i386 compatible, as I 
understand it. Certainly the types of compile/link/run tests that the 
build system does to determine available OS features will provide the 
correct answers, so that part of the cross-compilation puzzle isn't an 
issue.

> The latest try was with -O2 -march=i586 -mcpu=i586 don't know if Iam missing 
> something, but it seems like it could not be cross compiled just changing the 
> optimizations.
>
> Now after studying the compile process it seems like it makes some kind of 
> testing on compile time but I dont have any clues how to "hack" the compile 
> process so it would work in the VIA C3.

I don't think you need to. Just set the compile options correctly to get 
the right instruction set to be used.

What runtime problems do you have when you try to execute the binaries 
compiled under athlon on the c3?

---
Charlie


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cross compiling for VIA C3?
  2004-11-22 15:08 ` Gerrit Pape
@ 2004-12-01  5:17   ` Charlie Brady
  0 siblings, 0 replies; 10+ messages in thread
From: Charlie Brady @ 2004-12-01  5:17 UTC (permalink / raw)



On Mon, 22 Nov 2004, Gerrit Pape wrote:

> Yes, the runit package's build process (just as the daemontools' one)
> includes some tests to configure system dependencies.  This includes
> three runtime tests where a test program is compiled, linked, and then
> run.  These runtime tests obviously won't work when cross-compiling.
> 
> More precisely it's the targets hasshsgr.h:, iopause.h:, and uint64.h:,
> in the Makefile which test setgroups(), poll(), and the size of uint64,
> to select *.h1 or *.h2 respectively.  You can compile and link the test
> programs, and then run them on the target device to check the exit code
> and choose the correct header.

Once you learn (or guess) the correct header files to use, you can fully 
script the build process. The only trick is creating the required header 
files at the right time. Here is my build script for a cross-compile of 
runit (for mipsel linux on i386):

make clean
echo $GCC -O -Wall > conf-cc
echo $GCC -s > conf-ld
make compile load choose
cat iopause.h1 > iopause.h
cat uint64.h1 > uint64.h
make chkshsgr
cat hasshsgr.h1 > hasshsgr.h
make



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cross compiling for VIA C3?
@ 2004-11-24 11:24 yoppo
  0 siblings, 0 replies; 10+ messages in thread
From: yoppo @ 2004-11-24 11:24 UTC (permalink / raw)


>> I compiled the package now on i586 machine and the runit works fine on 
>> VIA. Too bad that I don't allways have this possibility so I still need 
>> to get the cross compiling to work. I compared the choices which was 
>> made during compiling and all of them are the same as on my athlon 
>> machine so they can't be causing the problems.
>> 
>> When I tried the "cross compiled" binaries only the runit-init seems to 
>> fail with illegal instruction other binaries works. Right now I don't 
>> have a clue what to try next...
>
> Maybe that's silly, but have you used gcc made for target arch for
> cross-compiling?
> I don't know how it is on your platform, but on my Linux when I want to
> cross-compile for another arch I need to use <arch>-gcc instead of
> standard gcc made for my arch (of course this <arch>-gcc must be build
> as a cross-compiler, it can't be just a link to gcc).
> So maybe you aren't using the right version of gcc for
> cross-compilation?
>
> -- 
> Greetings
> Rafal Bisingier

I'm no gcc expert so hard to say if it's silly or no, but all the other 
packages I cross compiled works OK so I think that the gcc I'm using 
shouldn't be the one causing this problem. But I can't be sure so I 
think I must try to look into this too just in case...

__
Hanki uusi täysin ilmainen netti.fi-sähköposti, jopa 10 Mt tilaa viesteillesi!
http://webmail.saunalahti.fi/



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cross compiling for VIA C3?
  2004-11-19 23:44 yoppo
@ 2004-11-22 15:08 ` Gerrit Pape
  2004-12-01  5:17   ` Charlie Brady
  2005-04-28  3:42 ` Charlie Brady
  1 sibling, 1 reply; 10+ messages in thread
From: Gerrit Pape @ 2004-11-22 15:08 UTC (permalink / raw)


On Sat, Nov 20, 2004 at 01:44:07AM +0200, yoppo@jippii.fi wrote:
> >> Is it possible to cross-compile runit for VIA C3 system? If yes then how?
> >> If I compile it normally on my athlon machine it doesn't work at all in 
> >> my NAT-machine (VIA).
> >afair via c3 lack of cmov, what produce 'some' problems when 
> >crosscompiling, what optimizations are you using?
> The latest try was with -O2 -march=i586 -mcpu=i586 don't know if Iam 
> missing something, but it seems like it could not be cross compiled just 
> changing the optimizations.
> 
> Now after studying the compile process it seems like it makes some kind 
> of testing on compile time but I dont have any clues how to "hack" the 
> compile process so it would work in the VIA C3. And because I have only 

Yes, the runit package's build process (just as the daemontools' one)
includes some tests to configure system dependencies.  This includes
three runtime tests where a test program is compiled, linked, and then
run.  These runtime tests obviously won't work when cross-compiling.

More precisely it's the targets hasshsgr.h:, iopause.h:, and uint64.h:,
in the Makefile which test setgroups(), poll(), and the size of uint64,
to select *.h1 or *.h2 respectively.  You can compile and link the test
programs, and then run them on the target device to check the exit code
and choose the correct header.

> 64Mb Usb drive as a "hard drive" on that VIA I can't even test compiling 
> the runit directly there to see if it works when not cross compiling and 
> what the compile process does when compiling on that platform.

A nfs mount could help.

HTH, Gerrit.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cross compiling for VIA C3?
@ 2004-11-19 23:44 yoppo
  2004-11-22 15:08 ` Gerrit Pape
  2005-04-28  3:42 ` Charlie Brady
  0 siblings, 2 replies; 10+ messages in thread
From: yoppo @ 2004-11-19 23:44 UTC (permalink / raw)


> > Is it possible to cross-compile runit for VIA C3 system? If yes then how?
> > 
> > If I compile it normally on my athlon machine it doesn't work at all in 
> > my NAT-machine (VIA).
> 
> afair via c3 lack of cmov, what produce 'some' problems when 
> crosscompiling, what optimizations are you using?
> 
> Alejandro

The latest try was with -O2 -march=i586 -mcpu=i586 don't know if Iam 
missing something, but it seems like it could not be cross compiled just 
changing the optimizations.

Now after studying the compile process it seems like it makes some kind 
of testing on compile time but I dont have any clues how to "hack" the 
compile process so it would work in the VIA C3. And because I have only 
64Mb Usb drive as a "hard drive" on that VIA I can't even test compiling 
the runit directly there to see if it works when not cross compiling and 
what the compile process does when compiling on that platform.


__
Hanki uusi täysin ilmainen netti.fi-sähköposti, jopa 10 Mt tilaa viesteillesi!
http://webmail.saunalahti.fi/



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Cross compiling for VIA C3?
  2004-11-19  2:29 yoppo
@ 2004-11-19 14:19 ` Alejandro Mery
  0 siblings, 0 replies; 10+ messages in thread
From: Alejandro Mery @ 2004-11-19 14:19 UTC (permalink / raw)
  Cc: supervision

> Is it possible to cross-compile runit for VIA C3 system? If yes then how?
> 
> If I compile it normally on my athlon machine it doesn't work at all in 
> my NAT-machine (VIA).

afair via c3 lack of cmov, what produce 'some' problems when 
crosscompiling, what optimizations are you using?

Alejandro


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Cross compiling for VIA C3?
@ 2004-11-19  2:29 yoppo
  2004-11-19 14:19 ` Alejandro Mery
  0 siblings, 1 reply; 10+ messages in thread
From: yoppo @ 2004-11-19  2:29 UTC (permalink / raw)


Hi!

Is it possible to cross-compile runit for VIA C3 system? 
If yes then how?

If I compile it normally on my athlon machine it doesn't 
work at all in my NAT-machine (VIA).

Thanks in advance.
-- 

__
Hanki uusi täysin ilmainen netti.fi-sähköposti, jopa 10 Mt tilaa viesteillesi!
http://webmail.saunalahti.fi/



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-04-28  3:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-24  0:58 Cross compiling for VIA C3? yoppo
2004-11-24  9:15 ` Rafal Bisingier
2005-04-28  3:44 ` Charlie Brady
  -- strict thread matches above, loose matches on Subject: below --
2004-11-24 11:24 yoppo
2004-11-19 23:44 yoppo
2004-11-22 15:08 ` Gerrit Pape
2004-12-01  5:17   ` Charlie Brady
2005-04-28  3:42 ` Charlie Brady
2004-11-19  2:29 yoppo
2004-11-19 14:19 ` Alejandro Mery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).