I have created a new Hello World Kotlin Native project in CLion IDE but i am getting. kotlin native unknown host target error in.
if (NOT KONANC_TARGET)
if (APPLE)
set(KONANC_TARGET macbook)
elseif (UNIX)
set(KONANC_TARGET linux)
else ()
**message(FATAL_ERROR "Unsupported host target")**
Because I am using windows and KONANC is only supported on macOS and Linux.
How can I fix this error and run Kotlin Native project on windows ?
I followed this Kotlin Native Tutorial.
This problem is known, but only limited to CMake files. You could still use Gradle or command line tools on Windows.
Related
I am new to electron and trying to build a windows installer for the electron app using my mac. I am using electron-packager to package the app and then electron-wix-msi to build the installer. When the build installer steps are executed, the error Unable to read file info from exe. Falling back to packaging description. Error: spawn Unknown system error -86 is thrown. please see the full error message in the attached screenshot.
I would like to highlight that when I build an installer for macOS, it works. Should I understand that I can not build a windows installer using mac?
build_installer64.ts file:
You can't do that, you have to do this on the Windows platform.
I use GitHub Actions to build my app for each platform, code for Windows:
https://code.korbsstudio.com/KorbsStudio/electron-builder-sample/-/blob/main/.github/workflows/build.yml#L52-71
Optionally, you can also use a Windows virtual machine and repeat the same process in there.
Update, for those interested in doing this on Linux, building a EXE setup file seems to be possible. You'll need to have wine installed and use:
npx electron-builder build --win
I just run dart2aot main.dart main.aot to compile my dart file to binary and it runs fine on windows, but when I try to dartaotruntime main.aot on another machine, with Linux OS (Ubuntu) it doesn't work, giving me that error:
VM initialization failed: Snapshot not compatible with the current VM configuration: the snapshot requires 'product use_bare_instructions no-"asserts" no-causal_async_stacks no-bytecode x64-win' but the VM has 'product use_bare_instructions no-"asserts" no-causal_async_stacks no-bytecode x64-sysv
How can I solve that? There is a way for me on a windows machine generate the aot for linux?
Answer from Vyacheslav Egorov on the Dart SDK team:
We currently don't support cross compilation of AOT snapshots using Dart SDK. To generate a snapshot for Linux you would need to run Linux version of the Dart SDK. (e.g. you could try using https://learn.microsoft.com/en-us/windows/wsl/install-win10 for that)
I have jenkins on ubuntu. Building worked fine until I started to use android ndk.
latest ndk is downloaded and extracted into /opt/android-sdk-linux/ndk-bundle
In /etc/profile.d/android.sh is:
export ANDROID_HOME="/opt/android-sdk-linux"
export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
export ANDROID_NDK_HOME="/opt/android-sdk-linux/ndk-bundle"
but I got still error:
:common:compileDebugNdk FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':common:compileDebugNdk'.
NDK not configured.
Download the NDK from http://developer.android.com/tools/sdk/ndk/. Then add ndk.dir=path/to/ndk in local.properties.
(On Windows, make sure you escape backslashes, e.g. C:\ndk rather than C:\ndk)
The message says it all. You should add a text file local.properties to the project directory on the Linux machine, with one line
ndk.dir=/opt/android-sdk-linux/ndk-bundle
This file is usually in .gitignore, and Android Studio generates it automatically. But when you build your project in Jenkins, it does not open Android Studio.
I have installed the Phidgets libraries following the following link and the "Hello World" example was working, but when I install the Phidgets ROS driver, I get this error:
fatal error: libphidgets/phidget21.h: No such file or directory compilation terminated.
What's causing this? The libraries have been installed by the Linux driver, right?
Phidgets, in their infinite wisdom desired to abandon the "phidget21" architecture and now have a completely different and incompatible phidgets22 driver architecture. When you installed the libraries from their web site, you can only get the version 22 driver architecture :( -- hint, version 21 is still out there on GitHub, so if you go find it, download and install everything should work as expected. Someone will need to migrate all the ROS code to the newer version 22 architecture for this to work as expected.
Im trying to use luarocks for installing luafilesystem module.
Since im trying to install version 1.6.2, luarocksis trying to build luafilesystem on my local machine.
I have the following error: lfs.obj : error LNK2019: unresolved external symbol. I have this error for 30 standard lua functions: lua_pushinteger, lua_pushstring.
Can anyone please help me?
Thanks!
Im using:
1. Lua 5.1 for windows 7.
2. CL compiler of Microsoft Visual Studio 9.0 for amd64.
3. Microsoft SDK's V6.1 for X64
Solved it.
I learned that luarocks uses a config file (config.lua) which contains the name of lua's lib file (lua5.1.lib). The lib file didnt fit my machine, so I took the lib file for x64 (from my lua version and switched it).