mono,make , mono make install fails with “Error 1”

mono make install fails with “Error 1”


Tag: mono,make

I've finally managed to get mono to build from sources, but make install invoked from the top build directory fails at the following point:

make[6]: Entering directory `/bld/mono/mono-4.0.0/mcs/class/System'
make install-local
WARNING: generic atexit() called from legacy shared library
make[7]: Entering directory `/bld/mono/mono-4.0.0/mcs/class/System'
MONO_PATH="./../../class/lib/build:$MONO_PATH" /bld/mono/mono-4.0.0/runtime/mono-wrapper ./../../class/lib/build/gacutil.exe /i ./../../class/lib/net_4_5/System.dll /f /root /usr/mono/lib /package 4.5
make[7]: *** [install-local] Error 1
make[7]: Leaving directory `/bld/mono/mono-4.0.0/mcs/class/System'
make[6]: *** [do-install] Error 2

Error 1 is the only error thrown.

I can run this command without errors

MONO_PATH="./../../class/lib/build:$MONO_PATH" /bld/mono/mono-4.0.0/runtime/mono-wrapper ./../../class/lib/build/gacutil.exe /i ./../../class/lib/net_4_5/System.dll /f /root /usr/mono/lib /package 4.5

And I can run the final command in mono-wrapper without errors

/bld/mono/mono-4.0.0 $ /bld/mono/mono-4.0.0/libtool --verbose --mode=execute "mono/mini/mono" --config "/bld/mono/mono-4.0.0/runtime/etc/mono/config" "mcs/class/lib/build/gacutil.exe" /i mcs/class/lib/net_4_5/System.dll /f /root /usr/mono/lib /package 4.5

But running 'make install' fails. Any ideas?



make --debug=V install

revealed that it was failing when attempting to execute line 197 of mcs/build/library.make, which is:

196 install-local: $(gacutil)
197         $(GACUTIL) /i $(the_lib)  /f $(gacdir_flag) /root $(GACROOT) $(package_flag)

Removing the $(package_flag) variable allowed the build to complete successfully. Caveat: I'm not sure if doing so breaks the install in other ways. Just in case...for future's the relevant entry in 'man gacutil':

       -i  <assembly_path>  [-check_refs]  [-package  NAME]  [-root   ROOTDIR]
       [-gacdir GACDIR]

        Installs  an  assembly into the global assembly cache. <assembly_path>
       is the name of the file that contains the assembly manifest

       The -package option can be used to also create a directory in  in  pre-
       fix/lib/mono  with  the  name  NAME,  and  a  symlink  is  created from
       NAME/assembly_name to the assembly on the GAC.  This is used so  devel-
       opers can reference a set of libraries at once.

       The  -root option is used to specify the "libdir" value of an installa-
       tion prefix which differs from the prefix of the system  GAC.   Typical
       automake  usage  is  "-root $(DESTDIR)$(prefix)/lib".  To access assem-
       blies installed to a prefix other than the mono prefix, it is necessary
       to set the MONO_GAC_PREFIX environment variable.

       The  -gacdir  option  is included for backward compatibility but is not
       recommended for new code. Use the -root option instead.

Basically, -package appears to be optional.

Feel free to edit this with corrections if necessary.


How “make” command locates makefile

I am trying to understand the working of "make" command (just started on this command). I have an ".sh" file which has a script to execute "make" command as shown below: source /somepath/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi make arch=arm toolchainPrefix=arm-poky-linux-gnueabi- xeno=off mode=Debug all The directory where the script file is located has a file...

How to correctly make install of binaries and data after compile in linux?

After make of sources I have compiled executable file and data directory with images for it. What should I do at "make install" phase to correctly install these files to the linux system? And how then application can find installed data (in case when binary and data are placed in...

Can Make be made to understand that a/../z and b/../z are the same location?

I have a somewhat large and complex Makefile setup that postprocesses some data files. Overall it work quite well, but I have run into an annoying issue where Make builds the same target many times over under different directory names. As a simple example, consider the Makefile foo : 1/foo...

why is gmcs command in bash(mono) missing the namespace `System.Threading'?

