Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile for Linux #22

Open
thalesmaoa opened this issue Dec 4, 2023 · 3 comments
Open

Can't compile for Linux #22

thalesmaoa opened this issue Dec 4, 2023 · 3 comments

Comments

@thalesmaoa
Copy link

Hi there, I'm trying to use it in Linux, but I'm having trouble to compile it. Is it compatible with Linux?

@openshwprojects
Copy link
Owner

What are the errors? I had reports that users have compiled it with Mono on Linux

@deepcoder
Copy link

Below are the errors I am getting when trying to compile on Debian 12:

user@deepmbp:~/OpenBK7231T_App$ xbuild

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 6.12.0.200
Copyright (C) 2005-2013 Various Mono authors

Build started 1/24/2024 5:59:00 PM.
__________________________________________________
/home/user/OpenBK7231T_App/openBeken_win32_mvsc2017.vcxproj: error : /home/user/OpenBK7231T_App/openBeken_win32_mvsc2017.vcxproj: /home/user/OpenBK7231T_App/openBeken_win32_mvsc2017.vcxproj could not import "$(VCTargetsPath)\Microsoft.Cpp.Default.props"
Build FAILED.
Errors:

/home/user/OpenBK7231T_App/openBeken_win32_mvsc2017.vcxproj: error : /home/user/OpenBK7231T_App/openBeken_win32_mvsc2017.vcxproj: /home/user/OpenBK7231T_App/openBeken_win32_mvsc2017.vcxproj could not import "$(VCTargetsPath)\Microsoft.Cpp.Default.props"

	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:00.0662420

@corpix
Copy link

corpix commented Feb 5, 2024

That's strange, I've just succeeded to build c529737 on NixOS. Full log just in case it will help you to debug the problem:

Expand
 ~/projects/src/github.com/openshwprojects/BK7231GUIFlashTool  λ  xbuild

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 6.12.0.182
Copyright (C) 2005-2013 Various Mono authors

