[GH-ISSUE #176] ./build.sh builds executable for the wrong architecture #159

Closed
opened 2026-02-26 00:31:53 +03:00 by kerem · 2 comments
Owner

Originally created by @regular on GitHub (Jan 25, 2017).
Original GitHub issue: https://github.com/hirschmann/nbfc/issues/176

I followed your build instructions for Linux on a 64bit machine running Arch Linux.

The resulting executable in Linux/bin/ReleaseLinux however fails to run:

[root@blume ReleaseLinux]# uname -a
Linux blume 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux
[root@blume ReleaseLinux]# ./nbfc.exe
-bash: ./nbfc.exe: cannot execute binary file: Exec format error
[root@blume ReleaseLinux]# file nbfc.exe
nbfc.exe: PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows
Originally created by @regular on GitHub (Jan 25, 2017). Original GitHub issue: https://github.com/hirschmann/nbfc/issues/176 I followed your build instructions for Linux on a 64bit machine running Arch Linux. The resulting executable in Linux/bin/ReleaseLinux however fails to run: ``` [root@blume ReleaseLinux]# uname -a Linux blume 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux [root@blume ReleaseLinux]# ./nbfc.exe -bash: ./nbfc.exe: cannot execute binary file: Exec format error [root@blume ReleaseLinux]# file nbfc.exe nbfc.exe: PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows ```
kerem 2026-02-26 00:31:53 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@hirschmann commented on GitHub (Jan 25, 2017):

The resulting assembly is architecture independent CIL code. Your problem is, that the Linux kernel on your system doesn't know how to handle .net/mono binaries.

The solution: call nbfc like this: mono nbfc.exe
You could also register .exe files as a non-native binary, see http://www.mono-project.com/archived/guiderunning_mono_applications/

<!-- gh-comment-id:275159067 --> @hirschmann commented on GitHub (Jan 25, 2017): The resulting assembly is architecture independent CIL code. Your problem is, that the Linux kernel on your system doesn't know how to handle .net/mono binaries. The solution: call nbfc like this: `mono nbfc.exe` You could also register .exe files as a non-native binary, see http://www.mono-project.com/archived/guiderunning_mono_applications/
Author
Owner

@regular commented on GitHub (Feb 4, 2017):

Ah, I see! Thanks!

<!-- gh-comment-id:277477001 --> @regular commented on GitHub (Feb 4, 2017): Ah, I see! Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nbfc-hirschmann#159
No description provided.