You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running build.sh on the Raspberry Pi fails with "wrong ELF class: ELFCLASS64" #805
Describe the bug
Running "./build.sh" from the working copy root on the Pi4 (Raspbian 32 Bit) fails with a bunch of errors of the form
/home/pi/.nuget/packages/microsoft.net.compilers.toolset/3.1.0-beta1-19127-06/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : An error occurred while loading required library libhostpolicy.so from [/home/pi/projects/iot/.dotnet/shared/Microsoft.NETCore.App/2.1.11] [/home/pi/projects/iot/src/System.Device.Gpio/System.Device.Gpio.csproj]
/home/pi/.nuget/packages/microsoft.net.compilers.toolset/3.1.0-beta1-19127-06/tasks/netcoreapp2.1/Microsoft.CSharp.Core.targets(58,5): error : Failed to load ��(, error: /home/pi/projects/iot/.dotnet/shared/Microsoft.NETCore.App/2.1.11/libhostpolicy.so: wrong ELF class: ELFCLASS64 [/home/pi/projects/iot/src/devices/Units/Units.csproj]
The linux distribution installed on the Pi is 32 bit ARM, so this seems to use a wrong library.
Note: Running cd src/System.Device.Gpio && dotnet build System.Device.Gpio.sln works as expected.
Steps to reproduce
See above. Type
./build.sh
in the project root folder.
Expected behavior
Build finishes without errors.
Actual behavior
Build fails with exit code 1
Versions used
Built against these versions (but doesn't really seem to matter):
I have seen the windows build do the same thing i.e. from build.cmd download the 64 bit toolset instead of the 32 and vice-versa. This causes a similar message about hostpolicy.
Just tested again: The build works fine, it just has a small glitch: Running (some?) test cases fails, because the dotnet SDK 2.1 is not automatically installed into the build folder. After
pi@raspberrypi:~/Downloads $ tar xzf dotnet-sdk-2.1.811-linux-arm.tar.gz -C ~/projects/iot4/.dotnet
everything was green.
So I'm closing this as fixed with a minor issue left.
Activity
pgrawehr commentedon Oct 16, 2019
Here's the full build log:
buildPi4.log
Mention preferred build steps
pgrawehr commentedon Oct 16, 2019
Note: The unprintable characters are also unprintable here.
krwq commentedon Oct 16, 2019
@pgrawehr can you print full output of
<your IOT path>/.dotnet/dotnet --info? I'm specifically curious about Runtime Environment section.Frankenslag commentedon Oct 17, 2019
I have seen the windows build do the same thing i.e. from build.cmd download the 64 bit toolset instead of the 32 and vice-versa. This causes a similar message about hostpolicy.
pgrawehr commentedon Oct 17, 2019
Here's the full printout:
The runtime section doesn't mention ARM32 or ARM64, so maybe that's part of the problem?
Create Documentation for running the tests (#785)
Ellerbach commentedon Dec 22, 2020
@pgrawehr is this fix now?
pgrawehr commentedon Dec 22, 2020
I need to test again. Last time I tried it failed with another error, IIRC.
pgrawehr commentedon Dec 26, 2020
Just tested again: The build works fine, it just has a small glitch: Running (some?) test cases fails, because the dotnet SDK 2.1 is not automatically installed into the build folder. After
everything was green.
So I'm closing this as fixed with a minor issue left.