Build started 2/5/2024 11:04:12 PM.
__________________________________________________
/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher.sln:  warning : Don't know how to handle GlobalSection ExtensibilityGlobals, Ignoring.
Project "/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher.sln" (default target(s)):
	Target ValidateSolutionConfiguration:
		Building solution configuration "Debug|Any CPU".
	Target Build:
		Project "/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/BK7231Flasher.csproj" (default target(s)):
			Target PrepareForBuild:
				Configuration: Debug Platform: AnyCPU
				Created directory "bin/Debug/"
				Created directory "obj/Debug/"
			Target CopyFilesMarkedCopyLocal:
				Copying file from '/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.dll' to '/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/bin/Debug/Newtonsoft.Json.dll'
			Target GenerateResources:
				Tool /nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormDownloader.resx,obj/Debug/BK7231Flasher.FormDownloader.resources" 
				Tool /nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormExtractedConfig.resx,obj/Debug/BK7231Flasher.FormExtractedConfig.resources" 
				Tool /nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormMain.resx,obj/Debug/BK7231Flasher.FormMain.resources" 
				Tool /nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormOBKConfig.resx,obj/Debug/BK7231Flasher.FormOBKConfig.resources" 
				Tool /nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormPin.resx,obj/Debug/BK7231Flasher.FormPin.resources" 
				Tool /nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormPrompt.resx,obj/Debug/BK7231Flasher.FormPrompt.resources" 
				Tool /nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "Properties/Resources.resx,obj/Debug/BK7231Flasher.Properties.Resources.resources" 
			Target GenerateSatelliteAssemblies:
			No input files were specified for target GenerateSatelliteAssemblies, skipping.
			Target CoreCompile:
				Tool /nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/4.5/csc.exe execution started with arguments: /noconfig /debug:full /debug:portable /optimize- /out:obj/Debug/BK7231Flasher.exe /resource:obj/Debug/BK7231Flasher.FormDownloader.resources /resource:obj/Debug/BK7231Flasher.FormExtractedConfig.resources /resource:obj/Debug/BK7231Flasher.FormMain.resources /resource:obj/Debug/BK7231Flasher.FormOBKConfig.resources /resource:obj/Debug/BK7231Flasher.FormPin.resources /resource:obj/Debug/BK7231Flasher.FormPrompt.resources /resource:obj/Debug/BK7231Flasher.Properties.Resources.resources BitUtils.cs BK7231Flasher.cs BKFlashList.cs Colors.cs ConfigBase.cs CRC.cs FormDownloader.cs FormDownloader.Designer.cs FormExtractedConfig.cs FormExtractedConfig.Designer.cs FormMain.cs FormMain.Designer.cs FormMain_Net_Scanner.cs FormMain_Net_SingleDevice.cs FormMain_TuyaConfigExtractor.cs FormOBKConfig.cs FormOBKConfig.Designer.cs FormPin.cs FormPin.Designer.cs FormPrompt.cs FormPrompt.Designer.cs ILogListener.cs MiscUtils.cs ModifyProgressBarColor.cs MySettings.cs OBKConfig.cs OBKDeviceAPI.cs OBKFlags.cs OBKFlashLayout.cs OBKMassBackup.cs OBKRoles.cs OBKScanner.cs Program.cs Properties/AssemblyInfo.cs Rand.cs RequiredLibrariesCheck.cs TuyaConfig.cs RFPartitionUtil.cs RichTextUtil.cs SecurityProtocolTypeExtensions.cs TuyaModules.cs Properties/Resources.Designer.cs Properties/Settings.Designer.cs /target:winexe /win32icon:bk_icon.ico /define:"DEBUG;TRACE" /nostdlib /platform:AnyCPU /reference:../packages/Newtonsoft.Json.13.0.3/lib/net35/Newtonsoft.Json.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/2.0-api/System.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/2.0-api/System.Data.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/gac/System.Deployment/4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/2.0-api/System.Drawing.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/2.0-api/System.Net.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/2.0-api/System.Windows.Forms.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/2.0-api/System.Xml.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/2.0-api/System.Core.dll /reference:/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/2.0-api//mscorlib.dll /warn:4
				Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
				Copyright (C) Microsoft Corporation. All rights reserved.
FormMain.cs(170,17): warning CS0162: Unreachable code detected
FormMain.cs(161,29): warning CS0168: The variable 'ex' is declared but never used
FormPin.cs(46,29): warning CS0168: The variable 'ex' is declared but never used
FormOBKConfig.cs(44,30): warning CS0168: The variable 'ex' is declared but never used
FormMain.cs(279,29): warning CS0168: The variable 'ex' is declared but never used
BK7231Flasher.cs(371,30): warning CS0168: The variable 'ex' is declared but never used
OBKFlashLayout.cs(38,29): warning CS0168: The variable 'ex' is declared but never used
FormOBKConfig.cs(171,21): warning CS0162: Unreachable code detected
BK7231Flasher.cs(493,37): warning CS0168: The variable 'ex' is declared but never used
TuyaConfig.cs(149,30): warning CS0168: The variable 'ex' is declared but never used
FormOBKConfig.cs(336,29): warning CS0168: The variable 'ex' is declared but never used
OBKDeviceAPI.cs(443,30): warning CS0168: The variable 'ex' is declared but never used
FormMain.cs(696,30): warning CS0168: The variable 'ex' is declared but never used
FormMain.cs(742,30): warning CS0168: The variable 'ex' is declared but never used
FormMain.cs(828,13): warning CS0162: Unreachable code detected
FormMain.cs(843,13): warning CS0162: Unreachable code detected
FormMain.cs(941,29): warning CS0168: The variable 'ex' is declared but never used
FormMain.cs(1233,30): warning CS0168: The variable 'ex' is declared but never used
BK7231Flasher.cs(31,14): warning CS0649: Field 'BK7231Flasher.bDebugUART' is never assigned to, and will always have its default value false
			Target _CopyAppConfigFile:
				Copying file from '/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/app.config' to '/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/bin/Debug/BK7231Flasher.exe.config'
			Target DeployOutputFiles:
				Copying file from '/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/obj/Debug/BK7231Flasher.pdb' to '/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/bin/Debug/BK7231Flasher.pdb'
				Copying file from '/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/obj/Debug/BK7231Flasher.exe' to '/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/bin/Debug/BK7231Flasher.exe'
		Done building project "/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/BK7231Flasher.csproj".
