Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Aug 2017 01:47:23 +0100
From:      Alexander Regueiro <alexreg@me.com>
To:        Russell Haley <russ.haley@gmail.com>
Cc:        freebsd-mono@freebsd.org
Subject:   Re: Update on porting mono 5
Message-ID:  <78CE544C-7B29-4561-AEDB-0EF53F0C6E03@me.com>
In-Reply-To: <CABx9NuQgKZqO43pNDjxhMFKtc1nfkWJw8AV4s3VWmW_KWaAmow@mail.gmail.com>
References:  <AC5B4074-19CE-460F-BA28-2FCD847DCC5D@me.com> <20170824184423.6422611.83240.30832@gmail.com> <0434E7AC-4627-4AF1-AF70-63219E632E52@me.com> <CABx9NuQV27%2BGHgOz6P0QTU_zZ3VP8beYDbMs8RrYkJ7eR%2BnwdQ@mail.gmail.com> <955EEBAF-5C94-4647-AF8C-507F1B8C12C4@me.com> <CABx9NuQgKZqO43pNDjxhMFKtc1nfkWJw8AV4s3VWmW_KWaAmow@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the tip. In fact, it turns out I just needed to use the =
`=E2=80=94disable-dtrace` option when configuring, to get rid of that =
linkage error, oops!

Here=E2=80=99s the successful procedure that I followed to build & =
install Mono 5.2 on my FreeBSD 11 machine, in case it=E2=80=99s of =
interest to anyone while the port is being updated. I=E2=80=99m CCing =
the mailing list in case this is of use to someone.

(Make sure beforehand you have installed ports/packages for mono [to =
bootstrap], gcc, and gmake.)

The following can be run as a bash script and should do the whole job.

PREFIX=3D=E2=80=9C$HOME/build/mono/=E2=80=9C &&
VERSION=3D=E2=80=9C5.2.0.215=E2=80=9D &&
FILENAME=3D=E2=80=9Cmono-$VERSION.tar.bz2=E2=80=9D &&
curl -O "https://download.mono-project.com/sources/mono/$FILENAME =
<https://download.mono-project.com/sources/mono/$FILENAME>=E2=80=9D &&
tar -xvf =E2=80=9C$FILENAME=E2=80=9D &&
cd =E2=80=9Cmono-$VERSION=E2=80=9D &&
./configure =E2=80=94prefix=3D=E2=80=9C$PREFIX" --disable-nls =
--disable-dtrace --build=3D"$(gcc -dumpmachine)=E2=80=9D &&
sed -EI -e "s|#define HAVE_LOCALCHARSET_H.*|#undef HAVE_LOCALCHARSET_H|" =
eglib/config.h &&
mkdir -p =E2=80=9C$PREFIX=E2=80=9D &&
gmake &&
gmake install &&
echo =E2=80=9CMono $VERSION successfully built and installed to =
'$PREFIX'."

(This was inspired by the docs at =
http://www.mono-project.com/docs/compiling-mono/mac/ =
<http://www.mono-project.com/docs/compiling-mono/mac/>, but with some =
significant changes.)

Alex

> On 25 Aug 2017, at 21:00, Russell Haley <russ.haley@gmail.com> wrote:
>=20
> Prefix everything with "Russell *thinks* this is how it works but it
> could be wrong because it's from memory".
>=20
> collect2: error: ld returned 1 exit status
>=20
> That's a linker error. Someone, somewhere is trying to link to a lib
> directory in the "wrong" place. In FreeBSD libraries and includes
> generally need to be prefixed with /usr/local/. Check in the makefile
> in /usr/home/aj/mono/mono/metadata. Often just adding (I'm going to
> get this wrong, I know it) -I /usr/local/include to CFLAGS and -L
> /usr/local/lib to LDFLAGS fixes those kinds of problems.
>=20
>=20
> Good luck!
> Russ
>=20
> On Fri, Aug 25, 2017 at 8:59 AM, Alexander Regueiro <alexreg@me.com> =
wrote:
>> This is easy enough to get around, but unfortunately I then get this =
bug,
>> which is rather more troublesome!
>>=20
>> https://bugzilla.xamarin.com/show_bug.cgi?id=3D29962
>>=20
>> Any ideas?
>>=20
>> On 25 Aug 2017, at 07:01, Russell Haley <russ.haley@gmail.com> wrote:
>>=20
>> On Thu, Aug 24, 2017 at 8:03 PM, Alexander Regueiro <alexreg@me.com> =
wrote:
>>=20
>> Hi Russ,
>>=20
>> I wasn=E2=80=99t under the impression it was that straightforward, =
but will
>> certainly give it a go. Thanks.
>>=20
>>=20
>> I'm getting an undefined reference:
>>=20
>> ../../mono/eglib/.libs/libeglib.a(libeglib_la-gunicode.o): In =
function
>> `monoeg_g_get_charset':
>> /usr/home/russellh/Git/mono/mono/eglib/gunicode.c:212: undefined
>> reference to `locale_charset'
>> collect2: error: ld returned 1 exit status
>>=20
>> So I guess the answer is no, it's not. :)
>>=20
>> Russ
>>=20
>> Alex
>>=20
>> On 24 Aug 2017, at 19:44, Russell Haley <russ.haley@gmail.com> wrote:
>>=20
>> Sorry for the top post.
>>=20
>> Have you tried building it yourself from their git repository? If =
memory
>> serves, most of the changes to get mono 4 to build revolved around =
calling
>> gmake instead of make and correcting paths for sh and bash.  =E2=80=8EI=
f I remember,
>> the bootstrapping of the build was only for monodevelop.
>>=20
>> Russ
>>=20
>> Sent from my BlackBerry 10 smartphone on the Virgin Mobile network.
>> Original Message
>> From: Alexander Regueiro
>> Sent: Thursday, August 24, 2017 11:24 AM
>> To: freebsd-mono@freebsd.org
>> Subject: Re: Update on porting mono 5
>>=20
>> I=E2=80=99ve recently seen David Naylor=E2=80=99s message
>> =
<https://lists.freebsd.org/pipermail/freebsd-mono/2017-August/002524.html
>> =
<https://lists.freebsd.org/pipermail/freebsd-mono/2017-August/002524.html>=
>
>> summarising the work towards porting Mono 5, but it seems a lot of =
the WIP
>> is not public at the moment. Is there any way I can access this =
material?
>> Ideally I=E2=80=99d like to get Mono 5 building on my FreeBSD machine =
ASAP (even if
>> it=E2=80=99s just a hack), since I=E2=80=99m a bit =
deadline-constrained here, so if there=E2=80=99s
>> any way I can help, even leaving the testing aside for now, do please =
let me
>> know.
>> _______________________________________________
>> freebsd-mono@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-mono
>> To unsubscribe, send any mail to =
"freebsd-mono-unsubscribe@freebsd.org"
>>=20
>>=20
>>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?78CE544C-7B29-4561-AEDB-0EF53F0C6E03>