[Mono-dev] "Installing" mono via copy

Jonathan Chambers joncham at gmail.com
Fri Dec 13 21:31:01 UTC 2013


You can override most of these settings by deploying a native application
that calls mono embedding APIs, or perhaps easier via environment variables.

See the man page for:

MONO_GAC_PREFIX
MONO_PATH
MONO_CFG_DIR

etc. One or more may be needed by your application.

- Jonathan


On Fri, Dec 13, 2013 at 3:07 PM, "Andrés G. Aragoneses" <knocte at gmail.com>wrote:

> If you were right, DESTDIR env var would not exist, and one would simply
> use the --prefix flag at configure time.
>
> DESTDIR is used as a prefix to the prefix, that is, if your prefix was
> /foo and you set DESTDIR to /bar, then the files go to /bar/foo, to let
> you tar them up easily from /bar/foo but still having built binaries and
> scripts that are meant to be placed in /foo.
>
> After you compress /bar/foo, then you should later untar to /foo to make
> it work, obviously. This is essentially how deb/rpm packaging works, kinda.
>
> On 13/12/13 21:02, Nikita Tsukanov wrote:
> > You should install to the _same_ prefix you configured your sources.
> > ./configure script hardcodes some paths based on prefix value and
> > compiled code will expect to find needed files there.
> >
> >
> > 2013/12/13 "Andrés G. Aragoneses" <knocte at gmail.com
> > <mailto:knocte at gmail.com>>
> >
> >     /usr/local is the default prefix if you don't supply one. This is
> >     normally the standard in most open source projects and the
> motivation of
> >     it is not to conflict with software installed by packages (which
> goes to
> >     /usr instead).
> >
> >     But given that you're in an embedded system I would just use the /usr
> >     prefix to prevent incompatibilities that normally arise when
> integrating
> >     software between /usr and /usr/local
> >
> >     So to answer your question: yes, you still need to specify the
> prefix at
> >     configure time, but define a DESTDIR at installation time.
> >
> >     Maybe this example script can clear any more doubts you have (it's
> used
> >     to create .deb packages):
> >
> >
> https://github.com/7digital/7digital-mono/blob/master/build-mono-package.bash
> >
> >     On 13/12/13 20:08, Chris Tacke wrote:
> >     > So if I make install DESTDIR /path/to/temp do I still need to
> >     install on
> >     > the target at /usr/local (te default prefix), or will “anywhere”
> work?
> >     > I assume the former, but am trying to understand.
> >     >
> >     >
> >     >
> >     > -Chris
> >     >
> >     >
> >     >
> >     >
> >     >
> >     > *From:*mono-devel-list-bounces at lists.ximian.com
> >     <mailto:mono-devel-list-bounces at lists.ximian.com>
> >     > [mailto:mono-devel-list-bounces at lists.ximian.com
> >     <mailto:mono-devel-list-bounces at lists.ximian.com>] *On Behalf Of
> *Nikita
> >     > Tsukanov
> >     > *Sent:* Friday, December 13, 2013 1:06 PM
> >     > *To:* mono-devel-list at lists.ximian.com
> >     <mailto:mono-devel-list at lists.ximian.com>
> >     > *Subject:* Re: [Mono-dev] "Installing" mono via copy
> >     >
> >     >
> >     >
> >     >
> >     >
> >     >>>- set a custom prefix (and other stuff) during configure
> >     > That's the problem. It tries to look for mscorlib at
> >     > $prefix/lib/mono/blablablah instead of /usr/lib. Instead of using
> >     custom
> >     > prefix just configure it with normal (i. e. /usr) and use make
> install
> >     > DESTDIR=/path/to/temp/dir. It will install all files to that
> >     directory,
> >     > and you'll be able to create your tarball.
> >     >
> >     >
> >     >
> >     > 2013/12/13 Chris Tacke <ctacke at opennetcf.com
> >     <mailto:ctacke at opennetcf.com> <mailto:ctacke at opennetcf.com
> >     <mailto:ctacke at opennetcf.com>>>
> >     >
> >     >     I have an embedded Linux platform on which I need to install
> Mono.
> >     >      The platform does not have any installer tools like apt or
> >     >     whatever.  I have to custom build Mono for the platform for a
> >     >     variety of reasons.
> >     >
> >     >     I am successfully building Mono from source under an Ubuntu
> >     machine.
> >     >      That works just fine.
> >     >
> >     >     The problem I'm now facing is how to "distribute" the resulting
> >     >     build.  Due to size contraints, I've compiled only the 4.5
> stuff,
> >     >     plus I've pulled out a variety of things like System.Drawing,
>  all
> >     >     of the WinForms stuff, etc.  I've also stripped the binaries.
> >     >
> >     >     What I did was:
> >     >
> >     >     - set a custom prefix (and other stuff) during configure
> >     >     - make & make install.
> >     >     - Go into the install folder and trim out stuff I don't need
> and
> >     >     strip binaries
> >     >
> >     >     So now I have a set of folders that contain Mono.  My hope was
> >     that
> >     >     I could tar these up, copy that to the destination, untar it
> >     in the
> >     >     /usr directory so that the mono bin files end up in /usr/bin,
> the
> >     >     mono lib files end up in /usr/lib etc.
> >     >
> >     >     Doing this I success if I do a mono -V.  I get version info.
> >     >      However, if I try to actually run a mono app, it complains
> about
> >     >     not finding mscorlib.dll.  It's looking in the path where I
> >     set the
> >     >     prefix back on the build machine.
> >     >
> >     >     How should I be going about doing an installation like this?
>  What
> >     >     am I missing in my process?
> >     >
> >     >     -Chris
> >     >
> >     >
> >     >
> >     >
> >     >
> >     >     _______________________________________________
> >     >     Mono-devel-list mailing list
> >     >     Mono-devel-list at lists.ximian.com
> >     <mailto:Mono-devel-list at lists.ximian.com>
> >     >     <mailto:Mono-devel-list at lists.ximian.com
> >     <mailto:Mono-devel-list at lists.ximian.com>>
> >     >     http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >     >
> >     >
> >     >
> >     >
> >     >
> >     > _______________________________________________
> >     > Mono-devel-list mailing list
> >     > Mono-devel-list at lists.ximian.com
> >     <mailto:Mono-devel-list at lists.ximian.com>
> >     > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >     >
> >
> >
> >     _______________________________________________
> >     Mono-devel-list mailing list
> >     Mono-devel-list at lists.ximian.com
> >     <mailto:Mono-devel-list at lists.ximian.com>
> >     http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> >
> >
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20131213/0e2cdd43/attachment.html>


More information about the Mono-devel-list mailing list