Island on Linux: undefined symbol 'mknod'


(Riccardo De Agostini) #1

IDE: Water
Version: Version (develop) built on talax, 20180928-142533. Commit 8e4eb02
Target: Island (Linux)
Description: Although the mknod function is present in rtl, calling it in a program (C# in my case, but probably irrilevant) causes a build error:

E: undefined symbol: mknod

This happens for both x86_64 and armv6 architectures.

Expected Behavior: The program should build.

Actual Behavior: The above-mentioned build error is issued.


  • Create a new C# Island project in Water, using the “Console Application (Linux)” template
  • Replace the contents of Program.cs with the following:
    namespace ConsoleApplication
        static class Program
            public static Int32 Main(string[] args)
                rtl.mknod("/tmp/testfile", 0b_111_111_111, 0);
                return 0;
  • Build for your choice of architecture(s). Notice the error in the build log,

(RemObjects) #2

Thanks, logged as bugs://81369

(RemObjects) #3

bugs://81369 got closed with status fixed.

(Carlo Kok) #4

see my fix here:

this is a special libgcc_s function it seems (which we don’t link in). But the implementation is simple, it just calls __xmknod, so as a temporary workaround you can call it directly.

(Riccardo De Agostini) #5

Thanks a lot @ck for the fix! I’ll be sure to check it out as soon as I can.

I assume, by the way, that you already checked that _MKNOD_VER equals 0 in the libc you’re linking.:wink:

(Carlo Kok) #6

yeah :slight_smile: