[Gtk-sharp-list] Trouble compiling : Command not found

Gonzalo Paniagua Javier gonzalo@ximian.com
Sat, 20 Mar 2004 14:48:27 -0500


--=-0bcTXRDRVVg1v5mG5wIH
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

El sáb, 20-03-2004 a las 06:54, Harobed escribió:
> Le sam 20/03/2004 à 11:55, Harobed a écrit :
> > Hi,
> > 
> > I would like compile gtk-sharp cvs head. I've this error :
> > 
> > cd . && autoheader
> > make  all-recursive
> > make[1]: Entering directory `/home/mono/gtk-sharp'
> > Making all in sources
> > make[2]: Entering directory `/home/mono/gtk-sharp/sources'
> > make[2]: Nothing to be done for `all'.
> > make[2]: Leaving directory `/home/mono/gtk-sharp/sources'
> > Making all in generator
> > make[2]: Entering directory `/home/mono/gtk-sharp/generator'
> > /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games /out:gapi_codegen.exe  ./AliasGen.cs ./BoxedGen.cs ./CallbackGen.cs ./ClassBase.cs ./ClassGen.cs ./CodeGenerator.cs ./ConstStringGen.cs ./Ctor.cs ./CustomMarshalerGen.cs ./EnumGen.cs ./Field.cs ./GenBase.cs ./GenerationInfo.cs ./IGeneratable.cs ./ImportSignature.cs ./InterfaceGen.cs ./ManagedCallString.cs ./ManualGen.cs ./MethodBody.cs ./Method.cs ./ObjectGen.cs ./OpaqueGen.cs ./Parameters.cs ./Parser.cs ./Property.cs ./Signal.cs ./SignalHandler.cs ./Signature.cs ./SimpleGen.cs ./Statistics.cs ./StringGen.cs ./StructBase.cs ./StructGen.cs ./SymbolTable.cs ./VMSignature.cs
> > make[2]: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games: Command not found
> > make[2]: *** [gapi_codegen.exe] Error 127
> > make[2]: Leaving directory `/home/mono/gtk-sharp/generator'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/home/mono/gtk-sharp'
> > make: *** [all-recursive-am] Error 2
> > 
> > I don't understand why it call
> > "/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" with no
> > executable file ?
> > 
> > Thanks for you help.
> 
> In my Makefile I see that :
> 
> CSC = /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
> 
> It's not normal. I don't understand why I've this declaration !

Okay, i know what happens. Review the output by configure, you'll see
something like:
-----
checking for mono... Package mono was not found in the pkg-config search
path.
Perhaps you should add the directory containing `mono.pc'
to the PKG_CONFIG_PATH environment variable
No package 'mono' found
----

Now apply the attached patch to configure.in. It will make configure
fail saying:
configure: error: You need to install either mono or .Net

If you set the PATH/PKG_CONFIG_PATH properly so that mono.pc is found by
pkg-config everything will work, but before applying this patch,
configure doesn't flag the error.

Mike, okay to apply the patch?

-Gonzalo



--=-0bcTXRDRVVg1v5mG5wIH
Content-Disposition: attachment; filename=gtk-sharp.diff
Content-Type: text/x-patch; name=gtk-sharp.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Index: configure.in
===================================================================
RCS file: /cvs/public/gtk-sharp/configure.in,v
retrieving revision 1.49
diff -u -r1.49 configure.in
--- configure.in	18 Mar 2004 20:56:32 -0000	1.49
+++ configure.in	20 Mar 2004 19:11:43 -0000
@@ -60,20 +60,26 @@
 
 if test "x$has_mono" = "xtrue"; then
 if test `uname -s` = "Darwin"; then
-	RUNTIME=`which mint`
-	CSC=`which mcs`
+	AC_PATH_PROG(RUNTIME, mint, no)
+	AC_PATH_PROG(CSC, mcs, no)
 else
-	RUNTIME=`which mono`
-	CSC=`which mcs`
+	AC_PATH_PROG(RUNTIME, mono, no)
+	AC_PATH_PROG(CSC, mcs, no)
 fi
 else
-AC_PATH_PROG(CSC, csc.exe, $PATH)
-if test x$CSC = ""; then
+AC_PATH_PROG(CSC, csc.exe, no)
+if test x$CSC = "xno"; then
 	AC_MSG_ERROR([You need to install either mono or .Net])
 else
 RUNTIME=
 fi
 fi
+
+CS="C#"
+if test "x$CSC" = "xno" ; then
+	AC_MSG_ERROR([No $CS compiler found])
+fi
+
 AC_SUBST(RUNTIME)
 AC_SUBST(CSC)
 
@@ -203,6 +209,7 @@
 echo "Configuration summary"
 echo ""
 echo "   * Installation prefix = $prefix"
+echo "   * $CS compiler: $CSC"
 echo ""
 echo "   Optional assemblies included in the build:"
 echo ""

--=-0bcTXRDRVVg1v5mG5wIH--