xsp-2.10.2-r2 fails to configure due to missing gmcs
Hi,
xsp fails to install on mono-4.0.1.34 because the gmcs script does not exist in /usr/bin. The workaround is to add a GMCS-variable to the configure script (see patch below).
diff --git a/dev-dotnet/xsp/xsp-2.10.2-r3.ebuild b/dev-dotnet/xsp/xsp-2.10.2-r3.ebuild
index c6f8734..4d6482d 100644
--- a/dev-dotnet/xsp/xsp-2.10.2-r3.ebuild
+++ b/dev-dotnet/xsp/xsp-2.10.2-r3.ebuild
@@ -28,6 +28,10 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-2.10.2-endrequest.patch"
}
+src_configure() {
+ econf GMCS=/usr/bin/mcs
+}
+
* Package: dev-dotnet/xsp-2.10.2-r3
* Repository: dotnet
* Maintainer: [email protected]
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux net45 userland_GNU
* FEATURES: preserve-libs sandbox userpriv usersandbox
* -- USING .NET 4.5 FRAMEWORK --
* Applying xsp-2.10.2-endrequest.patch ...
[ ok ]
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... (cached) gawk
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for x86_64-pc-linux-gnu-pkg-config... /usr/bin/x86_64-pc-linux-gnu-pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for MONO_MODULE... yes
checking for gmcs... no
configure: error: You need to install 'gmcs'
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-dotnet/xsp-2.10.2-r3/work/xsp-2.10.2/config.log
* ERROR: dev-dotnet/xsp-2.10.2-r3::dotnet failed (configure phase):
* econf failed
*
* Call stack:
* ebuild.sh, line 93: Called src_configure
* environment, line 2606: Called base_src_configure
* environment, line 354: Called econf
* phase-helpers.sh, line 662: Called __helpers_die 'econf failed'
* isolated-functions.sh, line 117: Called die
* The specific snippet of code:
* die "$@"
*
* If you need support, post the output of `emerge --info '=dev-dotnet/xsp-2.10.2-r3::dotnet'`,
* the complete build log and the output of `emerge -pqv '=dev-dotnet/xsp-2.10.2-r3::dotnet'`.
* The complete build log is located at '/var/tmp/portage/dev-dotnet/xsp-2.10.2-r3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-dotnet/xsp-2.10.2-r3/temp/environment'.
* Working directory: '/var/tmp/portage/dev-dotnet/xsp-2.10.2-r3/work/xsp-2.10.2'
* S: '/var/tmp/portage/dev-dotnet/xsp-2.10.2-r3/work/xsp-2.10.2'
will build with mono 3.x work with econf GMCS=/usr/bin/mcs ? if so it's possible just to add it to ebuild but maybe something is wrong with mono 4 there... same about previous issue
referencing https://github.com/gentoo/dotnet/issues/29
dev-dotnet/notify-sharp-0.4.0_pre20090305 from the gentoo tree also fails with this issue, btw
see also https://github.com/gentoo/dotnet/issues/92#issuecomment-127455341
https://github.com/mono/xsp/commit/e272a2c006211b6b03be2ef5bbb9e3f8fefd0768
also sqlite dependency is wrong - https://bugzilla.xamarin.com/show_bug.cgi?id=28502
see also http://www.monobrasil.com.br/docs/faq/aspnet/ you need to create a ~/App_Data/aspnetdb.sqlite SQLite database file. You can use the sqlite3 program and the SQL commands at Membership/Roles/Profile provider schema:
$ sqlite3 aspnetdb.sqlite sqlite> CREATE TABLE Users ( -- etc., from above link page );
Once you’ve created the ~/App_Data/apsnetdb.sqlite file, restart your ASP.NET app and things should Just Work (wrt MembershipProvider, anyway).
Why should I install sqlite, if I have postgresql already? But dependency of sqlite is hardcoded into ebuild - https://github.com/gentoo/gentoo/blob/ddd9fa7b84508e222a59e23121227863c647ce21/www-servers/xsp/xsp-2014.12-r2014120900.ebuild#L24
And by default it have "Build SQLite samples: no" !!!
xsp-3.0
Build Environment
Install prefix: /usr/local
Datadir: /usr/local/share
Libdir: /usr/local/lib
Build documentation: yes
Mono compiler: /usr/bin/dmcs
Target frameworks: .NET 4.5
Build SQLite samples: no
gmcs is fixed by symlinking mcs to /usr/bin/gmcs
after that, it will complain about missing dotnet assemblies. this is because gentoo has the -api suffix in mono folders. this is fixed by appending -api to /mono/2.0 and /mono/4.0 in the configure scripts.
full steps to successfully build xsp:
su
ln -s mcs /usr/bin/gmcs
ebuild /usr/portage/dev-dotnet/xsp/xsp-2.10.2-r2.ebuild fetch
ebuild /usr/portage/dev-dotnet/xsp/xsp-2.10.2-r2.ebuild unpack
cd /var/tmp/portage/dev-dotnet/xsp-2.10.2-r2/work/xsp-2.10.2
sed -i 's|\(/mono/2.0\)|\1-api|' configure
sed -i 's|\(/mono/4.0\)|\1-api|' configure
ebuild /usr/portage/dev-dotnet/xsp/xsp-2.10.2-r2.ebuild compile
ebuild /usr/portage/dev-dotnet/xsp/xsp-2.10.2-r2.ebuild install
ebuild /usr/portage/dev-dotnet/xsp/xsp-2.10.2-r2.ebuild qmerge
Thanks Francesco, I was stuck after fixing the gmcs and was hoping for a e-build fix but it seems like it never happened. Your 'sed' instructions did the trick and have built XSP.