mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] mono
@ 2011-11-14 10:16 Erwin Rol
  2011-11-14 10:35 ` Robert Schwebel
  0 siblings, 1 reply; 6+ messages in thread
From: Erwin Rol @ 2011-11-14 10:16 UTC (permalink / raw)
  To: ptxdist

Hey all,

I have been playing with mono a bit and ran into a bit more general 
problem.

mono has several scripts that call the mono binary with certain 
arguments, for example mcs.

less platform-ETH2/sysroot-host/bin/mcs
#!/bin/sh
exec /bin/mono $MONO_OPTIONS /lib/mono/2.0/mcs.exe -lib:/lib/mono/2.0 
-lib:/lib/mono/3.5 "$@"

Of course that won't work, because it will try to call /bin/mono and use 
libs from /lib/mono.

The question is how to solve this problem, because just patching the 
path will not work since on the target this would be correct and on the 
target we don't want SYSROOT/usr/bin/mono but /usr/bin/mono.

I am sure other packages had similar problems, how was it fixed in them?

Any hints are welcome.

- Erwin


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] mono
  2011-11-14 10:16 [ptxdist] mono Erwin Rol
@ 2011-11-14 10:35 ` Robert Schwebel
  2011-11-14 10:56   ` Erwin Rol
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Schwebel @ 2011-11-14 10:35 UTC (permalink / raw)
  To: ptxdist

On Mon, Nov 14, 2011 at 11:16:44AM +0100, Erwin Rol wrote:
> I have been playing with mono a bit and ran into a bit more general
> problem.
>
> mono has several scripts that call the mono binary with certain
> arguments, for example mcs.
>
> less platform-ETH2/sysroot-host/bin/mcs
> #!/bin/sh
> exec /bin/mono $MONO_OPTIONS /lib/mono/2.0/mcs.exe
> -lib:/lib/mono/2.0 -lib:/lib/mono/3.5 "$@"
>
> Of course that won't work, because it will try to call /bin/mono and
> use libs from /lib/mono.
>
> The question is how to solve this problem, because just patching the
> path will not work since on the target this would be correct and on
> the target we don't want SYSROOT/usr/bin/mono but /usr/bin/mono.
>
> I am sure other packages had similar problems, how was it fixed in them?

Do you want to run those scripts on the host? Because on the target it
should work, right?

If you have pre/post scripts, you should use $DESTDIR; we set this
variable while installing the opkg packages and it is not set on
runtime.

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] mono
  2011-11-14 10:35 ` Robert Schwebel
@ 2011-11-14 10:56   ` Erwin Rol
  2011-11-14 10:59     ` Robert Schwebel
  0 siblings, 1 reply; 6+ messages in thread
From: Erwin Rol @ 2011-11-14 10:56 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel

On 14-11-2011 11:35, Robert Schwebel wrote:
> On Mon, Nov 14, 2011 at 11:16:44AM +0100, Erwin Rol wrote:
>> I have been playing with mono a bit and ran into a bit more general
>> problem.
>>
>> mono has several scripts that call the mono binary with certain
>> arguments, for example mcs.
>>
>> less platform-ETH2/sysroot-host/bin/mcs
>> #!/bin/sh
>> exec /bin/mono $MONO_OPTIONS /lib/mono/2.0/mcs.exe
>> -lib:/lib/mono/2.0 -lib:/lib/mono/3.5 "$@"
>>
>> Of course that won't work, because it will try to call /bin/mono and
>> use libs from /lib/mono.
>>
>> The question is how to solve this problem, because just patching the
>> path will not work since on the target this would be correct and on
>> the target we don't want SYSROOT/usr/bin/mono but /usr/bin/mono.
>>
>> I am sure other packages had similar problems, how was it fixed in them?
>
> Do you want to run those scripts on the host? Because on the target it
> should work, right?

Yeah target is fine. And yes they are needed on the host to build 
libraries for the target.

> If you have pre/post scripts, you should use $DESTDIR; we set this
> variable while installing the opkg packages and it is not set on
> runtime.

Don't really understand how this will solve the problem ? The *.in 
versions of the scripts look like this. So they are created at 
"automake-time"

less mcs.in
#!/bin/sh
exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/2.0/mcs.exe 
-lib:@mono_instdir@/2.0 -lib:@mono_instdir@/3.5 "$@"

My idea was to add a $MONO_PREFIX environment variable to the scripts 
and set that in the target build .make file. On the target itself the 
MONO_PREFIX variable would be not set and the path would be /usr/bin as 
expected.

- Erwin




