SBT fails to launch on ARM64 Apple silicon with error Could not find required component 'xsbti' - sbt

When I launch SBT 1.5 using the command which in turn launches version 0.13 for the project
❯ sbt -v
[sbt_options] declare -a sbt_options='()'
[process_args] java_version = '8'
# Executing command line:
java
-Dfile.encoding=UTF-8
-Xms1024m
-Xmx1024m
-Xss4M
-XX:ReservedCodeCacheSize=128m
-jar
/opt/homebrew/Cellar/sbt/1.5.0/libexec/bin/sbt-launch.jar
[info] Loading global plugins from /Users/viswanath/.sbt/0.13/plugins
[info] Updating {file:/Users/viswanath/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
I get the following error
[error] (compile:compileIncremental) sbt.InvalidComponent: Could not find required component 'xsbti'
on my MacBookPro with M1 processor (a.k.a Apple silicon) on ARM64 architecture. Any clue on how to fix this problem?
Note: Bundled SBT runs fine on IntelliJ

Try installing with SDKMAN
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java
sdk install sbt
sbt compile

Bumped up the project's SBT version to 1.5.0 and the problem disappeared. See this githib issue for more information.
Alternatively, check this workaround on SBT 1.5.0 for launching SBT in interactive mode.
sbt -Dsbt.boot.directory=/tmp/boot1 -Dsbt.launcher.coursier=false

Related

Error: The deployment target requir Qt libs, but init qmake is failed. (CQtDeployer)

i am try to use CQtDeployer.
I am using ubuntu 18.04 and QT 5.9.5.
I want to run this on terminal:
cqtdeployer -bin MY_APP_NAME_IN_RELEASE_FOLDER -qmake /usr/lib/qt5/bin/qmake
Note:
/usr/lib/qt5/bin/qmake -> FROM QT CREATOR -> options -> qt versions -> autodetected qt 5.9.5 -> qmake locations
Result:
Info: Deploy ...
Info: flag targetDir not used. use default target dir :/root/Masaüstü/RELEASE/DistributionKit
Error: The deployment target requir Qt libs, but init qmake is failed.
Error: deploy is failed!
Note2:
root#ubuntu-pc:~/DEPLOY_TEST_1# qmake --version
QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu
What's the problem?
And the solution:
Blockquote
Solution 1
As a workaround, uninstall the snap version of cqtdeployer and install cqtdeployer from the installer.
Solution 2
Install Qt from an official source in user space.
If you are unable to use the GUI, use the console utility to install Qt
Blockquote
Solution from : https://github.com/QuasarApp/CQtDeployer/issues/373#issuecomment-637762214

sbt-1.1.1 sbtVersion showing 1.1.0

I invoke:
brew install sbt
I get:
/usr/local/Cellar/sbt/1.1.1: 491 files, 48.3MB, built in 7 seconds
I invoke:
sbt sbtVersion
I get:
[info] Loading project definition from /Users/name/project
[info] Set current project to name (in build file:/Users/name/)
[info] 1.1.0
I'm expecting to see
[info] 1.1.1
Why don't the version values match?
Thank you.
Most likely, because you have a file project/build.properties with line
sbt.version=1.1.0
So one thing is the version of the launcher that you installed with Homebrew and another is the version of the sbt you launch in particular project. If you don't set it explicitly in project/build.properties, sbt will try to run its own version (launcher's, i.e. 1.1.1 in your case).
Another possible reason is that Homebrew could install the formula, but not link the binaries (assuming you upgraded from sbt 1.1.0). You can run several commands to verify which versions you have
$ brew info sbt
...
$ brew list --versions sbt
sbt 0.13.16 0.13.11 1.0.0 1.0.1 1.1.0 0.13.12 0.13.15 1.1.1 0.13.13 1.0.4 1.0.3 1.0.2
$ brew list sbt
/usr/local/Cellar/sbt/1.1.1/bin/sbt
/usr/local/Cellar/sbt/1.1.1/libexec/bin/ (5 files)
/usr/local/Cellar/sbt/1.1.1/libexec/lib/ (483 files)
You can see here that I have many old versions installed, but the one linked is 1.1.1. In case I need to switch to an older launcher, I can run brew switch sbt 1.0.4, for example.

Unable to install sbt 0.13.16 using SDK Manager

I'm trying to install sbt 0.13.16 using SDK Manager.
$ sdk install sbt 0.13.16
Stop! sbt 0.13.16 is not available. Possible causes:
* 0.13.16 is an invalid version
* sbt binaries are incompatible with Darwin
Below is the SDK details -
$ sdk version
SDKMAN 5.5.13+272
Any reason, why I'm not able to install sbt 0.13.16 using sdk manager.
You are not able to install this version because it is not available.
To find out all the SBT candidate versions available for installation run the command:
sdk list sbt

Can't run Qt apps: version `Qt_5' not found

I run Ubuntu 16.04 LTS.
My problem is that I am not able to run a Qt5 app, which I can compile.
This is what I get when I try to run it:
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5: version `Qt_5' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.6' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version `Qt_5' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
I then removed Qt5 and purged all the remnants. Then I installed again Qt5.
user#user-P64V7:~$ which qmake
/home/user/Qt5.8.0/5.8/gcc_64/bin/qmake
user#user-P64V7:~$ qmake --version
QMake version 3.1
Using Qt version 5.8.0 in /home/user/Qt5.8.0/5.8/gcc_64/lib
user#user-P64V7:~$ echo $PATH
/home/user/Qt5.8.0/5.8/gcc_64/bin:/home/user/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
It could also be worth noting that I use Netbeans 8.2 and the QMake command is
/home/user/Qt5.8.0/5.8/gcc_64/bin/qmake
Any idea what I could be doing wrong?
Thanks a lot!
So I figured out an answer according to these two previous questions:
Error on execution -version `Qt_5' not found required by
How to set the environmental variable LD_LIBRARY_PATH in linux
To summarize, to add the libraries the right way, one should add a custom .conf file to the folder /etc/ld.so.conf.d containing all the absolute paths to library folders and then run sudo ldconfig. :)
cpu: armv8
os: Linux kylin.5.desktop-generic
upgrade from 5.6 to 5.9
Similar situations will appear after the program is released.
solution:
copy /usr/local/Qt-5.9.2 to /usr/local/ in target pc.
qtchooser -install qt5.9 /usr/local/Qt5.9.1/5.9.1/gcc_64/bin/qmake
sudo bash -c "echo export QT_SELECT=qt5.9 >> /etc/profile"
sudo ldconfig -v

Error while building Spark 1.2.1 on Windows 7 using sbt

I am trying to build Spark 1.2.1 on Windows with the help of sbt, and I'm running into the following issue:
Edit: The command I ran was sbt/sbt assembly
[info] Set current project to spark-parent (in build file:/C:/Programming/spark-1.2.1/)
[error] Expected symbol
[error] Not a valid command: /
[error] /sbt
[error] ^
Any help would be greatly appreciated.
I used the latest sbt Windows installer to install sbt and have Git installed on my machine.

Resources