Re: libmono-2-0.a in libmono-dev CentOS package?

Eugene Kobrinsky <[email protected]>
Newsgroups gmane.comp.gnome.mono.general
Message-ID <BLUPR04MB3237DE86B74F51E5CD0BE61B5AF0@BLUPR04MB323.namprd04.prod.outlook.com>
So glad someone responded! 

Good question. We are using Docker to run a microservices architecture for our app. As such, we are dealing with a lot of docker containers, each running a very small mono app (service). 

Right now we have a full blown CentOS instance and mono runtime in each container, which bloats the container size to 160mb+. Our goal is to run a small container with minimal OS (options: BusyBox or Alpine https://github.com/gliderlabs/docker-alpine) which would bring down our container size to 20mb-40mb. 

Installing mono-runtime on these micro containers is a pain, and bloats them by the time all the dependencies get added. Ideally, we build our executable (with mono statically embedded) on our primary dev instance (CentOS) and drop it inside the container. 

Here is an example of a guy doing it, except he makes the static bundle on Debian http://www.onegeek.com.au/articles/a-nancy-net-microservice-running-on-docker-in-under-20mb.

Is the mono package mailing list more appropriate for this question? It seems like an oversite given there is a tool (mkbundle) that uses those static libraries. 

Thanks,

Eugene

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Timotheus Pokorra
Sent: Thursday, February 18, 2016 12:40 AM
To: [email protected]
Subject: Re: [Mono-list] libmono-2-0.a in libmono-dev CentOS package?

Hello Eugene,

> The static mono library (libmono-2.0.a) doesn’t appear in any package 
> on the official mono CentOS (download.mono-project.com/repo/centos). 
> This prevents us from using mkbundle –static in our CentOS 
> environments. Is this on purpose or are we just missing something? 
> Also, what’s the recommended work around other than switching to Debian or Ubuntu?

see the source of the rpm file:
https://github.com/mono/linux-packaging-mono/blob/centos/mono-core.spec#L189

# remove .a files for libraries that are really only for us rm -f %{buildroot}%{_libdir}/libMonoPosixHelper.a
rm -f %{buildroot}%{_libdir}/libikvm-native.a
rm -f %{buildroot}%{_libdir}/libmono-llvm.a
rm -f %{buildroot}%{_libdir}/libmono-2.0.a
rm -f %{buildroot}%{_libdir}/libmonoboehm-2.0.a
rm -f %{buildroot}%{_libdir}/libmonosgen-2.0.a

I just checked, we do the same for the Mono packages for Fedora:
http://pkgs.fedoraproject.org/cgit/rpms/mono.git/tree/mono.spec#n316

I have not used mkbundle before, and I don't know what "libraries that are really only for us" means.

Would it not be better to just require a dependancy on Mono in your application instead of using mkbundle?

All the best,
  Timotheus
_______________________________________________
Mono-list maillist  -  [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.