> rsc


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] mono
  2011-11-14 10:56   ` Erwin Rol
@ 2011-11-14 10:59     ` Robert Schwebel
  2011-11-14 11:04       ` Alexander Stein
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Schwebel @ 2011-11-14 10:59 UTC (permalink / raw)
  To: Erwin Rol; +Cc: ptxdist

On Mon, Nov 14, 2011 at 11:56:05AM +0100, Erwin Rol wrote:
> Yeah target is fine. And yes they are needed on the host to build
> libraries for the target.
> 
> >If you have pre/post scripts, you should use $DESTDIR; we set this
> >variable while installing the opkg packages and it is not set on
> >runtime.
> 
> Don't really understand how this will solve the problem ? The *.in
> versions of the scripts look like this. So they are created at
> "automake-time"
> 
> less mcs.in
> #!/bin/sh
> exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/2.0/mcs.exe
> -lib:@mono_instdir@/2.0 -lib:@mono_instdir@/3.5 "$@"
> 
> My idea was to add a $MONO_PREFIX environment variable to the
> scripts and set that in the target build .make file. On the target
> itself the MONO_PREFIX variable would be not set and the path would
> be /usr/bin as expected.

Hmm, I suppose you should discuss this with the Mono developers. I mean,
if they agree on an acceptable solution, we can patch it into ptxdist.

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] mono
  2011-11-14 10:59     ` Robert Schwebel
@ 2011-11-14 11:04       ` Alexander Stein
  2011-11-14 11:10         ` Erwin Rol
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Stein @ 2011-11-14 11:04 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel

Hello,

On Monday 14 November 2011 11:59:45 Robert Schwebel wrote:
> On Mon, Nov 14, 2011 at 11:56:05AM +0100, Erwin Rol wrote:
> > Yeah target is fine. And yes they are needed on the host to build
> > libraries for the target.
> > 
> > >If you have pre/post scripts, you should use $DESTDIR; we set this
> > >variable while installing the opkg packages and it is not set on
> > >runtime.
> > 
> > Don't really understand how this will solve the problem ? The *.in
> > versions of the scripts look like this. So they are created at
> > "automake-time"
> > 
> > less mcs.in
> > #!/bin/sh
> > exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/2.0/mcs.exe
> > -lib:@mono_instdir@/2.0 -lib:@mono_instdir@/3.5 "$@"
> > 
> > My idea was to add a $MONO_PREFIX environment variable to the
> > scripts and set that in the target build .make file. On the target
> > itself the MONO_PREFIX variable would be not set and the path would
> > be /usr/bin as expected.
> 
> Hmm, I suppose you should discuss this with the Mono developers. I mean,
> if they agree on an acceptable solution, we can patch it into ptxdist.

The build system of momo seems to beabit strange. All cross-compile 
descriptions i found for mono was to (1) build for the host and install it in 
some DESTDIR and (2) buildfor the target and install it in the _same_ DESTDIR.
To cleanly build mono for the target, there should be some host-mono.

Regards,
Alexander

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] mono
  2011-11-14 11:04       ` Alexander Stein
@ 2011-11-14 11:10         ` Erwin Rol
  0 siblings, 0 replies; 6+ messages in thread
From: Erwin Rol @ 2011-11-14 11:10 UTC (permalink / raw)
  To: Alexander Stein; +Cc: Robert Schwebel, ptxdist

On 14-11-2011 12:04, Alexander Stein wrote:
> Hello,
>
> On Monday 14 November 2011 11:59:45 Robert Schwebel wrote:
>> On Mon, Nov 14, 2011 at 11:56:05AM +0100, Erwin Rol wrote:
>>> Yeah target is fine. And yes they are needed on the host to build
>>> libraries for the target.
>>>
>>>> If you have pre/post scripts, you should use $DESTDIR; we set this
>>>> variable while installing the opkg packages and it is not set on
>>>> runtime.
>>>
>>> Don't really understand how this will solve the problem ? The *.in
>>> versions of the scripts look like this. So they are created at
>>> "automake-time"
>>>
>>> less mcs.in
>>> #!/bin/sh
>>> exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/2.0/mcs.exe
>>> -lib:@mono_instdir@/2.0 -lib:@mono_instdir@/3.5 "$@"
>>>
>>> My idea was to add a $MONO_PREFIX environment variable to the
>>> scripts and set that in the target build .make file. On the target
>>> itself the MONO_PREFIX variable would be not set and the path would
>>> be /usr/bin as expected.
>>
>> Hmm, I suppose you should discuss this with the Mono developers. I mean,
>> if they agree on an acceptable solution, we can patch it into ptxdist.
>
> The build system of momo seems to beabit strange. All cross-compile
> descriptions i found for mono was to (1) build for the host and install it in
> some DESTDIR and (2) buildfor the target and install it in the _same_ DESTDIR.
> To cleanly build mono for the target, there should be some host-mono.

Yep and that is what i did, I have a host-mono, that builds the compiler 
but not the runtime libraries (the ones written in C#).

Than I have a mono package that builds the target compiler and the 
runtime libaries (with use of the host-mono compiler).

Of course the weird thing is that the runtime libraries are written in 
C# and could even be compiled on Windows and still be installed on the 
target.

- Erwin











> Regards,
> Alexander


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2011-11-14 11:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-14 10:16 [ptxdist] mono Erwin Rol
2011-11-14 10:35 ` Robert Schwebel
2011-11-14 10:56   ` Erwin Rol
2011-11-14 10:59     ` Robert Schwebel
2011-11-14 11:04       ` Alexander Stein
2011-11-14 11:10         ` Erwin Rol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox