Compiling nxusb on Arch

Forums / NoMachine for Linux / Compiling nxusb on Arch

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #14994

    I’m trying to compile nxusb on Arch Linux but I’m getting this compilation error:

    CC [M]  /usr/NX/share/src/nxusb/utils.o
    In file included from /usr/NX/share/src/nxusb/utils.c:43:0:
    /usr/NX/share/src/nxusb/utils.h: In function ‘get_refcount’:
    /usr/NX/share/src/nxusb/utils.h:80:27: error: passing argument 1 of ‘atomic_read’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    return ref ? atomic_read(&ref->refcount) : 0;
    In file included from ./include/linux/atomic.h:4:0,
    from ./include/linux/mutex.h:18,
    from ./include/linux/kernfs.h:13,
    from ./include/linux/sysfs.h:15,
    from ./include/linux/kobject.h:21,
    from ./include/linux/device.h:17,
    from ./include/linux/usb/ch9.h:35,
    from ./include/linux/usb.h:5,
    from /usr/NX/share/src/nxusb/utils.h:47,
    from /usr/NX/share/src/nxusb/utils.c:43:
    ./arch/x86/include/asm/atomic.h:24:28: note: expected ‘const atomic_t * {aka const struct <anonymous> *}’ but argument is of type ‘const refcount_t * {aka const struct refcount_struct *}’
    static __always_inline int atomic_read(const atomic_t *v)
    cc1: some warnings being treated as errors
    make[2]: *** [scripts/ /usr/NX/share/src/nxusb/utils.o] Error 1
    make[1]: *** [Makefile:1492: _module_/usr/NX/share/src/nxusb] Error 2
    make[1]: Leaving directory ‘/usr/lib/modules/4.11.3-1-ARCH/build’
    make: *** [Makefile:7: all] Error 2

    nxclient version: 5.2.21
    Kernel version is 4.11.3-1-ARCH

    Is there a workaround?


    ARCH Linux is not among the Linux distributions that we officially support, even if we are interested to make NoMachine able to work also on such platform, we cannot say when a fix can be made available. We have opened a new trouble report to track this problem:, you may register to ‘Notify me when the TR is closed.’ to be informed when the fix is made available.


    I managed to solve the compilation issue patching nxusb code for newer kernels. See:

    The module is compiled, loaded and tested ok against a NoMachine server running on Windows 10.

    Now, on a different topic, I can’t share usb devices with a NoMachine server running on Mac OS X. It fails with “Failed to connect the device” message. I noticed that on my Mac the kernel driver is not loaded. Trying to manually load it, there is the following error:

    bash-3.2# kextutil /Library/Application\ Support/NoMachine/Extensions/nxusb.kext
    Diagnostics for /Library/Application Support/NoMachine/Extensions/nxusb.kext:
    Code Signing Failure: code signature is invalid
    /Library/Application Support/NoMachine/Extensions/nxusb.kext does not appear in strict exception list for architecture: x86_64
    Untrusted kexts are not allowed
    ERROR: invalid signature for com.nomachine.driver.nxusb, will not load

    bash-3.2# codesign -vvv /Library/Application\ Support/NoMachine/Extensions/nxusb.kext
    /Library/Application Support/NoMachine/Extensions/nxusb.kext: resource envelope is obsolete (version 1 signature)

    The software versions on my Mac are:

    bash-3.2# /Applications/ –version
    NoMachine – Version 5.3.9

    bash-3.2# system_profiler SPSoftwareDataType

    System Software Overview:

    System Version: macOS 10.12.5 (16F73)
    Kernel Version: Darwin 16.6.0
    Boot Volume: Macintosh HD
    Boot Mode: Normal
    Computer Name: mini
    User Name: System Administrator (root)
    Secure Virtual Memory: Enabled
    System Integrity Protection: Enabled
    Time since boot: 22:43


    Could you address this problem on next releases please?


    Ideally this problem needs to be in the Mac section because it’s a different issue for a different OS 😉

    USB sharing on macOS 10.12.5 is not possible because in v5 this OS version is not supported. It’s supported on versions from 10.6 through 10.10.5.

    With the release of version 6 usb sharing will be supported on the last macOS versions as well.

Viewing 4 posts - 1 through 4 (of 4 total)

This topic was marked as solved, you can't post.