cntools / libsurvive

Open Source Lighthouse Tracking System
MIT License
746 stars 137 forks source link

cnkalman build failure #286

Closed dikonov closed 1 year ago

dikonov commented 1 year ago

I am trying to build libsurvive under Linux. The libsurvive code contains an empty directory libs/cnkalman and fails to build as is. After copying the code of the cnkalman lib from the linked cnkalman repo into that empty dir I get mysterious errors from dotnet "error MSB4242", "error MSB4014". See the attached log. I have dotnet and dotnet-sdk-6.0 installed. The build process does not even stop with an error but freezes forever.

Are libsurvive-1.0 and git-master compilable in Linux? Can I disable cnkalman and build without it?

dikonov commented 1 year ago

Using versioned libusb dir /usr/bin/dotnet build -c Release Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Copyright (C) Microsoft Corporation. All rights reserved.

/home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk". Exception: "System.IO.DirectoryNotFoundException: Could not find a part of the path '/usr/lib64/dotnet/sdk-manifests'. /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerator1.Init() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerator1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at System.IO.Directory.GetDirectories(String path, String searchPattern, EnumerationOptions enumerationOptions) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at System.IO.Directory.GetDirectories(String path) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.FallbackForMissingManifest(String manifestId) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifestDirectories() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifests()+MoveNext() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/libsurvive.net/libsurvive.net.csproj : error MSB4242: at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio)"" /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: The build stopped unexpectedly because of an internal failure. /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: Microsoft.Build.BackEnd.SdkResolution.SdkResolverException: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk". Exception: "System.IO.DirectoryNotFoundException: Could not find a part of the path '/usr/lib64/dotnet/sdk-manifests'. /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerator1.Init() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerator1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Directory.GetDirectories(String path, String searchPattern, EnumerationOptions enumerationOptions) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Directory.GetDirectories(String path) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.FallbackForMissingManifest(String manifestId) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifestDirectories() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifests()+MoveNext() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio)" /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: ---> System.IO.DirectoryNotFoundException: Could not find a part of the path '/usr/lib64/dotnet/sdk-manifests'. /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerator1.Init() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerator1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Directory.GetDirectories(String path, String searchPattern, EnumerationOptions enumerationOptions) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.IO.Directory.GetDirectories(String path) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.FallbackForMissingManifest(String manifestId) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifestDirectories() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifests()+MoveNext() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: --- End of inner exception stack trace --- /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.Build.BackEnd.SdkResolution.CachingSdkResolverService.<>cDisplayClass3_0.b__1() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: --- End of stack trace from previous location --- /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.Lazy1.CreateValue() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at System.Lazy`1.get_Value() /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.Build.BackEnd.SdkResolution.CachingSdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.Build.BackEnd.SdkResolution.MainNodeSdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio) /home/slava/RPM/BUILD/libsurvive-1.0/bindings/cs/Demo/Demo.csproj : error MSB4014: at Microsoft.Build.BackEnd.SdkResolution.MainNodeSdkResolverService.<>cDisplayClass12_0.b__0()

dikonov commented 1 year ago

I was able to move forward after upgrading dotnet-sdk-6.0 to dotnet-sdk-8.0. However, cnkalman is still a blocker. Here is the new error:

[ 12%] Building CXX object libs/cnkalman/src/CMakeFiles/cnkalman.dir/ModelPlot.cc.o
In file included from /home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:1:
/home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/../include/cnkalman/ModelPlot.h:16:23: error: cannot declare field ‘cnkalman::ModelPlot::plot’ to be of abstract type ‘sciplot::Plot’
   16 |         sciplot::Plot plot;
      |                       ^~~~
In file included from /usr/include/sciplot/Plot2D.hpp:37,
                 from /usr/include/sciplot/Figure.hpp:34,
                 from /usr/include/sciplot/Canvas.hpp:33,
                 from /usr/include/sciplot/sciplot.hpp:38,
                 from /home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/../include/cnkalman/ModelPlot.h:6,
                 from /home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:1:
/usr/include/sciplot/Plot.hpp:56:7: note:   because the following virtual functions are pure within ‘sciplot::Plot’:
   56 | class Plot
      |       ^~~~
In file included from /usr/include/sciplot/Plot2D.hpp:37,
                 from /usr/include/sciplot/Figure.hpp:34,
                 from /usr/include/sciplot/Canvas.hpp:33,
                 from /usr/include/sciplot/sciplot.hpp:38,
                 from /home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/../include/cnkalman/ModelPlot.h:6,
                 from /home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:1:
/usr/include/sciplot/Plot.hpp:204:18: note:     ‘virtual std::string sciplot::Plot::repr() const’
  204 |     virtual auto repr() const -> std::string = 0;
      |                  ^~~~
In file included from /home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:1:
/home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/../include/cnkalman/ModelPlot.h:17:23: error: cannot declare field ‘cnkalman::ModelPlot::map’ to be of abstract type ‘sciplot::Plot’
   17 |         sciplot::Plot map;
      |                       ^~~
/home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc: In destructor ‘cnkalman::ModelPlot::~ModelPlot()’:
/home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:66:18: error: ‘class sciplot::Plot’ has no member named ‘show’
   66 |             plot.show();
      |                  ^~~~
/home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:67:17: error: ‘class sciplot::Plot’ has no member named ‘show’
   67 |             map.show();
      |                 ^~~~
/home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:69:14: error: ‘class sciplot::Plot’ has no member named ‘save’
   69 |         plot.save(name + "-plot.svg");
      |              ^~~~
/home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:70:13: error: ‘class sciplot::Plot’ has no member named ‘save’
   70 |         map.save(name + ".svg");
      |             ^~~~
/home/slava/RPM/BUILD/libsurvive/libs/cnkalman/src/ModelPlot.cc:71:13: error: ‘class sciplot::Plot’ has no member named ‘save’
   71 |         map.save(name + ".png");
      |             ^~~~
dikonov commented 1 year ago

It only works with sciplot 0.2. sciplot-0.2.1, 0.2.2, 0.3 cause errors.

dikonov commented 1 year ago

This issue is solved.