[Mono-bugs] [Bug 75634][Nor] New - Apps compiled with GMCS do not always link to 2.0 System DLL's

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jul 26 01:22:02 EDT 2005

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by hanclinto at gmail.com.


--- shadow/75634	2005-07-26 01:22:02.000000000 -0400
+++ shadow/75634.tmp.5313	2005-07-26 01:22:02.000000000 -0400
@@ -0,0 +1,95 @@
+Bug#: 75634
+Product: Mono: Runtime
+Version: 1.1
+OS: Red Hat 9.0
+OS Details: Works on Debian, breaks on RH9 and FC4
+Status: NEW   
+Priority: Normal
+Component: JIT
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: HanClinto at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Apps compiled with GMCS do not always link to 2.0 System DLL's
+Description of Problem:
+On my Debian box, I compile an app with GMCS that utilizes the 2.0 System
+libraries (specifically System.IO.Ports). This runs properly, and a quick
+look at an strace confirms this:
+strace -e trace=open mono TMDInterface.exe 2> trace.log
+grep System trace.log
+So you can see that it's reading from the 2.0 version of System.dll.
+Now I take that *same binary* and run it over on my RH9 box (installed from
+the universal installer *or* from the RPM's, version, and it
+does this:
+strace -e trace=open mono TMDInterface.exe 2> trace.log
+grep System trace.log
+open("/opt/mono-", O_RDONLY|O_LARGEFILE) = 9
+It then proceeds to give me errors about how it can't find System.IO.Ports.
+Steps to reproduce the problem:
+1. Load up a RH9 box (or supposedly FC4 also -- another guy on the chat
+room had the same problem with that distro and the universal installer).
+2. Go to http://www.mono-project.com/HowToSystemIOPorts and create the
+small sample application that is near the bottom of the page, and compile
+it by using "gmcs SerialExample.cs"
+3. Run the example with "mono SerialExample.exe"
+4. You should see an error like:
+** (SerialExample.exe:5372): WARNING **: The class
+System.IO.Ports.SerialPort could not be loaded, used in
+/root/mono/ioportsexample/SerialExample.exe (token 0x01000002)
+** (SerialExample.exe:5372): WARNING **: Missing method get_IsOpen in
+assembly /root/mono/ioportsexample/SerialExample.exe, type
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x00000> <unknown method)
+in <0x00027> SerialPortTest:Main (System.String[] args)
+If you are on a system like my Debian Etch box, you will see proper results
+return from this small sample app (such as those listed on that howto).
+It does not matter if you compile the app on a working system or a
+non-working system. I can compile with gmcs on the non-working RH9 system,
+move the binary over to my Debian box, and it executes perfectly. The
+problem seems to be with the mono runtime.
+Actual Results:
+Error messages as listed above
+Expected Results:
+Correct output, as listed on the HowToSerialPort wiki page.
+How often does this happen? 
+Every time with my RH9 box
+Additional Information:
+Mono version
+I tried uninstalling my Mono installation that was done with the automatic
+installer and re-installing via the RPM's, but I don't think that helped --
+it still wouldn't run properly.
+For complete lists of the messages it gives me, the pastebin
+http://pastebin.com/320349 may help.
+clint herron

More information about the mono-bugs mailing list