Project

General

Profile

note16.txt

Ovidiu Maxiniuc, 03/04/2014 03:50 PM

Download (9.03 KB)

 
1
<pre>
2
Warning IKVMC0108: not a class file "com/goldencode/expr/FieldrefConstant.class", including it as resource
3
    (class format error "51.0")
4
</pre>
5

    
6
http://mono-project.com/DistroPackages/Ubuntu
7
   Ubuntu Precise (12.04 LTS) and newer: 2.10.8.1
8

    
9
http://weblog.ikvm.net/PermaLink.aspx?guid=94934445-9b06-4a81-b76b-fcd23d4f6ec2
10
   Integrated OpenJDK 6 b22.
11

    
12

    
13
The linux IKVMc version (IKVM.NET Compiler version 0.46.0.1) does not support JDK7. (class format 51.0)
14
Alternatives: 
15
* look for a newer IKVM Compiler that has support for java 7
16
* cross-compile the p2jpl.jar on Windows platform (IKVM.NET Compiler version 7.2.4630.5)
17
* compile the p2jpl.jar using java 6 compiler or at least using the -source and -target switches set to 6 (to ensure that it's compile for Java 6)
18

    
19

    
20
mcs P2JLogical.cs
21
-----------------
22
P2JLogical.cs(10,14): error CS0234: The type or namespace name `Data' does not exist in the namespace `System'. Are you missing an assembly reference?
23
P2JLogical.cs(11,17): error CS0234: The type or namespace name `SqlServer' does not exist in the namespace `Microsoft'. Are you missing an assembly reference?
24
P2JLogical.cs(20,38): error CS0246: The type or namespace name `IBinarySerialize' could not be found. Are you missing a using directive or an assembly reference?
25
P2JLogical.cs(24,13): error CS0246: The type or namespace name `com' could not be found. Are you missing a using directive or an assembly reference?
26
P2JLogical.cs(18,2): error CS0246: The type or namespace name `SqlUserDefinedType' could not be found. Are you missing a using directive or an assembly reference?
27
P2JLogical.cs(18,2): error CS0246: The type or namespace name `SqlUserDefinedTypeAttribute' could not be found. Are you missing a using directive or an assembly reference?
28
P2JLogical.cs(59,36): error CS0246: The type or namespace name `SqlString' could not be found. Are you missing a using directive or an assembly reference?
29

    
30
mcs -pkg:dotnet P2JLogical.cs
31
-----------------------------
32
Package dotnet was not found in the pkg-config search path.
33
Perhaps you should add the directory containing `dotnet.pc' to the PKG_CONFIG_PATH environment variable
34
No package 'dotnet' found
35
error CS8027: Error running pkg-config. Check the above output.
36

    
37
mcs -lib:/usr/lib/mono/4.0 P2JLogical.cs
38
----------------------------------------
39
Unhandled Exception: System.TypeLoadException: Type 'System.Dynamic.BinaryOperationBinder' not found in assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
40
  at IKVM.Reflection.Reader.ModuleReader.ResolveType (Int32 metadataToken, IGenericContext context) [0x00000] in <filename unknown>:0 
41
  at IKVM.Reflection.Reader.TypeDefImpl.get_BaseType () [0x00000] in <filename unknown>:0 
42
  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, Mono.CSharp.TypeSpec declaringType, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
43
  at Mono.CSharp.MetadataImporter.ImportTypes (IKVM.Reflection.Type[] types, Mono.CSharp.Namespace targetNamespace, Boolean hasExtensionTypes) [0x00000] in <filename unknown>:0 
44
  at Mono.CSharp.StaticImporter.ImportAssembly (IKVM.Reflection.Assembly assembly, Mono.CSharp.RootNamespace targetNamespace) [0x00000] in <filename unknown>:0 
45
  at Mono.CSharp.StaticLoader.LoadReferences (Mono.CSharp.ModuleContainer module) [0x00000] in <filename unknown>:0 
46
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
47
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
48
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Type 'System.Dynamic.BinaryOperationBinder' not found in assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
49
  at IKVM.Reflection.Reader.ModuleReader.ResolveType (Int32 metadataToken, IGenericContext context) [0x00000] in <filename unknown>:0 
50
  at IKVM.Reflection.Reader.TypeDefImpl.get_BaseType () [0x00000] in <filename unknown>:0 
51
  at Mono.CSharp.MetadataImporter.CreateType (IKVM.Reflection.Type type, Mono.CSharp.TypeSpec declaringType, DynamicTypeReader dtype, Boolean canImportBaseType) [0x00000] in <filename unknown>:0 
52
  at Mono.CSharp.MetadataImporter.ImportTypes (IKVM.Reflection.Type[] types, Mono.CSharp.Namespace targetNamespace, Boolean hasExtensionTypes) [0x00000] in <filename unknown>:0 
53
  at Mono.CSharp.StaticImporter.ImportAssembly (IKVM.Reflection.Assembly assembly, Mono.CSharp.RootNamespace targetNamespace) [0x00000] in <filename unknown>:0 
54
  at Mono.CSharp.StaticLoader.LoadReferences (Mono.CSharp.ModuleContainer module) [0x00000] in <filename unknown>:0 
55
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
56
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
57

    
58

    
59
export MONO_PATH=/usr/lib/mono/4.0
60
mcs -lib:System.Data.dll -pkg:dotnet -target:library P2JLogical.cs
61

    
62
http://www.mono-project.com/Assemblies_and_the_GAC
63

    
64

    
65
mcs -r:/usr/lib/mono/4.0/System.Data.dll -target:library P2JLogical.cs 
66
----------------------------------------------------------------------
67
P2JLogical.cs(24,13): error CS0246: The type or namespace name `com' could not be found. Are you missing a using directive or an assembly reference?
68

    
69

    
70
mcs -r:/usr/lib/mono/4.0/System.Data.dll:../lib/p2jpl.dll  -target:library P2JLogical.cs 
71
----------------------------------------------------------------------------------------
72
error CS0006: Metadata file `/usr/lib/mono/4.0/System.Data.dll:../lib/p2jpl.dll' could not be found
73

    
74

    
75
mcs -r:/usr/lib/mono/4.0/System.Data.dll,../lib/p2jpl.dll  -target:library P2JLogical.cs 
76
----------------------------------------------------------------------------------------
77
P2JLogical.cs(24,13): error CS0246: The type or namespace name `com' could not be found. Are you missing a using directive or an assembly reference?
78

    
79

    
80
in /WrapperPrj
81
==============
82
mcs -r:/usr/lib/mono/4.0/System.Data.dll,lib/p2jpl.dll -target:library src/P2JLogical.cs 
83
error CS0006: Metadata file `/usr/lib/mono/4.0/System.Data.dll:lib/p2jpl.dll' could not be found
84

    
85

    
86

    
87

    
88
gacutil -i lib/p2jpl.exe -check_refs -package p2jpl
89
---------------------------------------------------
90
Failure adding assembly lib/p2jpl.exe to the cache: Attempt to install an assembly without a strong name
91

    
92

    
93

    
94
To run the StrongName utility you need to install @mono-devel@ package and its dependencies:
95
sudo apt-get install mono-devel
96
sn -k key.snk
97

    
98
sn -R p2jpl.exe key.snk 
99
-----------------------
100
Mono StrongName - version 2.10.8.1
101
StrongName utility for signing assemblies
102
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.
103

    
104
Couldn't sign the assembly p2jpl.exe with this key pair.
105

    
106

    
107

    
108

    
109

    
110
mcs -r:IKVM.OpenJDK.Core.dll -r:lib/p2jpl.exe -r:System.Data.dll -target:library src/P2JLogical.cs 
111
   error CS0006:   Metadata file `IKVM.OpenJDK.Core.dll' could not be found
112

    
113

    
114

    
115
ikvmc -target:library lib/p2jpl.jar -out:bin/p2jpl.dll -version:0.0.1.0 2> p2jpl_conv.log
116
mcs -r:/usr/lib/ikvm/IKVM.OpenJDK.Core.dll -r:bin/p2jpl.dll -r:System.Data.dll -target:library -out:bin/P2JLogical.dll src/P2JLogical.cs
117
mcs -r:/usr/lib/ikvm/IKVM.OpenJDK.Core.dll -r:bin/p2jpl.dll -r:bin/P2JLogical.dll -r:System.Data.dll -target:exe -out:bin/TestApp1.exe src/TestApp1.cs 
118
mono bin/TestApp1.exe
119

    
120
-- SUCCESS ?
121

    
122

    
123
mono /usr/bin/ikvm-7.2.4630.5/bin/ikvmc.exe -target:library lib/p2jpl.jar -out:bin/p2jpl.dll -version:0.0.1.0 2> p2jpl_conv.log
124
mcs -r:/usr/bin/ikvm-7.2.4630.5/bin/IKVM.OpenJDK.Core.dll -r:bin/p2jpl.dll -r:System.Data.dll -target:library -out:bin/P2JLogical.dll src/P2JLogical.cs
125
mcs -r:/usr/bin/ikvm-7.2.4630.5/bin/IKVM.OpenJDK.Core.dll -r:bin/p2jpl.dll -r:bin/P2JLogical.dll -r:System.Data.dll -target:exe -out:bin/TestApp1.exe src/TestApp1.cs 
126

    
127

    
128
// after replacing the ikvm 0.46.0.1 with 7.x
129
mono /usr/bin/ikvm/bin/ikvmc.exe -target:library lib/p2jpl.jar -out:bin/p2jpl.dll -version:0.0.1.0 2> p2jpl_conv.log
130
mcs -r:/usr/lib/ikvm/IKVM.OpenJDK.Core.dll -r:bin/p2jpl.dll -r:System.Data.dll -target:library -out:bin/P2JLogical.dll src/P2JLogical.cs
131
mcs -r:/usr/lib/ikvm/IKVM.OpenJDK.Core.dll -r:bin/P2JLogical.dll -r:System.Data.dll -target:exe -out:bin/TestApp1.exe src/TestApp1.cs
132

    
133
On Windows:
134
============================
135
Copy to installation dir:
136
/usr/lib/mono/gac/Accessibility/4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
137
/usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
138
/usr/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
139
/usr/lib/mono/gac/System.Windows.Forms/4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
140

    
141

    
142

    
143

    
144

    
145
ovidiu@HP-Elite-7300:~/workspaces/2143 (prototype IKVM solution)$ gacutil -i /usr/lib/ikvm/IKVM.OpenJDK.Core.dll 
146
Installed /usr/lib/ikvm/IKVM.OpenJDK.Core.dll into the gac (/usr/lib/mono/gac)
147
ovidiu@HP-Elite-7300:~/workspaces/2143 (prototype IKVM solution)$ gacutil -i /usr/lib/ikvm/IKVM.Runtime.dll 
148
Installed /usr/lib/ikvm/IKVM.Runtime.dll into the gac (/usr/lib/mono/gac)
149
ovidiu@HP-Elite-7300:~/workspaces/2143 (prototype IKVM solution)$ gacutil -i /usr/lib/ikvm/IKVM.OpenJDK.Jdbc.dll 
150
Installed /usr/lib/ikvm/IKVM.OpenJDK.Jdbc.dll into the gac (/usr/lib/mono/gac)
151

    
152

    
153

    
154

    
155

    
156

    
157

    
158

    
159

    
160

    
161

    
162

    
163

    
164

    
165

    
166

    
167

    
168

    
169

    
170

    
171

    
172

    
173

    
174

    
175
mcs  src/GoogleSearch.cs -r:System.Web.dll
176

    
177

    
178

    
179

    
180

    
181

    
182

    
183

    
184