Search code examples
pythonmonosudofabricxsp

xsp configure failed due to mono dependency, and i tried all suggested fix all failed


I am installing xsp ver 3.0.11 into amazon linux on Fabric but it is not working.

The fabric code is:

with cd("/opt/%s" %(MONO_VERSION)):
    sudo("git clone https://github.com/mono/xsp")
    with cd("/opt/%s/xsp" %(MONO_VERSION)):
        sudo("git checkout %s" %(XSP_VER))
        sudo("export PKG_CONFIG_PATH=/usr/lib/pkgconfig")
        sudo("./autogen.sh --prefix=/usr")
        sudo("make")
        sudo("make install")

It gives me this error:

[52.192.80.38] sudo: export PKG_CONFIG_PATH=/usr/lib/pkgconfig
[52.192.80.38] sudo: ./autogen.sh --prefix=/usr
[52.192.80.38] out: Running aclocal -I build/m4/shamrock -I build/m4/shave ...
[52.192.80.38] out: Running autoconf ...
[52.192.80.38] out: Running automake --gnu --add-missing --force --copy ...
[52.192.80.38] out: Running ./configure --enable-maintainer-mode --prefix=/usr ...
[52.192.80.38] out: checking build system type... x86_64-unknown-linux-gnu
[52.192.80.38] out: checking host system type... x86_64-unknown-linux-gnu
[52.192.80.38] out: checking target system type... x86_64-unknown-linux-gnu
[52.192.80.38] out: checking for a BSD-compatible install... /usr/bin/install -c
[52.192.80.38] out: checking whether build environment is sane... yes
[52.192.80.38] out: checking for a thread-safe mkdir -p... /bin/mkdir -p
[52.192.80.38] out: checking for gawk... gawk
[52.192.80.38] out: checking whether make sets $(MAKE)... yes
[52.192.80.38] out: checking whether make supports nested variables... yes
[52.192.80.38] out: checking whether to enable maintainer-specific portions of Makefiles... yes
[52.192.80.38] out: checking for gawk... (cached) gawk
[52.192.80.38] out: checking for pkg-config... /usr/bin/pkg-config
[52.192.80.38] out: checking pkg-config is at least version 0.9.0... yes
[52.192.80.38] out: checking for MONO_MODULE... no
[52.192.80.38] out: configure: error: Package requirements (mono >= 2.10.0) were not met:
[52.192.80.38] out: 
[52.192.80.38] out: No package 'mono' found
[52.192.80.38] out: 
[52.192.80.38] out: Consider adjusting the PKG_CONFIG_PATH environment variable if you
[52.192.80.38] out: installed software in a non-standard prefix.
[52.192.80.38] out: 
[52.192.80.38] out: Alternatively, you may set the environment variables MONO_MODULE_CFLAGS
[52.192.80.38] out: and MONO_MODULE_LIBS to avoid the need to call pkg-config.
[52.192.80.38] out: See the pkg-config man page for more details.
[52.192.80.38] out: Error: Could not run ./configure, which is required to configure xsp

So i tried this link and it didn't work. I tried this link as well but it did not work

the mono -V output is

[52.192.80.38] run: mono -V
[52.192.80.38] out: Mono JIT compiler version 3.12.1 ((HEAD/4cb3f77 Thu Nov  5 02:37:29 UTC 2015)
[52.192.80.38] out: Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
[52.192.80.38] out:     TLS:           __thread
[52.192.80.38] out:     SIGSEGV:       altstack
[52.192.80.38] out:     Notifications: epoll
[52.192.80.38] out:     Architecture:  amd64
[52.192.80.38] out:     Disabled:      none
[52.192.80.38] out:     Misc:          softdebug 
[52.192.80.38] out:     LLVM:          supported, not enabled.
[52.192.80.38] out:     GC:            sgen

Solution

  • Ok silly me. Using sudo to set config path on fabric does not work. You have to use shell_env in order to get it to work

    with cd("/opt/%s" %(MONO_VERSION)):
            sudo("git clone https://github.com/mono/xsp")
            with cd("/opt/%s/xsp" %(MONO_VERSION)):
                sudo("git checkout %s" %(XSP_VER))
                with shell_env(PKG_CONFIG_PATH="/usr/lib/pkgconfig"):
                    sudo("./autogen.sh --prefix=/usr")
                    sudo("make")
                    sudo("make install")