fatal error IKVMC5045: Link error

Jason Harrop <[email protected]> Sun, 22 Jan 2017 18:45:27 +1100
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <CAM-hvXeDM9hT3Lcb2DWp82_UiZ0gn1XqHWgj1MfWpfZgWz4p0g@mail.gmail.com>
--===============2361362469501166593==
Content-Type: multipart/alternative; boundary=94eb2c09b6c408ef6b0546aa117e

--94eb2c09b6c408ef6b0546aa117e
Content-Type: text/plain; charset=UTF-8

I'm trying to IKVM https://github.com/plutext/slf4j-net-commons-logging
using IKVMC 8.1.5717.0 to update
https://www.nuget.org/packages/slf4j-NetCommonLogging/

Before doing so, I thought I'd update Common.Logging to v3.3.1.0

I got this error:

     [echo] Building slf4j-NetCommonLogging DLL..
     [echo]
     [exec] IKVM.NET <http://ikvm.net/> Compiler version 8.1.5717.0
     [exec] Copyright (C) 2002-2015 Jeroen Frijters
     [exec] http://www.ikvm.net/
     [exec]
     [exec] Error: unable to load assembly 'lib\dotNET\packages\Common.
Logging.3.3.1\lib\net40\Common.Logging.dll'
 as it depends on a higher version of mscorlib than the one currently loaded

So I thought I'd try specifying .NET 4 in my ant build file:

            <arg value="-nostdlib" />
            <arg value="-lib:\windows\microsoft.net\framework\v4.0.30319" />
            <arg value="-r:mscorlib.dll" />

(This is a Win 10 machine which has .NET 4.6)

Now I got the curious error:

     [echo] Building slf4j-NetCommonLogging DLL..
     [echo]
     [exec] IKVM.NET <http://ikvm.net/> Compiler version 8.1.5717.0
     [exec] Copyright (C) 2002-2015 Jeroen Frijters
     [exec] http://www.ikvm.net/
     [exec]
     [exec] fatal error IKVMC5045: Link error: Method "cli.Common.Logging.
LogManager.GetLogger(Ljava.lang.String;)Lcli.Common.Logging.ILog;" has a
return type "cli.Common.Logging.ILog, Common.Logging.Core, Version=3.3.1.0,
Culture=neutral, PublicKeyToken=af08829b84f0328e"
instead of type    "cli.Common.Logging.ILog, Common.Logging.Core,
Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e" as
expected by "com.plutext.slf4jNetCommonsLogging.NetCommonsLoggerFactory"

Notice the return types look identical.

I also get this same error if I use the net35 /Common.Logging packages
(from nuget) and let ikvmc use its default mscorlib:

            <arg
value="-reference:lib/dotNET/packages/Common.Logging.3.3.1/lib/net35/Common.Logging.dll"
/>
            <arg value="-reference:lib/dotNET/packages/Common.Logging.Core.
3.3.1/lib/net35/Common.Logging.Core.dll" />

Thoughts?

For now, I've reverted to compiling against Common.Logging 2.1.2 which is
what I had before and which works.

thanks .. Jason

