Can i set a symbolic link to dmcs from gmcs as my package's configure routine expects gmcs?

Asked by Derek JW Cahusac de Caux

When building a .deb package locally, on Ubuntu 11.10, Mono 2.10, Monodevelop 2.6, the only way for ./configure to work is to set a symbolic link from dmcs to gmcs so that the C# code compiles (Monodevelop cannot generate Autotools Makefiles for .NET 4.0, so I use the makefiles generated for 3.0).

When uploading the same source package for Oneiric to Launchpad, the build fails because it cannot find gmcs - so, is there anyway to setup the same symbolic link on Launchpad?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Derek JW Cahusac de Caux
Solved:
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :
#1

No, but there are other ways to do it. For example, you could build-depend on mono-gmcs, which would give you /usr/bin/gmcs as the 2.0 compiler. If you actually need a 4.0 compiler, then it would be appropriate to change your configure script (which will normally involve changing whatever it's generated from, usually configure.ac).

Revision history for this message
Derek JW Cahusac de Caux (derek-azuregulf) said :
#2

Colin, thanks for your helpful response.

Tried the build-depends on mono-gmcs and Launchpad successfully built the package - however, after installing .deb locally, it aborts with a number of runtime errors "missing method System.Type" etc...

Had the same problem with local build/install which is why I used the symbolic link to dmcs - this worked.

After resetting package to .NET 4.0 and manually editing the configure and make files to replace GMCS/gmcs with DMCS/dmcs, the next PPA upload built OK and also installed and ran OK (on AMD64 Ubuntu 11.10 - still waiting for i386 build).

So, it's a sort of Catch-22 :- Monodevelop doesn't appear to support Autotools for .Net 4.0 and Launchpad won't permit symbolic links - guess it's a 'global find & replace' for now.

I suspect that the real problem is way beyond my knowledge level at the moment, but I do appreciate your help.

Revision history for this message
Colin Watson (cjwatson) said :
#3

Another possible hack: while you don't get to make symlinks in /usr/bin
that aren't in packages you build-depend on, there's nothing to say that
you can't put a gmcs -> /usr/bin/dmcs symlink in your own package and
run the build with PATH=.:$PATH, as long as the path to gmcs isn't going
to end up baked into your output binaries ...

It's a horrible hack, of course, but possible.

Alternatively, you could have a package in your PPA or in one you depend
on that makes the symlink you want, although obviously we'd sort of
prefer you didn't lead end users to use it in case they get horribly
confused. We won't make the symlink manually in Launchpad, but you can
do pretty much whatever you like in packages you build-depend on.

Revision history for this message
Derek JW Cahusac de Caux (derek-azuregulf) said :
#4

Thanks again Colin - good feedback and glad there is a way round for now.