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

Publish with .Net 8 has some issues #2

Closed
MikaTas opened this issue Dec 12, 2023 · 1 comment
Closed

Publish with .Net 8 has some issues #2

MikaTas opened this issue Dec 12, 2023 · 1 comment

Comments

@MikaTas
Copy link

MikaTas commented Dec 12, 2023

Publish with .Net 8 has some issues:
Windows 10 64bit.

try1:
dotnet publish -r linux-bionic-arm64 -p:DisableUnsupportedError=true -p:PublishAotUsingRuntimePack=true -p:AssemblyName=libhello-jni -p:RemoveSections=true

error : Requested linker ('./android_fake_clang.cmd') not found in PA
TH. [C:\dev\net8tests\NativeAOT-AndroidHelloJniLib\AndroidHelloJniLib.csproj]

A change to .csproj row 49 - solves the error:
android_fake_clang.cmd

try2:
dotnet publish ...

error : Symbol stripping tool ('C/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-objcopy') not found in PATH.

A change to .csproj row 55 + adding the path to system env param path - solves the error:
llvm-objcopy

try3:
dotnet publish ...

error MSB3073: The command "sed -i -z 's/global: _init; _fini;/global: /g;' obj\Release\net8.0\linux-bionic-arm64
native\libhello-jni.exports" exited with code 9009.

@josephmoresena
Copy link
Owner

Try not to use '-p:RemoveSections=true'. Maybe we should prevent it from being used on a Windows host.
The purpose of that parameter is to eliminate the _init and _fini lines from the exports file, the zed command looks for that pattern and replaces it with empty ones. dotnet/runtime#92272 (comment)

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

2 participants