Installation problems (Ubuntu 16.10; mono; call of overloaded ‘abs(speed_t)’ is ambiguous; libGL)

edited March 2017 in Linux
Hi,
I'm having trouble setting up repetier-host on Ubuntu 16.10 (in a virtualbox VM but that shouldn't matter I hope).

I installed mono-devel and then mono-complete but I'm still getting these error messages when running "sudo sh configureFirst.sh":

System: x86_64
Using 64 bit CuraEngine
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libmono-winforms2.0-cil is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  mono-reference-assemblies-2.0 mono-devel

E: Package 'libmono-winforms2.0-cil' has no installation candidate
Checking if you are in the dialout group.
1
User already in dialout group. Adding not required.
Compiling helper software to allow non ansi baud rates for some boards
depending on the used serial driver.
SetBaudrate.cpp:11:2: warning: #warning TCGETS2 [-Wcpp]
 #warning TCGETS2
  ^~~~~~~
SetBaudrate.cpp:40:2: warning: #warning TCGETS2 [-Wcpp]
 #warning TCGETS2
  ^~~~~~~
SetBaudrate.cpp: In function ‘int set_baudrate(int, int)’:
SetBaudrate.cpp:71:29: error: call of overloaded ‘abs(speed_t)’ is ambiguous
   if(abs(baud - ios.c_ispeed) * 100 / baud >= 5) {
                             ^
In file included from /usr/include/c++/6/cstdlib:75:0,
                 from /usr/include/c++/6/ext/string_conversions.h:41,
                 from /usr/include/c++/6/bits/basic_string.h:5402,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from SetBaudrate.cpp:18:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/include/c++/6/ext/string_conversions.h:41:0,
                 from /usr/include/c++/6/bits/basic_string.h:5402,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from SetBaudrate.cpp:18:
/usr/include/c++/6/cstdlib:185:3: note: candidate: __int128 std::abs(__int128)
   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
   ^~~
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
Configuration finished.
IMPORTANT: In addition to the bundled CuraEngine, the host also
supports Slic3r and Skeinforge. These slicers are not bundled, so
need to install them according to their docs and then set the path
to them in Repetier-Host.
For Slic3r simply unpack the tar you get on http://slic3r.org in this directory.
The host will then register and add it automatically on next restart.

IMPORTANT: You need a recent mono version since the host uses .NET 4.0
If you see the following error message, your mono is too old!
>>> System.Windows.Forms.SplitContainer doesn't implement interface System.ComponentModel.ISupportInitialize <<<
This folder now contains a repetier-RepetierHost.desktop file
Copy it to your desktop to get a launch icon there

here's the output of mono --version:
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS:           __thread
SIGSEGV:       altstack
Notifications: epoll
Architecture:  amd64
Disabled:      none
Misc:          softdebug 
LLVM:          supported, not enabled.
GC:            sgen

Any help would be very much appreciated.

Comments

  • I forgot to add that I also tried running repetierHost anyway. It's failing miserably (no window is shown; here's the console output):

    Unhandled Exception:
    System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
      at System.Drawing.GDIPlus.CheckStatus (Status status) <0x406b8090 + 0x0015f> in <filename unknown>:0 
      at System.Drawing.Bitmap..ctor (Int32 width, Int32 height, PixelFormat format) <0x406e1e30 + 0x00053> in <filename unknown>:0 
      at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Int32 width, Int32 height) <0x406e4050 + 0x0002f> in <filename unknown>:0 
      at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Size newSize) <0x406e4010 + 0x0002b> in <filename unknown>:0 
      at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (System.Drawing.Image,System.Drawing.Size)
      at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) <0x406e36a0 + 0x0020b> in <filename unknown>:0 
      at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) <0x406e3620 + 0x00070> in <filename unknown>:0 
      at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) <0x406dfc90 + 0x00193> in <filename unknown>:0 
      at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) <0x406dfa50 + 0x0006b> in <filename unknown>:0 
      at System.Windows.Forms.Cursors.get_SizeNWSE () <0x406df8f0 + 0x0005b> in <filename unknown>:0 
      at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl) <0x406df860 + 0x0001f> in <filename unknown>:0 
      at (wrapper remoting-invoke-with-check) System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control)
      at System.Windows.Forms.ScrollableControl.CreateScrollbars () <0x406dc9f0 + 0x004ff> in <filename unknown>:0 
      at System.Windows.Forms.ScrollableControl..ctor () <0x406c8a60 + 0x00387> in <filename unknown>:0 
      at System.Windows.Forms.ContainerControl..ctor () <0x406c88d0 + 0x00027> in <filename unknown>:0 
      at System.Windows.Forms.Form..ctor () <0x406c8030 + 0x000e7> in <filename unknown>:0 
      at RepetierHost.Main..ctor () <0x406c09c0 + 0x00adb> in <filename unknown>:0 
      at (wrapper remoting-invoke-with-check) RepetierHost.Main:.ctor ()
      at RepetierHost.Program.Main (System.String[] args) <0x4067c1d0 + 0x00037> in <filename unknown>:0 
    [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
      at System.Drawing.GDIPlus.CheckStatus (Status status) <0x406b8090 + 0x0015f> in <filename unknown>:0 
      at System.Drawing.Bitmap..ctor (Int32 width, Int32 height, PixelFormat format) <0x406e1e30 + 0x00053> in <filename unknown>:0 
      at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Int32 width, Int32 height) <0x406e4050 + 0x0002f> in <filename unknown>:0 
      at System.Drawing.Bitmap..ctor (System.Drawing.Image original, Size newSize) <0x406e4010 + 0x0002b> in <filename unknown>:0 
      at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (System.Drawing.Image,System.Drawing.Size)
      at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) <0x406e36a0 + 0x0020b> in <filename unknown>:0 
      at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, System.Drawing.Bitmap mask, Color cursor_pixel, Color mask_pixel, Int32 xHotSpot, Int32 yHotSpot) <0x406e3620 + 0x00070> in <filename unknown>:0 
      at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) <0x406dfc90 + 0x00193> in <filename unknown>:0 
      at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) <0x406dfa50 + 0x0006b> in <filename unknown>:0 
      at System.Windows.Forms.Cursors.get_SizeNWSE () <0x406df8f0 + 0x0005b> in <filename unknown>:0 
      at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control CapturedControl) <0x406df860 + 0x0001f> in <filename unknown>:0 
      at (wrapper remoting-invoke-with-check) System.Windows.Forms.SizeGrip:.ctor (System.Windows.Forms.Control)
      at System.Windows.Forms.ScrollableControl.CreateScrollbars () <0x406dc9f0 + 0x004ff> in <filename unknown>:0 
      at System.Windows.Forms.ScrollableControl..ctor () <0x406c8a60 + 0x00387> in <filename unknown>:0 
      at System.Windows.Forms.ContainerControl..ctor () <0x406c88d0 + 0x00027> in <filename unknown>:0 
      at System.Windows.Forms.Form..ctor () <0x406c8030 + 0x000e7> in <filename unknown>:0 
      at RepetierHost.Main..ctor () <0x406c09c0 + 0x00adb> in <filename unknown>:0 
      at (wrapper remoting-invoke-with-check) RepetierHost.Main:.ctor ()
      at RepetierHost.Program.Main (System.String[] args) <0x4067c1d0 + 0x00037> in <filename unknown>:0 

  • Hmmm
    Out of curiosity I enabled 3d acceleration for my Virtualbox-VM. (3d acceleration leads to very undesirable flickering; it seems that the buffers from double/triple buffering are shown in the wrong order. That's probably one of the reasons it's disabled by default.)

    RepetierHost is now starting!

    Maybe some sanity checking at startup could be implemented to exclude such 3d acceleration problems?

    Still, the compilation problem and warnings/errors related to mono libraries are also worrysome.
  • Just in case, someone else may find this helpful:

    I switched repetierHost back to software rendering (due to various problems) by running it as follows:

    LD_PRELOAD=/usr/lib/x86_64-linux-gnu/mesa/libGL.so repetierHost

    What's strange is that now it also starts when I completely disable 3d acceleration for this VM whereas before it did not start at all.
Sign In or Register to comment.