Could not find msbuild when compiling fsharp

Before trying to compile the latest fsharp code, I compiled and installed mono-5.0.1 on a RedHat Enterprise 7 distribution running on Linux on Z.

mono --version
Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Fri Jul 28 08:35:19 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
   TLS:           __thread
   SIGSEGV:       normal
   Notifications: epoll
   Architecture:  s390x
   Disabled:      none
   Misc:          softdebug 
   GC:            sgen (concurrent by default)

      

I installed mono in / usr / local. Before trying to run autogen.sh, I previously exported the following envars:

export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export PKG_CONFIG_LIBDIR=/usr/local/lib/pkgconfig

      

When I try to run autogen.sh I get the following errors:

./autogen.sh --prefix=/usr/local
checking whether make sets $(MAKE)... yes
checking for pkg-config... /bin/pkg-config
configure: "pkg-config: /bin/pkg-config"
configure: "PKG_CONFIG_LIBDIR: /usr/local/lib/pkgconfig"
checking for msbuild... no
configure: error: Could not find msbuild

      

I have checked the extraction of the mono-5.0.1 tar file I have and I don't see a link to msbuild. Is there a way to overcome the lack of msbuild in mono so that I can build fsharp and work? I got the later version of mono, so it should be there. Any thoughts or suggestions are appreciated.

I tried following the suggestion to get the mono branch with msbuild included in it and I got the following errors:

#  ./cibuild.sh --target Mono  
** Using mono from /usr/local/bin/mono  
Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Fri Jul 28 08:35:19 EDT 2017)  
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com  
    TLS:           __thread  
    SIGSEGV:       normal  
    Notifications: epoll  
    Architecture:  s390x  
    Disabled:      none  
    Misc:          softdebug  
    GC:            sgen (concurrent by default)  
** Downloading MSBUILD from https://github.com/Microsoft/msbuild/releases/download/mono-hosted-msbuild-v0.03/mono_msbuild_d25dd923839404bd64cc63f420e75acf96fc75c4.zip  
Installing dotnet cli...  
Restoring BuildTools version 1.0.27-prerelease-00927-05...  
/home/xxx/Downloads/msbuild-d15.3/init-tools.sh: line 116: /home/xxx/Downloads/msbuild-d15.3/Tools/dotnetcli/dotnet: cannot execute binary file  
ERROR: Could not restore build tools correctly. See '/home/xxx/Downloads/msbuild-d15.3/init-tools.log' for more details.  
============= /home/xxx/Downloads/msbuild-d15.3/init-tools.log ===========  
Running: /home/xxx/Downloads/msbuild-d15.3/init-tools.sh  
Installing 'https://dotnetcli.blob.core.windows.net/dotnet/Sdk/1.0.0-preview3-003686/dotnet-dev-rhel-x64.1.0.0-preview3-003686.tar.gz' to '/home/xxx/Downloads/msbuild-d15.3/Tools/dotnetcli/dotnet.tar'  
Running: /home/xxx/Downloads/msbuild-d15.3/Tools/dotnetcli/dotnet restore "/home/xxx/Downloads/msbuild-d15.3/Tools/1.0.27-prerelease-00927-05/project.json" --no-cache --packages /home/xxx/Downloads/msbuild-d15.3/packages --source https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json --legacy-packages-directory  
============= end of /home/xxx/Downloads/msbuild-d15.3/init-tools.log ===========  
Initializing BuildTools...  
/home/xxx/Downloads/msbuild-d15.3/init-tools.sh: line 127: /home/xxx/Downloads/msbuild-d15.3/packages/Microsoft.DotNet.BuildTools/1.0.27-prerelease-00927-05/lib/init-tools.sh: No such file or directory  
ERROR: An error occured when trying to initialize the tools. Please check '/home/xxx/Downloads/msbuild-d15.3/init-tools.log' for more details.1  
# ls -l /home/xxx/Downloads/msbuild-d15.3/init-tools.log  
-rw-r--r--. 1 root root 880 Jul 31 08:16 /home/xxx/Downloads/msbuild-d15.3/init-tools.log  
# ls -l /home/xxx/Downloads/msbuild-d15.3/Tools/dotnetcli/dotnet
-rwxr-xr-x. 1 root root 128766 Jun 15  2016 /home/xxx/Downloads/msbuild-d15.3/Tools/dotnetcli/dotnet

      

As suggested in the comments, I tried using the Mono-5.2 builds that are currently present at https://github.com/mono/mono/releases and they all fail with the following error:

if test -w /home/xxx/Downloads/mono-mono-5.2.0.213/mcs; then :; else chmod -R +w /home/xxx/Downloads/mono-mono-5.2.0.213/mcs; fi
cd /home/xxx/Downloads/mono-mono-5.2.0.213/mcs && make --no-print-directory -s NO_DIR_CHECK=1 PROFILES='binary_reference_assemblies net_4_x xbuild_12 xbuild_14         ' CC='gcc' all-profiles
mkdir -p -- build/deps
/usr/local/bin/mcs: line 2: /usr/local/bin/mono: No such file or directory
make[6]: *** [build/deps/basic-profile-check.exe] Error 127
*** Downloading bootstrap required 'monolite/1050200001'
--2017-08-01 08:03:09--  https://download.mono-project.com/monolite/monolite-1050200001-latest.tar.gz
Resolving download.mono-project.com (download.mono-project.com)... 72.21.81.200, 2606:2800:11f:17a5:191a:18d5:537:22f9
Connecting to download.mono-project.com (download.mono-project.com)|72.21.81.200|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4740059 (4.5M) [application/x-gzip]
Saving to: Γ’β‚¬ΛœSTDOUTÒ€ℒ

     0K .......... .......... .......... .......... ..........  1% 4.34M 1s
... <removed extra lines>
... <removed extra lines>
  4600K .......... .......... ........                        100% 7.54M=0.6s

2017-08-01 08:03:10 (7.54 MB/s) - written to stdout [4740059/4740059]

*** The runtime 'mono' doesn't appear to be usable.
*** Trying the 'monolite/1050200001' directory.
Creating .dep_dirs-basic...
mkdir -p -- ../../class/lib/basic/
make[8]: *** No rule to make target `../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ContentType.cs', needed by `../../class/lib/basic/mscorlib.dll'.  Stop.
make[7]: *** [do-all] Error 2
make[6]: *** [all-recursive] Error 1
make[5]: *** [all-recursive] Error 1
make[4]: *** [profile-do--basic--all] Error 2
make[3]: *** [profiles-do--all] Error 2
make[2]: *** [all-local] Error 2
make[2]: Leaving directory `/home/xxx/Downloads/mono-mono-5.2.0.213/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/xxx/Downloads/mono-mono-5.2.0.213'
make: *** [all] Error 2

      

+3


source to share





All Articles