I input this command gmcs -t:library Program.cs and get this error Program.cs(6,14): error CS0234: The type or namespace name `Tasks' does not exist in the namespace `System.Threading'. Are you missing an assembly reference? I get I have to give it the paths and everything, but how? can't find the way...

Do you only need to build the googletest library once?

So firstly I'm new to testing frameworks and relatively new to C++ but am trying to wrap my head around GoogleTest. I'm working on a Windows machine, running "Git for Windows" (MSYS) and MinGW whilst using Sublime Text as my code editor. I am using make as my build tool,...

Open existing window in Gtk#

I have added a new window to the project and the name of the window is Actwindow. How can I open this window? I tried using Actwindow=new Window(); but it does not work. The window code is: using System; namespace myproject { public partial class Actwindow : Gtk.Window { public...

What does the following makefile command do? /no-symbols-control-file

I cam across the following command in a makefile: %-nosyms.$(TARGET).elf: $(PROJECT_OBJECTFILES) $(INTERRUPT_OBJECTFILES) contiki-$(TARGET).a $(CC) $(CFLAGS) -o [email protected] $(filter-out %.a,$^) $(filter %.a,$^) $(filter %.a,$^) $(LDFLAGS) Source: Contiki/cpu/arm/stm32f103/Makefile.stm32f103 . Does this command generate no-symbols-control-file? What is the use of a no symbol image file?...

Pass array to C# from C++ via mono

I need to pass an array from C++ to C# using mono. But I can't get mono_array_set() to compile. So how can I pass an array from C++ to C#? I've tried mono_runtime_invoke() which compiles but gives a runtime error. mcs /nologo /warn:4 /debug:pdbonly /o /nowarn:3003 /platform:x64 /out:array.dll /target:library array.cs...

Makefile : fclean gives error if program is not yet built

I have 2 makefiles that crash when I use the command make re if the program (or library) is not yet previously built, because make re calls fclean, which should remove the file and crashes if the file is not found. Here is one of the makefiles for a library...

A make rule for verbosity

Typically we have this in a Makefile %.o:%.c $(cc) $(flags) -o [email protected] -c $< When the amount of flags is huge, I feel better to write this instead %.o:%.c $(info $(cc): $< --> [email protected]) @$(cc) $(flags) -o [email protected] -c $< However it can be useful to sometime see everything. So...

Fail to build Mono.Addins with the latest Mono 4.3.0 and GTK# on Ubuntu 14.04

Trying to build the latest Monodevelop with latest Mono. I have successfully installed Mono 4.3.0 and GTK#. As I can see, Monodevelop needs Mono.Addins installed, but when I trying to install latest Mono.Addins, it fails with next errors: Mono.Addins.Gui/AddinManagerDialog.cs(189,24): error CS0506: `Mono.Addins.Gui.AddinManagerDialog.Dispose()': cannot override inherited member `GLib.Object.Dispose()' because it is...

How to put this command in a Makefile?

I have the following command I want to execute in a Makefile but I'm not sure how. The command is docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") The command executed between $(..) should produce output which is fed to docker rmi but this is not...

Autodependency generation in makefiles

I am trying to understand how autodependency is generated in makefiles in the given link, i cannot understand the following piece of code: DEPDIR = .deps df = $(DEPDIR)/$(*F) SRCS = foo.c bar.c ... %.o : %.c @$(MAKEDEPEND); \ cp $(df).d $(df).P; \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e...

What's the difference between [email protected] and $1 when there is only one parameter?

There are some C code: apple.c #include<stdio.h> int main(void) { printf("apple\n"); return 0; } Makefile apple: gcc -c [email protected] gcc [email protected] -o [email protected] $ make apple and it works perfectly. But if I modify Makefile as: apple: gcc -c $1.c gcc $1.o -o $1 $ make apple It does not...

Nested For loop in makefile

I am trying to loop through the .c files in a specific directory through the makefile. i used the following code, but it seems not working: DIR= Sources \ Sources_2 @for entry in ${DIR} ; \ do \ @for i in $${entry}/*.c ; \ do \ echo "Processing $${i}"; \...

how to eliminate dependencies with mcs (mono) command in bash?

I use the following command for mono in bash (to compile a C# program) mcs -t:library -r:nunit.framework.dll *.cs it works and I have my Program.dll. However, when I try to use the dll (with NUnit for example) if I don't have the nunit.framework.dll in the same folder, it doesn't work....

Merging socket request/response in a function

I'm trying to implement a client/server application communicating through sockets. The communication works fine and I can match and execute different functions. Most of the packets are from request / response type and are matched with a persistent sequence number. The problem I'm now stating is that I can't lead...

Where can I find the definitions of System.Collections.Concurrent classes in the mono source code?

I am looking for the source code of the System.Collections.Concurrent classes, especially ConcurrentQueue and ConcurrentDictionary in the mono sources. I am unable to find them. I was looking in the corlib Directory: but it does not contain the System.Collections.Concurrent package. Even using the repository search feature of github did...

bash error code 137 vs 1 when out of memory

Context I run the following command in linux bash : mono --debug --debugger-agent=transport=dt_socket,address= ./Stress.exe Stress.exe is a C# application. What happens At one point the system is out of memory, which is wanted. An error code is returned. Error code returned (echo $?) Code 1 : When my program creates...

Make: How to process many input files in one invocation of a tool?

I have a data conversion process that is driven by GNU make. It takes human-generated input files and creates output files using a conversion progam. Obviously this is about as simple as a makefile can get: inputs=$(wildcard *.input) outputs=$(subst .input,.output, $(inputs)) .PHONY: all all: $(outputs) %.output: %.input converter $< -o...

makefile read reused variable inside recipe

In trying to implement nonrecursive make, I have a which looks like: ############ # Enter Stack ############ sp := $(sp).x dirstack_$(sp) := $(d) d := $(dir) .. setup things like OBJECTS_$(d), DEPS_$(d), TARGET_$(d), etc ... ############ # Exit Stack ############ -include $(DEPS_$(d)) d := $(dirstack_$(sp)) sp := $(basename $(sp))...

Avr-g++ compilation failed with Make Error 1

I'm trying to compile arduino code in Eclipse. Below is build log. make all Building file: ../test.cpp Starting C++ compile "/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=163 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/opt/arduino-1.6.3/hardware/arduino/avr/cores/arduino" -I"/opt/arduino-1.6.3/hardware/arduino/avr/variants/standard" -I/usr/lib/avr/include -MMD -MP -MF"test.cpp.d" -MT"test.cpp.d" -D__IN_ECLIPSE__=1 -x c++ "../test.cpp" -o...

make: *** No rule to make target 'rm', needed by 'clean.Stop

I am working with cygwin on windows 8.1. I have used the following make file .SUFFIXES : .o .C CFLAGS = -g2 CC =g++ ${CFLAGS} LIBRARIES = -lm .C.o : ${CC} -c $< SOURCE-FILES = sparsegraph.C myvarious.C pairlist.C graphlist.C peo.graph.C choldc.C copy.C metropolis_fns.C likelihood.C metropolis.C OBJECT-FILES = sparsegraph.o myvarious.o pairlist.o...

Ocamlfind command not found

I'm running into an issue installing a package that's reliant on ocamlfind but I'm getting an ocamlfind: command not found error when making. I have installed ocamlfind with the ocaml package manager and have tried reinstalling using "opam reinstall ocamlfind". I have also tried the 'eval opam config env' command...

how to solve the type and namespace could not be found

I am trying to make a cross platform application using MONO. i developed the project into c#(windows) and I want to run that project into Linux. For that purpose i am using MONO.But when i am running my project then I am getting error that the type and namespace could...

How does MAKE remember the file timestamps

I've found this question which is basically asking the same, but got no real answer. Where is the make's config file / database file where it remembers the file timestamps, so it can tell what changed? I checked and there's no .make or similar in my project, nor in the...

Running on iOS 7.1 simulator brings errors in the console output

I'm using Xamarin Studio 5.9.3 on Mac with Mono 4.0.1, Xcode 6.3.2 and Xamarin.iOS When I try to run my app in the iOS 7.1 simulator I get the following console output: objc[1102]: Class AXEmojiUtilities is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS...

what does -wl, --start-group mean in make file?

I have this in my Make file.. # Create list of object files # LIB_OBJS = -Wl,--start-group \ $(T_OBJ_DIR)/Source1.o \ $(T_OBJ_DIR)/Source2.o \ $(T_OBJ_DIR)/Source3.o \ $(T_OBJ_DIR)/Source4.o \ $(T_OBJ_DIR)/Source5.o \ -Wl,--end-group \ Could anyone please explain What "-Wl,--start-group" and "-Wl,--end-group" mean?...

How can I install MONO on Centos 5, without compiling from source

I would like to install a reasonably recent version of Mono on a CentOs 5 system. Ideally I would prefer not to have to build from source. I set up a mono.repo file in yum.repos.d: [mono] name=Mono Stack (RHEL_5) type=rpm-md baseurl= gpgcheck=1 gpgkey= enabled=1 When I tried to use the...

xcode 6.3.2 external build

I'm trying to compile an existing c++ project, originally developed on linux with gcc. The only external library is GSL (GNU Scientific Library). I have created an external build tool project to use xcode's debugger, but I currently have two issues. 1) When I try to build in xcode it...

basic makefile ifeq how to

I am just learning about Makefiles and am having trouble with ifeq. Version = GNU Make 3.82 Here is my simple Makefile: CHECK := 0 CHECK2 := 0 check : @echo "Check=${CHECK}" @echo "Check2=${CHECK2}" ifeq (${CHECK2},${CHECK}) @echo "EQUAL" else @echo "NOT EQUAL" endif Here is the output: Check=0 Check2=0 NOT...

Is safe to call NetworkStream.BeginWrite multiple times from one thread?

I am implementing a TCP client in my Unity3D game and I am wondering if it's actually safe or not to call the NetworkStream.BeginWrite without waiting until the previous call finishes writing. From what I understood while reading the documentation, it's safe until I am not performing concurrent BeginWrite calls...

Makefile overriding default implicit rule

Why this rule cannot override the default implicit rule ? When make is invoked like: make myapp (suppose myapp.c is there). The make runs the default command to build and link the program instead the commands defined in this implicit rule: #... omitted code LCUS=$(LIBS)/libcus.a #... omitted code % :...

Why does gcc search header files from non-exist folders?

I am trying to build an open source project shark on CentOS 7, and get very weird build errors: make: *** No rule to make target `/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h', needed by `core/luv/luv.o'. make: *** No rule to make target `/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h', needed by `core/luv/luv.o'. make: *** No rule to make target `/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed/limits.h', needed...

Eclipse Makefile: Make Variables are skipped

I have a project with a Makefile in it, on Unix console it works fine, compiles, builds and I can run the binary at the end. I imported the project into Eclipse workspace and somehow Makefile module of Eclipse cannot build the project now. It gives the following error: g++:...

Why am I getting the following error when compiling this assembly?

I'm attempting to use the following command line command to compile an assembly of the code from my project: C:/"Program Files"/Unity/Editor/Data/Mono/bin/gmcs -target:library -out:C:/Users/Austin/Desktop/PixelExpanse.dll -recurse:C:/Users/Austin/Desktop/Projects/Repos/trunk/PixelExpanse/SpaceColonyRefactor/Assets/Source/*.cs -d:RUNTIME -r:C:/"Program Files"/Unity/Editor/Data/Managed/UnityEngine.dll As you can see, I am, I believe, correctly referencing the UnityEngine.dll. The code that would be compiled contains references to UnityEngine.UI...

Haskell make recipe fails for Paradox theorem prover using GHC

I am trying to install the paradox theorem prover sourced from here. When I run the makefile this is the command that runs: ghc -optl -static -lstdc++ -I../instantiate -I../minisat/current-base ../minisat/current-base/Solver.or ../minisat/current-base/Prop.or ../instantiate/MiniSatWrapper.or ../instantiate/MiniSatInstantiateClause.or -fglasgow-exts -O2 -static -threaded -main-is Paradox.Main.main --make Paradox.Main -o paradox And it results in several errors like...

NuGet on mono behind proxy not able to connect to the internet

I have a Linux machine behind a corporate proxy. For the proxy I have setup CNTLM to handle the authentication for me, so my proxy is located at http://localhost:3128. CNTLM connects to a corporate proxy that uses NTLMv2. Now when I try to run Nuget on Mono with the following...

XML validation with XSD fails while online validators pass

I have a simple XML file that I want to validate against an XSD. However, whenever I run my validation code, I get a validation exception saying the "multitest" node is undefined (unlocalized error message: "The multitest element is not declared."). The strange thing is that I tried to validate...

Dot in front of variables in make files

I am not able to figure out what does a dot . in front of a variable in makefile does. For e.g.: SOURCEDIRS = . $(PROJECTDIRS) $(TARGET_DIRS_CONCAT) vpath %.c $(SOURCEDIRS) It would be great if someone could tell me. Thanks!...

Reuse jquery plugin without conflict

I have a little plugin working as a progressbar. the problem is: I can't update progressbar's value because every change I made, affect just the last object created =( also.. if I call it as: $(node-selector).progBar().setValue() it works calling the correct node but it loss the config object follow the...

Namespace could not found on Mono

I want to create a cross platform application. For that, I am using Mono. When I compile my code in Mono, I get an error: vehicleRouteCorePlanner (my dll file) could not found. But I have added that dll into my project. error in line 2 and 3 It is running...

DependencyResolutionException Circular component dependency detected: How to use Autofac to inject decorator?

I have an interface called ILastActivityUpdator as follows: public interface ILastActivityUpdator { void UpdateLastActivity(int userId); } Besides that I have two classes that implement this interface, being LastActivityUpdator and a decorator AnonymousUserLastActivityUpdator. The latter one takes an ICookieProvider as extra argument and uses this in the method implementation. I.e., public...

What does $(@:.h=.h.d) mean in GNU make?

I'm maintaining a (horrendously complicated) Makefile, and in some recipes I saw the following: $(@:.h=.h.d) I have absolutely no clue as to how to interpret this, or whether there's any documentation on those characters. Obviously, Google won't work because it thinks I'm typing gibberish. I saw a related question about...

make error during building webkitgtk

I use UBuntu 14.04 LTS. I need to build webkitgtk 2.8.3 Here is an example instruction which I have used: linuxfromscratch When I run sudo make -j8 I get following log: Scanning dependencies of target JavaScriptCore-4-gir Scanning dependencies of target fake-generated-webkitdom-headers [ 0%] Scanning dependencies of target WebKit2-fake-api-headers Scanning dependencies...

F# task parallelism under mono doesn't “appear” to execute in parallel

I have the following dummy code to test out TPL in F#. (Mono 4.5, xmarin studio, quard core macbook pri) To my surprise, all the processes are done on the same thread. there is not parallelism at all. open System open System.Threading open System.Threading.Tasks let doWork (num:int) (taskId:int) : unit...

How to build a './configure && make && make install' software against a custom library which I also build?

I am building tmux-2.0 from sources on a pretty regular Linux host. First attempt failed as it turned out that the version of libevent installed is older than required, so I proceeded to download and build libevent-2.0.22 from sources (current at the time of writing) first. Building of libevent succeeded...

Ninject.Mvc5 does not work with mono,,mono,ninject,ninject.web.mvc
Am following video tutorial from you-tube for making web app with ASP.Net. The guy teaching there is using Windows and Visual Studio. I'm on Ubuntu 14.04 and Monodevelop. Everything is set and running but Ninject ( does not work. After installing from NuGet, it created file NinjectWebCommon.cs have class NinjectWebCommon....

How to use hyper linking in Razor without Url.Action or Html.Action

There are 4 ways to hyperly link views in ASP.NET MVC as far as I know: @Url.Action @Url.ActionLink @Html.Action @Html.ActionLink I can use them as, for example: <a [email protected]("ActionName","ControllerName")> Test </a> Which generates: <a href="ControllerName/ActionName"> Test </a> Is there a way to generate the Url part i.e. "ControllerName/ActionName" in ASP.NET...

GNU make equivalent to BSD make's $(var:Q)?

BSD make has a :Q variable expansion modifier, documented in the FreeBSD make man page as follows: :Q Quotes every shell meta-character in the variable, so that it can be passed safely through recursive invocations of make. If variable var has value a b\c"d'e$f, then $(var:Q) expands to a\ b\\c\"d\'e\$f...