0

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)
Community
  • 1
  • 1
  • I also see follwing errors in the log: – rajatiwari Jun 08 '15 at 12:57
  • When Xamarin offers .rpm packages, I see no reason to build on your own from source. – Lex Li Jun 08 '15 at 13:56
  • Could you please point me to the rpm for mono-3.12 for RedHat 5.11? That would be really great help. – rajatiwari Jun 10 '15 at 08:05
  • The instruction is at Mono web site, http://www.mono-project.com/docs/getting-started/install/linux/ – Lex Li Jun 10 '15 at 11:27
  • Hi Lex, I really appreciate you for replying .We were able to install it on CenOS. The problem we are facing is on RHEL 5.11. Also googling around I found that there's a bug posted which points to the similar problem. Here's a link https://bugzilla.xamarin.com/show_bug.cgi?id=26939#c1 – rajatiwari Jun 11 '15 at 10:40

0 Answers0