--94eb2c09b6c408ef6b0546aa117e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I&#39;m trying to IKVM=C2=A0<a href=3D"https://github.com/=
plutext/slf4j-net-commons-logging">https://github.com/plutext/slf4j-net-com=
mons-logging</a> using IKVMC=C2=A0<span style=3D"font-size:12.8px">8.1.5717=
.0 to update=C2=A0<a href=3D"https://www.nuget.org/packages/slf4j-NetCommon=
Logging/">https://www.nuget.org/packages/slf4j-NetCommonLogging/</a></span>=
<div><br></div><div>Before doing so, I thought I&#39;d update=C2=A0<span st=
yle=3D"font-size:12.8px">Common.Logging to v3.3.1.0</span></div><div><span =
style=3D"font-size:12.8px"></span><br style=3D"font-size:12.8px"><div dir=
=3D"ltr" style=3D"font-size:12.8px"><div>I got this error:</div><div><br></=
div><div>=C2=A0 =C2=A0 =C2=A0[echo] Building slf4j-NetCommonLogging DLL..</=
div><div>=C2=A0 =C2=A0 =C2=A0[echo]</div><div>=C2=A0 =C2=A0 =C2=A0[exec]=C2=
=A0<a href=3D"http://ikvm.net/" target=3D"_blank">IKVM.NET</a>=C2=A0Compile=
r version 8.1.5717.0</div><div>=C2=A0 =C2=A0 =C2=A0[exec] Copyright (C) 200=
2-2015 Jeroen Frijters</div><div>=C2=A0 =C2=A0 =C2=A0[exec]=C2=A0<a href=3D=
"http://www.ikvm.net/" target=3D"_blank">http://www.ikvm.net/</a></div><div=
>=C2=A0 =C2=A0 =C2=A0[exec]</div><div>=C2=A0 =C2=A0 =C2=A0[exec] Error: una=
ble to load assembly &#39;lib\dotNET\packages\Common.<wbr>Logging.3.3.1\lib=
\net40\<wbr>Common.Logging.dll&#39;=C2=A0</div><div><span class=3D"gmail-m_=
4613844909106322575gmail-Apple-tab-span" style=3D"white-space:pre-wrap">	</=
span>=C2=A0as it depends on a higher version of mscorlib than the one curre=
ntly loaded</div><div><br></div><div>So I thought I&#39;d try specifying .N=
ET 4 in my ant build file:</div><div><br></div><div><div>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 &lt;arg value=3D&quot;-nostdlib&quot; /&gt;</div><=
div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;arg value=3D&quot;-lib:\w=
indows\<a href=3D"http://microsoft.net/" target=3D"_blank">microsoft<wbr>.n=
et</a>\framework\v4.0.30319&quot; /&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 &lt;arg value=3D&quot;-r:mscorlib.dll&quot; /&gt; =C2=A0<=
/div></div><div><br></div><div>(This is a Win 10 machine which has .NET 4.6=
)</div><div><br></div><div>Now I got the curious error:</div><div><br></div=
><div><div>=C2=A0 =C2=A0 =C2=A0[echo] Building slf4j-NetCommonLogging DLL..=
</div><div>=C2=A0 =C2=A0 =C2=A0[echo]</div><div>=C2=A0 =C2=A0 =C2=A0[exec]=
=C2=A0<a href=3D"http://ikvm.net/" target=3D"_blank">IKVM.NET</a>=C2=A0Comp=
iler version 8.1.5717.0</div><div>=C2=A0 =C2=A0 =C2=A0[exec] Copyright (C) =
2002-2015 Jeroen Frijters</div><div>=C2=A0 =C2=A0 =C2=A0[exec]=C2=A0<a href=
=3D"http://www.ikvm.net/" target=3D"_blank">http://www.ikvm.net/</a></div><=
div>=C2=A0 =C2=A0 =C2=A0[exec]</div><div>=C2=A0 =C2=A0 =C2=A0[exec] fatal e=
rror IKVMC5045: Link error: Method &quot;cli.Common.Logging.<wbr>LogManager=
.GetLogger(Ljava.<wbr>lang.String;)Lcli.Common.<wbr>Logging.ILog;&quot; has=
 a return type &quot;cli.Common.Logging.ILog, Common.Logging.Core, Version=
=3D3.3.1.0, Culture=3Dneutral, PublicKeyToken=3D<wbr>af08829b84f0328e&quot;=
=C2=A0</div><div>instead of type =C2=A0 =C2=A0&quot;cli.Common.Logging.ILog=
, Common.Logging.Core, Version=3D3.3.1.0, Culture=3Dneutral, PublicKeyToken=
=3D<wbr>af08829b84f0328e&quot; as expected by &quot;com.plutext.<wbr>slf4jN=
etCommonsLogging.<wbr>NetCommonsLoggerFactory&quot;</div></div><div><br></d=
iv><div>Notice the return types look identical.</div><div><br></div><div>I =
also get this same error if I use the net35 /Common.Logging=C2=A0packages (=
from nuget) and let ikvmc use its default mscorlib:</div><div><br></div><di=
v><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;arg value=3D&quot;-ref=
erence:lib/dotNET/<wbr>packages/Common.Logging.3.3.1/<wbr>lib/net35/Common.=
Logging.dll&quot; /&gt;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 &lt;arg value=3D&quot;-reference:lib/dotNET/<wbr>packages/Common.Logging.C=
ore.<wbr>3.3.1/lib/net35/Common.<wbr>Logging.Core.dll&quot; /&gt;</div></di=
v><div><br></div><div>Thoughts?</div><div><br></div><div>For now, I&#39;ve =
reverted to compiling against=C2=A0Common.Logging 2.1.2 which is what I had=
 before and which works.</div><div><br></div><div>thanks .. Jason</div></di=
v></div></div>

--94eb2c09b6c408ef6b0546aa117e--


--===============2361362469501166593==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--===============2361362469501166593==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ikvm-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ikvm-developers

--===============2361362469501166593==--