Mono installation on RedHat 5.11 (Tikanga)

222 views Asked by At

I am trying to install Mono on RedHat 5.11. Here are some details of the mono that we are trying to install.

Steps to install it:

  1. ./configure --prefix=/opt/mono
  2. make && make install

We could install it on CentOS but installing it on RedHat is creating the following issue:

 /usr/bin/ld: ./.libs/libmini.a(libmini_la-mini.o): relocation R_X86_64_PC32     against `mono_cross_helpers_run' can not be used when making a shared object;   recompile with -fPIC 
  /usr/bin/ld: final link failed: Bad value 
  collect2: ld returned 1 exit status 

I searched around and found the following link: how to recompile with -fPIC

To solve this issue I tried running it with -fPIC option, but then I realized that the -fPIC option does not work with RedHat so I used the -pie option. I then performed the following steps:

  1. ./configure --enable-shared --prefix=/opt/mono
  2. make -pie
  3. make install

But I still have the same issue:

/usr/bin/ld: ./.libs/libmini.a(libmini_la-mini.o): relocation R_X86_64_PC32 against `mono_cross_helpers_run' can not be used when making a shared object; recompile with -fPIC

I also see below error on the console

make[7]: [cs-errors.tree] Error 1 (ignored)
make[7]: [ecma334.tree] Error 1 (ignored)
make[7]: [Mono.tree] Error 1 (ignored)
make[7]: [netdocs.tree] Error 1 (ignored)
make[7]: [Novell.tree] Error 1 (ignored)
make[8]: *** No rule to make target `../../class/lib/build/sn.exe', needed   by `../../class/lib/xbuild_12/Microsoft.Build.Framework.dll'.  Stop.
make[7]: [do-all] Error 2 (ignored)
make[8]: *** No rule to make target `../../class/lib/build/sn.exe', needed  by `../../class/lib/xbuild_12/Microsoft.Build.Utilities.v12.0.dll'.  Stop.
make[7]: [do-all] Error 2 (ignored)
make[8]: *** No rule to make target `../../class/lib/build/sn.exe', needed by `../../class/lib/xbuild_12/Microsoft.Build.Engine.dll'.  Stop.
make[7]: [do-all] Error 2 (ignored)
make[8]: *** No rule to make target `../../class/lib/build/sn.exe', needed by `../../class/lib/xbuild_12/Mono.XBuild.Tasks.dll'.  Stop.
make[7]: [do-all] Error 2 (ignored)
make[8]: *** No rule to make target `../../class/lib/build/sn.exe', needed by `../../class/lib/xbuild_12/Microsoft.Build.Tasks.v12.0.dll'.  Stop.
make[7]: [do-all] Error 2 (ignored)
make[8]: *** No rule to make target `../../class/lib/build/sn.exe', needed by `../../class/lib/xbuild_12/Microsoft.Build.dll'.  Stop.
make[7]: [do-all] Error 2 (ignored)
/bin/sh: .//mkinstalldirs: No such file or directory
make[7]: [../../class/lib/xbuild_12//.stamp] Error 127 (ignored)
touch: cannot touch `../../class/lib/xbuild_12//.stamp': No such file or directory
make[7]: [../../class/lib/xbuild_12//.stamp] Error 1 (ignored)
make[7]: [../../class/lib/xbuild_12/xbuild.exe] Error 1 (ignored)
Makefile:821: warning: overriding commands for target `mod'
Makefile:801: warning: ignoring old commands for target `mod'
make[3]: [AgilityPack.dll] Error 1 (ignored)
make[3]: [AgilityPack.dll] Error 1 (ignored)
make[3]: [convert.exe] Error 1 (ignored)
make[3]: [mono-file-formats.tree] Error 1 (ignored)
make[3]: [mono-tools.tree] Error 1 (ignored)
make[3]: [monoapi.tree] Error 1 (ignored)
0

There are 0 answers