Done building project "/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher.sln".

Build succeeded.

Warnings:

/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher.sln:  warning : Don't know how to handle GlobalSection ExtensibilityGlobals, Ignoring.

/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher.sln (default targets) ->
(Build target) ->
/home/user/projects/src/github.com/openshwprojects/BK7231GUIFlashTool/BK7231Flasher/BK7231Flasher.csproj (default targets) ->
/nix/store/3y3gbf12dg4wz4lqn4qjjnr4bz79cm74-mono-6.12.0.182/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

	FormMain.cs(170,17): warning CS0162: Unreachable code detected
	FormMain.cs(161,29): warning CS0168: The variable 'ex' is declared but never used
	FormPin.cs(46,29): warning CS0168: The variable 'ex' is declared but never used
	FormOBKConfig.cs(44,30): warning CS0168: The variable 'ex' is declared but never used
	FormMain.cs(279,29): warning CS0168: The variable 'ex' is declared but never used
	BK7231Flasher.cs(371,30): warning CS0168: The variable 'ex' is declared but never used
	OBKFlashLayout.cs(38,29): warning CS0168: The variable 'ex' is declared but never used
	FormOBKConfig.cs(171,21): warning CS0162: Unreachable code detected
	BK7231Flasher.cs(493,37): warning CS0168: The variable 'ex' is declared but never used
	TuyaConfig.cs(149,30): warning CS0168: The variable 'ex' is declared but never used
	FormOBKConfig.cs(336,29): warning CS0168: The variable 'ex' is declared but never used
	OBKDeviceAPI.cs(443,30): warning CS0168: The variable 'ex' is declared but never used
	FormMain.cs(696,30): warning CS0168: The variable 'ex' is declared but never used
	FormMain.cs(742,30): warning CS0168: The variable 'ex' is declared but never used
	FormMain.cs(828,13): warning CS0162: Unreachable code detected
	FormMain.cs(843,13): warning CS0162: Unreachable code detected
	FormMain.cs(941,29): warning CS0168: The variable 'ex' is declared but never used
	FormMain.cs(1233,30): warning CS0168: The variable 'ex' is declared but never used
	BK7231Flasher.cs(31,14): warning CS0649: Field 'BK7231Flasher.bDebugUART' is never assigned to, and will always have its default value false

	20 Warning(s)
	0 Error(s)

Time Elapsed 00:00:02.9161710


 ~/projects/src/github.com/openshwprojects/BK7231GUIFlashTool  λ  ls -la BK7231Flasher/bin/Debug/                                                                                                                                                                                                                    (3s 96ms) 
.rw-r--r-- 271k user  5 Feb 23:04 BK7231Flasher.exe
.rw-r--r--  134 user  5 Feb 23:01 BK7231Flasher.exe.config
.rw-r--r--  74k user  5 Feb 23:04 BK7231Flasher.pdb
.rw-r--r-- 516k user  5 Feb 23:01 Newtonsoft.Json.dll
 ~/projects/src/github.com/openshwprojects/BK7231GUIFlashTool  λ  mono --version                                                                                                                                                                                                                                               
Mono JIT compiler version 6.12.0.182 (tarball Mon Jan 22 11:28:14 UTC 2024)
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 
	Interpreter:   yes
	LLVM:          supported, not enabled.
	Suspend:       hybrid
	GC:            sgen (concurrent by default)


 ~/projects/src/github.com/openshwprojects/BK7231GUIFlashTool  λ  xbuild --version                                                                                                                                                                                                                                             

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 6.12.0.182
Copyright (C) 2005-2013 Various Mono authors
MSBUILD: error MSBUILD0000: Project file '--version' not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants