Mono on Prefix on Mac

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mono on Prefix on Mac

Anton Molyboha
Hi all,

I am trying to build mono under Prefix on my Mac, and it fails - but I think it _almost_ works and I just need a little help.

The emerge error is "invalid install_name found", the culprits being some mcs.exe.dylib and mscorlib.dll.dylib (the build.log and requisite emerge output are attached)
At first I thought that some linker flags are off, but then found this snippet from the ebuild:

multilib_src_install() {
    default_src_install

    # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
    # mono.spec and http://www.mail-archive.com/mono-devel-list@.../msg24870.html
    # for reference.
    rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
    rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
}

Looks like those files should just never get to be checked for the install_name -- yet, apparently, the check happens before the execution gets to those "rm" lines.

So, the question is: is there a way to make the ebuild delete the offenders between compilation and QA checks? How can I do that -- and how do I find the build directory in a portable way?

Thanks!
Anton

emerge-info.txt (5K) Download Attachment
build.log (4M) Download Attachment
emerge-pqv.txt (118 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mono on Prefix on Mac

François Bissey-3
It is very curious. The QA check happen after the install phase. And
your log shows that’s when you get the message so somehow those files are not
properly deleted. I am guessing that because “rm -f” is used the “die” statement
may not be invoked.

Ah! the rm command is elf centric it looks for .so files when on OS X we have .dylib
files. We need to replace .so with $(get_libname) from the multilib eclass.

François

> On 15/09/2017, at 10:37, Anton Molyboha <[hidden email]> wrote:
>
> Hi all,
>
> I am trying to build mono under Prefix on my Mac, and it fails - but I think it _almost_ works and I just need a little help.
>
> The emerge error is "invalid install_name found", the culprits being some mcs.exe.dylib and mscorlib.dll.dylib (the build.log and requisite emerge output are attached)
> At first I thought that some linker flags are off, but then found this snippet from the ebuild:
>
> multilib_src_install() {
>     default_src_install
>
>     # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
>     # mono.spec and http://www.mail-archive.com/mono-devel-list@.../msg24870.html
>     # for reference.
>     rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
>     rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
> }
>
> Looks like those files should just never get to be checked for the install_name -- yet, apparently, the check happens before the execution gets to those "rm" lines.
>
> So, the question is: is there a way to make the ebuild delete the offenders between compilation and QA checks? How can I do that -- and how do I find the build directory in a portable way?
>
> Thanks!
> Anton
> <emerge-info.txt><build.log><emerge-pqv.txt>

Reply | Threaded
Open this post in threaded view
|

Re: Mono on Prefix on Mac

Anton Molyboha
Ha, I did not think about the possibility that "rm -f ... || die" would delete nothing but refuse to die!

Replacing .so with $(get_libname) seems to work for me.

Thanks a lot Francois!

On Thu, Sep 14, 2017 at 6:57 PM, Francois Bissey <[hidden email]> wrote:
It is very curious. The QA check happen after the install phase. And
your log shows that’s when you get the message so somehow those files are not
properly deleted. I am guessing that because “rm -f” is used the “die” statement
may not be invoked.

Ah! the rm command is elf centric it looks for .so files when on OS X we have .dylib
files. We need to replace .so with $(get_libname) from the multilib eclass.

François

> On 15/09/2017, at 10:37, Anton Molyboha <[hidden email]> wrote:
>
> Hi all,
>
> I am trying to build mono under Prefix on my Mac, and it fails - but I think it _almost_ works and I just need a little help.
>
> The emerge error is "invalid install_name found", the culprits being some mcs.exe.dylib and mscorlib.dll.dylib (the build.log and requisite emerge output are attached)
> At first I thought that some linker flags are off, but then found this snippet from the ebuild:
>
> multilib_src_install() {
>     default_src_install
>
>     # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
>     # mono.spec and http://www.mail-archive.com/mono-devel-list@....com/msg24870.html
>     # for reference.
>     rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
>     rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
> }
>
> Looks like those files should just never get to be checked for the install_name -- yet, apparently, the check happens before the execution gets to those "rm" lines.
>
> So, the question is: is there a way to make the ebuild delete the offenders between compilation and QA checks? How can I do that -- and how do I find the build directory in a portable way?
>
> Thanks!
> Anton
> <emerge-info.txt><build.log><emerge-pqv.txt>